]> git.proxmox.com Git - mirror_qemu.git/commitdiff
kvm-all: PAGE_SIZE should be real host page size
authorAndrew Jones <drjones@redhat.com>
Tue, 10 Nov 2015 00:23:42 +0000 (19:23 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 14:24:34 +0000 (15:24 +0100)
Just noticed this while grepping TARGET_PAGE_SIZE for an unrelated
reason. I didn't use qemu_real_host_page_size as kvm_set_phys_mem()
does, because we'd need to make sure page_size_init() has run first.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Message-Id: <1447115022-4142-1-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
kvm-all.c

index c648b814ecb486a43c4c9120816a79bd6b996cb8..a45c92bd1ccfeda9595429252a978587a500a607 100644 (file)
--- a/kvm-all.c
+++ b/kvm-all.c
 #include <sys/eventfd.h>
 #endif
 
-/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */
-#define PAGE_SIZE TARGET_PAGE_SIZE
+/* KVM uses PAGE_SIZE in its definition of KVM_COALESCED_MMIO_MAX. We
+ * need to use the real host PAGE_SIZE, as that's what KVM will use.
+ */
+#define PAGE_SIZE getpagesize()
 
 //#define DEBUG_KVM