qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size
@ 2015-11-10  0:23 Andrew Jones
  2015-11-10 15:41 ` Paolo Bonzini
  2015-11-10 16:29 ` Peter Maydell
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Jones @ 2015-11-10  0:23 UTC (permalink / raw)
  To: qemu-devel, kvm; +Cc: pbonzini

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>
---
 kvm-all.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 1bc12737723c3..de9ff5971fb3b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -45,8 +45,10 @@
 #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
 
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-10 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10  0:23 [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size Andrew Jones
2015-11-10 15:41 ` Paolo Bonzini
2015-11-10 15:57   ` Andrew Jones
2015-11-10 16:15     ` Paolo Bonzini
2015-11-10 16:29 ` Peter Maydell
2015-11-10 16:59   ` Andrew Jones
2015-11-10 17:02     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).