diff mbox

[Bug,1384892] Re: RTL8168 NIC VFIO not working anymore since QEMU 2.1

Message ID 20141106231820.1158.51330.malone@wampee.canonical.com
State New
Headers show

Commit Message

Alex Williamson Nov. 6, 2014, 11:18 p.m. UTC
Does this improve anything?  Reviewing the quirk seems to show there's a
bug in how we're writing to the MSI-X table.  Not sure how it worked
before.  Tested this with a Win8.1 VM and assigned RTL8111/8168/8411.
Thanks.
diff mbox

Patch

--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -1834,8 +1834,8 @@  static void vfio_rtl8168_window_quirk_write(void *opaque, hwaddr addr,
                         vdev->host.bus, vdev->host.slot, vdev->host.function);
 
                 io_mem_write(&vdev->pdev.msix_table_mmio,
-                             (hwaddr)(quirk->data.address_match & 0xfff),
-                             data, size);
+                             (hwaddr)(data & 0xfff),
+                             (uint64_t)quirk->data.address_mask, size);
             }
 
             quirk->data.flags = 1;