From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR1aV-000229-NB for qemu-devel@nongnu.org; Thu, 26 Feb 2015 11:47:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR1aU-0007lM-AA for qemu-devel@nongnu.org; Thu, 26 Feb 2015 11:46:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR1aU-0007lB-0p for qemu-devel@nongnu.org; Thu, 26 Feb 2015 11:46:58 -0500 Message-ID: <54EF4DFD.6090308@redhat.com> Date: Thu, 26 Feb 2015 11:46:53 -0500 From: Max Reitz MIME-Version: 1.0 References: <1424687012-18524-1-git-send-email-kraxel@redhat.com> <1424687012-18524-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1424687012-18524-9-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RfC PATCH 08/15] virtio-gpu-pci: virtio-1.0 adaptions [fixup] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: Anthony Liguori , "Michael S. Tsirkin" On 2015-02-23 at 05:23, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/display/virtio-gpu-pci.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c > index 77c5e06..791ee8b 100644 > --- a/hw/display/virtio-gpu-pci.c > +++ b/hw/display/virtio-gpu-pci.c > @@ -28,10 +28,10 @@ static int virtio_gpu_pci_init(VirtIOPCIProxy *vpci_dev) > DeviceState *vdev = DEVICE(&vgpu->vdev); > > qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus)); > - if (qdev_init(vdev) < 0) { > - return -1; > - } > - return 0; > + /* force virtio-1.0 */ > + vpci_dev->flags &= ~VIRTIO_PCI_FLAG_DISABLE_MODERN; > + vpci_dev->flags |= VIRTIO_PCI_FLAG_DISABLE_LEGACY; > + return qdev_init(vdev); > } > > static void virtio_gpu_pci_class_init(ObjectClass *klass, void *data) > @@ -43,9 +43,6 @@ static void virtio_gpu_pci_class_init(ObjectClass *klass, void *data) > set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); > dc->props = virtio_gpu_pci_properties; > k->init = virtio_gpu_pci_init; > - pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET; > - pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_GPU; > - pcidev_k->revision = VIRTIO_PCI_ABI_VERSION; So I guess this is the reason why you didn't update pci-ids.txt in patch 7. This seems to be in line with the changes made in patch 1; however, I fail to see where VirtIODevice.device_id is set so that virtio_bus_get_vdev_id() returns it when called from virtio_pci_device_plugged()... Maybe I'll find it yet. Max > pcidev_k->class_id = PCI_CLASS_DISPLAY_OTHER; > }