All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-pmem-pci: force virtio version 1
@ 2020-09-25 10:22 Pankaj Gupta
  2020-09-25 10:23 ` David Hildenbrand
  2020-09-25 10:38 ` Cornelia Huck
  0 siblings, 2 replies; 5+ messages in thread
From: Pankaj Gupta @ 2020-09-25 10:22 UTC (permalink / raw)
  To: mst, david; +Cc: Pankaj Gupta, qemu-devel

 Qemu fails with below error when trying to run with virtio pmem:

 (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1:
  device is modern-only, use disable-legacy=on
 
 This patch fixes this by forcing virtio 1 with virtio-pmem.

fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem")
Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
---
 hw/virtio/virtio-pmem-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
index 21a457d151..2b2a0b1eae 100644
--- a/hw/virtio/virtio-pmem-pci.c
+++ b/hw/virtio/virtio-pmem-pci.c
@@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
     VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
     DeviceState *vdev = DEVICE(&pmem_pci->vdev);
 
+    virtio_pci_force_virtio_1(vpci_dev);
     qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
 }
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-pmem-pci: force virtio version 1
  2020-09-25 10:22 [PATCH] virtio-pmem-pci: force virtio version 1 Pankaj Gupta
@ 2020-09-25 10:23 ` David Hildenbrand
  2020-09-25 10:38 ` Cornelia Huck
  1 sibling, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2020-09-25 10:23 UTC (permalink / raw)
  To: Pankaj Gupta, mst; +Cc: qemu-devel

On 25.09.20 12:22, Pankaj Gupta wrote:
>  Qemu fails with below error when trying to run with virtio pmem:
> 
>  (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1:
>   device is modern-only, use disable-legacy=on
>  
>  This patch fixes this by forcing virtio 1 with virtio-pmem.
> 
> fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem")
> Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> ---
>  hw/virtio/virtio-pmem-pci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
> index 21a457d151..2b2a0b1eae 100644
> --- a/hw/virtio/virtio-pmem-pci.c
> +++ b/hw/virtio/virtio-pmem-pci.c
> @@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
>      VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
>      DeviceState *vdev = DEVICE(&pmem_pci->vdev);
>  
> +    virtio_pci_force_virtio_1(vpci_dev);
>      qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
>  }
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-pmem-pci: force virtio version 1
  2020-09-25 10:22 [PATCH] virtio-pmem-pci: force virtio version 1 Pankaj Gupta
  2020-09-25 10:23 ` David Hildenbrand
@ 2020-09-25 10:38 ` Cornelia Huck
  2020-09-25 11:49   ` Pankaj Gupta
  1 sibling, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2020-09-25 10:38 UTC (permalink / raw)
  To: Pankaj Gupta; +Cc: david, qemu-devel, mst

On Fri, 25 Sep 2020 12:22:51 +0200
Pankaj Gupta <pankaj.gupta.linux@gmail.com> wrote:

>  Qemu fails with below error when trying to run with virtio pmem:
> 
>  (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1:
>   device is modern-only, use disable-legacy=on

Oh, another one :(

>  
>  This patch fixes this by forcing virtio 1 with virtio-pmem.
> 
> fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem")
> Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> ---
>  hw/virtio/virtio-pmem-pci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
> index 21a457d151..2b2a0b1eae 100644
> --- a/hw/virtio/virtio-pmem-pci.c
> +++ b/hw/virtio/virtio-pmem-pci.c
> @@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
>      VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
>      DeviceState *vdev = DEVICE(&pmem_pci->vdev);
>  
> +    virtio_pci_force_virtio_1(vpci_dev);
>      qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
>  }
>  

The alternative would be to force virtio 1 only for 5.1 and later (see
https://lore.kernel.org/qemu-devel/20200921122506.82515-1-sgarzare@redhat.com/).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-pmem-pci: force virtio version 1
  2020-09-25 10:38 ` Cornelia Huck
@ 2020-09-25 11:49   ` Pankaj Gupta
  2020-09-25 12:19     ` Cornelia Huck
  0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Gupta @ 2020-09-25 11:49 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: David Hildenbrand, Qemu Developers, Michael S . Tsirkin

>
> >  Qemu fails with below error when trying to run with virtio pmem:
> >
> >  (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1:
> >   device is modern-only, use disable-legacy=on
>
> Oh, another one :(
:)
>
> >
> >  This patch fixes this by forcing virtio 1 with virtio-pmem.
> >
> > fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem")
> > Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> > ---
> >  hw/virtio/virtio-pmem-pci.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
> > index 21a457d151..2b2a0b1eae 100644
> > --- a/hw/virtio/virtio-pmem-pci.c
> > +++ b/hw/virtio/virtio-pmem-pci.c
> > @@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> >      VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
> >      DeviceState *vdev = DEVICE(&pmem_pci->vdev);
> >
> > +    virtio_pci_force_virtio_1(vpci_dev);
> >      qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
> >  }
> >
>
> The alternative would be to force virtio 1 only for 5.1 and later (see
> https://lore.kernel.org/qemu-devel/20200921122506.82515-1-sgarzare@redhat.com/).

Thanks for sharing this. It's still good to mark virtio pmem as a
modern virtio device.

Best regards,
Pankaj
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-pmem-pci: force virtio version 1
  2020-09-25 11:49   ` Pankaj Gupta
@ 2020-09-25 12:19     ` Cornelia Huck
  0 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2020-09-25 12:19 UTC (permalink / raw)
  To: Pankaj Gupta; +Cc: David Hildenbrand, Qemu Developers, Michael S . Tsirkin

On Fri, 25 Sep 2020 13:49:05 +0200
Pankaj Gupta <pankaj.gupta.linux@gmail.com> wrote:

> >  
> > >  Qemu fails with below error when trying to run with virtio pmem:
> > >
> > >  (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1:
> > >   device is modern-only, use disable-legacy=on  
> >
> > Oh, another one :(  
> :)
> >  
> > >
> > >  This patch fixes this by forcing virtio 1 with virtio-pmem.
> > >
> > > fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem")
> > > Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> > > ---
> > >  hw/virtio/virtio-pmem-pci.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
> > > index 21a457d151..2b2a0b1eae 100644
> > > --- a/hw/virtio/virtio-pmem-pci.c
> > > +++ b/hw/virtio/virtio-pmem-pci.c
> > > @@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> > >      VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
> > >      DeviceState *vdev = DEVICE(&pmem_pci->vdev);
> > >
> > > +    virtio_pci_force_virtio_1(vpci_dev);
> > >      qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
> > >  }
> > >  
> >
> > The alternative would be to force virtio 1 only for 5.1 and later (see
> > https://lore.kernel.org/qemu-devel/20200921122506.82515-1-sgarzare@redhat.com/).  
> 
> Thanks for sharing this. It's still good to mark virtio pmem as a
> modern virtio device.

If you don't really need to care about compat handling, forcing virtio
1 is fine.

Acked-by: Cornelia Huck <cohuck@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-25 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 10:22 [PATCH] virtio-pmem-pci: force virtio version 1 Pankaj Gupta
2020-09-25 10:23 ` David Hildenbrand
2020-09-25 10:38 ` Cornelia Huck
2020-09-25 11:49   ` Pankaj Gupta
2020-09-25 12:19     ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.