From bc92e4e97ed62efa61ba983f57dfe33f10fe1d88 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 9 Nov 2015 19:23:42 -0500 Subject: kvm-all: PAGE_SIZE should be real host page size 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 Message-Id: <1447115022-4142-1-git-send-email-drjones@redhat.com> Signed-off-by: Paolo Bonzini --- kvm-all.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index c648b814ec..a45c92bd1c 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -45,8 +45,10 @@ #include #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 -- cgit v1.2.3