]> git.proxmox.com Git - mirror_qemu.git/blobdiff - xen-hvm.c
smbios: Move table build tools into an include file.
[mirror_qemu.git] / xen-hvm.c
index 01ee25de21b72640852b43deb52b004066db3dc7..98ea44fdf34af0900e1f722870833d07e550a6e3 100644 (file)
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -9,7 +9,6 @@
  */
 
 #include "qemu/osdep.h"
-#include <sys/mman.h>
 
 #include "cpu.h"
 #include "hw/pci/pci.h"
@@ -567,7 +566,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
 {
     hwaddr npages = size >> TARGET_PAGE_BITS;
     const int width = sizeof(unsigned long) * 8;
-    unsigned long bitmap[(npages + width - 1) / width];
+    unsigned long bitmap[DIV_ROUND_UP(npages, width)];
     int rc, i, j;
     const XenPhysmap *physmap = NULL;