[PATCH] kvm: align ram_size to page boundary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kvm is not able to execute out of partial pages; align the RAM size
so partial pages aren't present.

Reported-by: Michael Tokarev <mjt@xxxxxxxxxx>
Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 kvm-all.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kvm-all.c b/kvm-all.c
index 4ea7d85..482768f 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1311,6 +1311,8 @@ int kvm_init(void)
 
     cpu_interrupt_handler = kvm_handle_interrupt;
 
+    ram_size = TARGET_PAGE_ALIGN(ram_size);
+
     return 0;
 
 err:
-- 
1.7.10.1

--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux