[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RfC PATCH 10/15] virtio-vga: virtio-1.0 adaptions [fixup]
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [RfC PATCH 10/15] virtio-vga: virtio-1.0 adaptions [fixup] |
Date: |
Mon, 23 Feb 2015 11:23:26 +0100 |
address@hidden ~]# 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 <address@hidden>
---
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
- [Qemu-devel] [RfC PATCH 00/15] virtio-gpu:, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 12/15] virtio-vga: add vgabios configuration, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 03/15] virtio-pci: make pci bars configurable, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 10/15] virtio-vga: virtio-1.0 adaptions [fixup],
Gerd Hoffmann <=
- [Qemu-devel] [RfC PATCH 14/15] virtio-gpu: add to display-vga test, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 15/15] [hack] virtio-gpu: maskerade as -device VGA, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 09/15] virtio-vga: add virtio gpu device with vga compatibility, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 04/15] virtio-pci: make modern bar 64bit prefetchable, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 02/15] virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller, Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 08/15] virtio-gpu-pci: virtio-1.0 adaptions [fixup], Gerd Hoffmann, 2015/02/23
- [Qemu-devel] [RfC PATCH 07/15] virtio-gpu-pci: add virtio pci support, Gerd Hoffmann, 2015/02/23