summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2012-10-03 00:46:30 +0000
committerneel <neel@FreeBSD.org>2012-10-03 00:46:30 +0000
commit3e50e0220bcda77b0a8e06a5f6095a206368e01b (patch)
treeb84b43d3aeadade6200d9e500aa3fe063b4e7aac /sys/amd64/include
parentc17623c804ffef4eb832614f4e0c8806e8a06696 (diff)
downloadFreeBSD-src-3e50e0220bcda77b0a8e06a5f6095a206368e01b.zip
FreeBSD-src-3e50e0220bcda77b0a8e06a5f6095a206368e01b.tar.gz
Get rid of assumptions in the hypervisor that the host physical memory
associated with guest physical memory is contiguous. Rewrite vm_gpa2hpa() to get the GPA to HPA mapping by querying the nested page tables.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/vmm.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
index bb2f778..be22eec 100644
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -47,9 +47,11 @@ typedef int (*vmm_cleanup_func_t)(void);
typedef void * (*vmi_init_func_t)(struct vm *vm); /* instance specific apis */
typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip);
typedef void (*vmi_cleanup_func_t)(void *vmi);
-typedef int (*vmi_mmap_func_t)(void *vmi, vm_paddr_t gpa, vm_paddr_t hpa,
- size_t length, vm_memattr_t attr,
- int prot, boolean_t superpages_ok);
+typedef int (*vmi_mmap_set_func_t)(void *vmi, vm_paddr_t gpa,
+ vm_paddr_t hpa, size_t length,
+ vm_memattr_t attr, int prot,
+ boolean_t superpages_ok);
+typedef vm_paddr_t (*vmi_mmap_get_func_t)(void *vmi, vm_paddr_t gpa);
typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num,
uint64_t *retval);
typedef int (*vmi_set_register_t)(void *vmi, int vcpu, int num,
@@ -72,7 +74,8 @@ struct vmm_ops {
vmi_init_func_t vminit; /* vm-specific initialization */
vmi_run_func_t vmrun;
vmi_cleanup_func_t vmcleanup;
- vmi_mmap_func_t vmmmap;
+ vmi_mmap_set_func_t vmmmap_set;
+ vmi_mmap_get_func_t vmmmap_get;
vmi_get_register_t vmgetreg;
vmi_set_register_t vmsetreg;
vmi_get_desc_t vmgetdesc;
OpenPOWER on IntegriCloud