From patchwork Mon Feb 23 10:23:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 442404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D2896140111 for ; Mon, 23 Feb 2015 21:26:44 +1100 (AEDT) Received: from localhost ([::1]:42862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqDq-0006Kb-PI for incoming@patchwork.ozlabs.org; Mon, 23 Feb 2015 05:26:42 -0500 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 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1NANlZw012577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Feb 2015 05:23:47 -0500 Received: from nilsson.home.kraxel.org (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1NANj1J016385; Mon, 23 Feb 2015 05:23:46 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 2E61A82CB3; Mon, 23 Feb 2015 11:23:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori , "Michael S. Tsirkin" Subject: [Qemu-devel] [RfC PATCH 10/15] virtio-vga: virtio-1.0 adaptions [fixup] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org [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; }