virtio: fix virtio-pci

virtio-pci calls pci_enable_{io,mem}bar with the bar number,
but the functions expect the bar base register offset.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/src/hw/virtio-pci.c b/src/hw/virtio-pci.c
index 8efc826..e5c2c33 100644
--- a/src/hw/virtio-pci.c
+++ b/src/hw/virtio-pci.c
@@ -449,7 +449,7 @@
             switch (vp_cap->mode) {
             case VP_ACCESS_IO:
             {
-                u32 addr = pci_enable_iobar(pci, vp_cap->bar);
+                u32 addr = pci_enable_iobar(pci, base);
                 if (!addr)
                     return;
                 vp_cap->ioaddr = addr + offset;
@@ -458,7 +458,7 @@
             }
             case VP_ACCESS_MMIO:
             {
-                void *addr = pci_enable_membar(pci, vp_cap->bar);
+                void *addr = pci_enable_membar(pci, base);
                 if (!addr)
                     return;
                 vp_cap->memaddr = addr + offset;