qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Liguori <aliguori@amazon.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [RfC PATCH 10/15] virtio-vga: virtio-1.0 adaptions [fixup]
Date: Mon, 23 Feb 2015 11:23:26 +0100	[thread overview]
Message-ID: <1424687012-18524-11-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1424687012-18524-1-git-send-email-kraxel@redhat.com>

[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- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 10
	Region 0: Memory at fe800000 (64-bit, prefetchable) [size=512K]
	Region 2: Memory at fe000000 (32-bit, prefetchable) [size=8M]
	Region 4: Memory at febd0000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at febc0000 [disabled] [size=64K]
	Capabilities: [84] MSI-X: Enable+ Count=3 Masked-
		Vector table: BAR=4 offset=00000000
		PBA: BAR=4 offset=00000800
	Capabilities: [70] Vendor Specific Information: VirtIO: Notify
		BAR=0 offset=00003000 size=00040000 multiplier=00001000
	Capabilities: [60] Vendor Specific Information: VirtIO: DeviceCfg
		BAR=0 offset=00002000 size=00001000
	Capabilities: [50] Vendor Specific Information: VirtIO: ISR
		BAR=0 offset=00001000 size=00001000
	Capabilities: [40] Vendor Specific Information: VirtIO: CommonCfg
		BAR=0 offset=00000000 size=00001000
	Kernel driver in use: virtio-pci

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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

  parent reply	other threads:[~2015-02-23 10:23 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 10:23 [Qemu-devel] [RfC PATCH 00/15] virtio-gpu: Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 01/15] virtio-pci: add flags to enable/disable legacy/modern Gerd Hoffmann
2015-02-26 16:41   ` Max Reitz
2015-02-27 11:15     ` Gerd Hoffmann
2015-02-27 14:20       ` Max Reitz
2015-03-02 12:34   ` Michael S. Tsirkin
2015-03-02 13:25     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 02/15] virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 03/15] virtio-pci: make pci bars configurable Gerd Hoffmann
2015-03-02 12:30   ` Michael S. Tsirkin
2015-03-02 13:10     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 04/15] virtio-pci: make modern bar 64bit prefetchable Gerd Hoffmann
2015-03-02 12:33   ` Michael S. Tsirkin
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 05/15] virtio-gpu/2d: add hardware spec include file Gerd Hoffmann
2015-02-25 20:04   ` Max Reitz
2015-02-27  9:37     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 06/15] virtio-gpu/2d: add virtio gpu core code Gerd Hoffmann
2015-02-26 16:08   ` Max Reitz
2015-02-27 11:10     ` Gerd Hoffmann
2015-02-27 14:20       ` Max Reitz
2015-02-27 14:31         ` Gerd Hoffmann
2015-02-27 14:33           ` Max Reitz
2015-03-01 22:03     ` Dave Airlie
2015-03-02 12:57       ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 07/15] virtio-gpu-pci: add virtio pci support Gerd Hoffmann
2015-02-26 16:25   ` Max Reitz
2015-02-27 11:13     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 08/15] virtio-gpu-pci: virtio-1.0 adaptions [fixup] Gerd Hoffmann
2015-02-26 16:46   ` Max Reitz
2015-02-27 11:18     ` Gerd Hoffmann
2015-02-27 14:30       ` Max Reitz
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 09/15] virtio-vga: add virtio gpu device with vga compatibility Gerd Hoffmann
2015-02-23 10:23 ` Gerd Hoffmann [this message]
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 11/15] virtio-vga: add '-vga virtio' support Gerd Hoffmann
2015-02-24 16:26   ` Marc-André Lureau
2015-02-27  9:27     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 12/15] virtio-vga: add vgabios configuration Gerd Hoffmann
2015-02-26 18:13   ` Max Reitz
2015-02-27 11:25     ` Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 13/15] virtio-vga: add vgabios binary Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 14/15] virtio-gpu: add to display-vga test Gerd Hoffmann
2015-02-23 10:23 ` [Qemu-devel] [RfC PATCH 15/15] [hack] virtio-gpu: maskerade as -device VGA Gerd Hoffmann
2015-02-26 18:40 ` [Qemu-devel] [RfC PATCH 00/15] virtio-gpu: Max Reitz
2015-02-27 11:30   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424687012-18524-11-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).