From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB7-0001F1-D9 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPqB1-0007ML-OV for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB1-0007M5-HX for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:47 -0500 From: Gerd Hoffmann Date: Mon, 23 Feb 2015 11:23:24 +0100 Message-Id: <1424687012-18524-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1424687012-18524-1-git-send-email-kraxel@redhat.com> References: <1424687012-18524-1-git-send-email-kraxel@redhat.com> Subject: [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: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori , "Michael S. Tsirkin" 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; pcidev_k->class_id = PCI_CLASS_DISPLAY_OTHER; } -- 1.8.3.1