We've already got it defined, use it. Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx> --- hw/device-assignment.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index a6d3a5b..7e52615 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1471,7 +1471,7 @@ static void msix_reset(AssignedDevice *dev) return; } - memset(dev->msix_table, 0, 0x1000); + memset(dev->msix_table, 0, MSIX_PAGE_SIZE); for (i = 0, entry = dev->msix_table; i < dev->msix_max; i++, entry++) { entry->ctrl = 0x1; /* Masked */ @@ -1480,7 +1480,7 @@ static void msix_reset(AssignedDevice *dev) static int assigned_dev_register_msix_mmio(AssignedDevice *dev) { - dev->msix_table = mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, + dev->msix_table = mmap(NULL, MSIX_PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0, 0); if (dev->msix_table == MAP_FAILED) { fprintf(stderr, "fail allocate msix_table! %s\n", strerror(errno)); @@ -1502,7 +1502,7 @@ static void assigned_dev_unregister_msix_mmio(AssignedDevice *dev) memory_region_destroy(&dev->mmio); - if (munmap(dev->msix_table, 0x1000) == -1) { + if (munmap(dev->msix_table, MSIX_PAGE_SIZE) == -1) { fprintf(stderr, "error unmapping msix_table! %s\n", strerror(errno)); } -- 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