[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether ba
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1 |
Date: |
Mon, 12 Sep 2016 19:54:29 +0300 |
On Mon, Sep 12, 2016 at 06:42:46PM +0200, Maxime Coquelin wrote:
>
>
> On 09/12/2016 02:28 PM, Cornelia Huck wrote:
> > On Fri, 9 Sep 2016 15:10:06 +0200
> > Maxime Coquelin <address@hidden> wrote:
> >
> > > This patch adds virtio_test_backend_virtio_1() function to
> > > check whether backend supports VIRTIO_F_VERSION_1 before the
> > > negociation takes place.
> >
> > s/negociation/negotiation/
> >
> > >
> > > Cc: Cornelia Huck <address@hidden>
> > > Cc: Marcel Apfelbaum <address@hidden>
> > > Cc: Michael S. Tsirkin <address@hidden>
> > > Cc: address@hidden
> > > Signed-off-by: Maxime Coquelin <address@hidden>
> > > ---
> > > hw/virtio/virtio.c | 13 +++++++++++++
> > > include/hw/virtio/virtio.h | 1 +
> > > 2 files changed, 14 insertions(+)
> > >
> > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> > > index 74c085c..8b30b69 100644
> > > --- a/hw/virtio/virtio.c
> > > +++ b/hw/virtio/virtio.c
> > > @@ -1481,6 +1481,19 @@ void virtio_vmstate_save(QEMUFile *f, void
> > > *opaque, size_t size)
> > > virtio_save(VIRTIO_DEVICE(opaque), f);
> > > }
> > >
> > > +bool virtio_test_backend_virtio_1(VirtIODevice *vdev, Error **errp)
> > > +{
> > > + VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
> > > + uint64_t feature;
> >
> > As others had requested, I'd prefer setting this to 0 as well.
> >
> > With that changed:
> >
> > Reviewed-by: Cornelia Huck <address@hidden>
> Thanks Cornelia,
> Note that if everyone agree to have patch adding pre_plugged,
> this series will not be needed anymore.
>
> Regards,
> Maxime
Yes - that one needs testing for ccw and mmio.
--
MST
- Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1, (continued)