[PATCH] pci-assign: Fix MSI-X MMIO page registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The MSI-X page must start below the address that comes after the end of
a region. Otherwise we risk to register it twice. This bug existed since
day #1 of the MSI-X support and was now reveal by

memory.c:1201: memory_region_add_subregion_common: Assertion `!subregion->parent' failed.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---
 hw/device-assignment.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 054b059..11efd16 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -246,7 +246,7 @@ static void assigned_dev_iomem_setup(PCIDevice *pci_dev, int region_num,
 
         /* deal with MSI-X MMIO page */
         if (real_region->base_addr <= r_dev->msix_table_addr &&
-                real_region->base_addr + real_region->size >=
+                real_region->base_addr + real_region->size >
                 r_dev->msix_table_addr) {
             int offset = r_dev->msix_table_addr - real_region->base_addr;
 
-- 
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux