]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
virtio-vga: fix virtio-vga bar ordering
authorAnthoine Bourgeois <anthoine.bourgeois@gmail.com>
Wed, 22 Apr 2020 21:54:54 +0000 (23:54 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 May 2020 14:25:02 +0000 (10:25 -0400)
With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility
with stdvga. By default, bar #2 is used by virtio modern io bar.
This bar is the last one introduce in the virtio pci bar layout and it's
crushed by the virtio-vga reordering. So virtio-vga and
modern-pio-notify are incompatible because virtio-vga failed to
initialize with this option.

This fix sets the modern io bar to the bar #5 to avoid conflict.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
Message-Id: <20200422215455.10244-1-anthoine.bourgeois@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-vga.c

index 2b4c2aa126c7eb2de452ae5c010cfd8229ca6d65..95757a6619ca9c2f1c81e4853aed9d3c8963e806 100644 (file)
@@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
      */
     vpci_dev->modern_mem_bar_idx = 2;
     vpci_dev->msix_bar_idx = 4;
+    vpci_dev->modern_io_bar_idx = 5;
 
     if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) {
         /*