]> git.proxmox.com Git - mirror_qemu.git/blobdiff - exec.c
Add KVM support to QEMU
[mirror_qemu.git] / exec.c
diff --git a/exec.c b/exec.c
index 697a19eb255c0b99930533fe557effe8ab384a06..ef1072b6dd63c69a7ad568759c1f401c3986d464 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -39,6 +39,7 @@
 #include "tcg.h"
 #include "hw/hw.h"
 #include "osdep.h"
+#include "kvm.h"
 #if defined(CONFIG_USER_ONLY)
 #include <qemu.h>
 #endif
@@ -2212,6 +2213,9 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
         kqemu_set_phys_mem(start_addr, size, phys_offset);
     }
 #endif
+    if (kvm_enabled())
+        kvm_set_phys_mem(start_addr, size, phys_offset);
+
     size = (size + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
     end_addr = start_addr + (target_phys_addr_t)size;
     for(addr = start_addr; addr != end_addr; addr += TARGET_PAGE_SIZE) {