From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB3-0001BD-Qu for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPqB2-0007N3-LT for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB2-0007MU-DL for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:48 -0500 From: Gerd Hoffmann Date: Mon, 23 Feb 2015 11:23:26 +0100 Message-Id: <1424687012-18524-11-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 10/15] virtio-vga: 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" [root@fedora ~]# bin/lspci -vvs2 00:02.0 VGA compatible controller: Red Hat, Inc Device 1050 (rev 01) (prog-if 00 [VGA controller]) Subsystem: Red Hat, Inc Device 1100 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- --- hw/display/virtio-vga.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 176821b..0e48ba9 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -79,6 +79,12 @@ static int virtio_vga_init(VirtIOPCIProxy *vpci_dev) VGACommonState *vga = &vvga->vga; qdev_set_parent_bus(DEVICE(g), BUS(&vpci_dev->bus)); + /* force virtio-1.0 */ + vpci_dev->flags &= ~VIRTIO_PCI_FLAG_DISABLE_MODERN; + vpci_dev->flags |= VIRTIO_PCI_FLAG_DISABLE_LEGACY; + /* avoid conflicts with vga framebuffer @ bar 2 */ + vpci_dev->modern_mem_bar = 0; + vpci_dev->msix_bar = 4; if (qdev_init(DEVICE(g)) < 0) { return -1; } @@ -124,9 +130,6 @@ static void virtio_vga_class_init(ObjectClass *klass, void *data) k->init = virtio_vga_init; pcidev_k->romfile = "vgabios-virtio.bin"; - 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_VGA; } -- 1.8.3.1