diff options
| author | Neel Natu <neel@FreeBSD.org> | 2015-06-28 01:21:55 +0000 |
|---|---|---|
| committer | Neel Natu <neel@FreeBSD.org> | 2015-06-28 01:21:55 +0000 |
| commit | 00ebaa84bca9f25f87f71ee639f7612afecbd380 (patch) | |
| tree | e72b32c6a72fb1e7f1b2f913718581599207091c /lib/libvmmapi | |
| parent | ba2b1f8c1d2cfd18c3ef079ed852d921e2bf137d (diff) | |
Notes
Diffstat (limited to 'lib/libvmmapi')
| -rw-r--r-- | lib/libvmmapi/vmmapi.c | 12 | ||||
| -rw-r--r-- | lib/libvmmapi/vmmapi.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 982887688664..0c158456db4d 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -979,6 +979,18 @@ gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, return (error); } +int +vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, + uint64_t gla, int prot, uint64_t *gpa) +{ + int error, fault; + + error = gla2gpa(ctx, vcpu, paging, gla, prot, &fault, gpa); + if (fault) + error = fault; + return (error); +} + #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 06b29302640d..d001cd8ee423 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -63,6 +63,8 @@ int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); +int vm_gla2gpa(struct vmctx *, int vcpuid, struct vm_guest_paging *paging, + uint64_t gla, int prot, uint64_t *gpa); uint32_t vm_get_lowmem_limit(struct vmctx *ctx); void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); void vm_set_memflags(struct vmctx *ctx, int flags); |
