adds kvm_get_phys_addr (hack)master
authorDiego Ongaro <[email protected]>
Tue, 21 Apr 2009 22:25:07 +0000 (21 17:25 -0500)
committerDiego Ongaro <[email protected]>
Tue, 21 Apr 2009 22:43:55 +0000 (21 17:43 -0500)
qemu/pc-bios/bios.bin
qemu/qemu-kvm.c

index 9f8a49d..7169fd3 100644 (file)
Binary files a/qemu/pc-bios/bios.bin and b/qemu/pc-bios/bios.bin differ
index 1f81bf2..afa3310 100644 (file)
@@ -1044,3 +1044,15 @@ int qemu_kvm_unregister_coalesced_mmio(target_phys_addr_t addr,
 {
     return kvm_unregister_coalesced_mmio(kvm_context, addr, size);
 }
+
+unsigned long kvm_get_phys_addr(unsigned long gvaddr)
+{
+    unsigned long gpaddr;
+    kvm_save_registers(vcpu->env);
+    gpaddr = (unsigned long) cpu_get_phys_page_debug(vcpu->env, gvaddr);
+    if (gpaddr == -1)
+        return -1;
+    else
+        return gpaddr | (gvaddr & 0xFFF);
+}
+