diff options
author | neel <neel@FreeBSD.org> | 2014-05-25 00:57:24 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-05-25 00:57:24 +0000 |
commit | ffc6a3825939d41297e840fd814e632c1e9beafa (patch) | |
tree | 88b474b3403d076cec0ddc0873ec0df3dbc90f68 /sys/amd64/include/vmm_instruction_emul.h | |
parent | 505c6cdc05fb89d0866357abe117e92040168175 (diff) | |
download | FreeBSD-src-ffc6a3825939d41297e840fd814e632c1e9beafa.zip FreeBSD-src-ffc6a3825939d41297e840fd814e632c1e9beafa.tar.gz |
Do the linear address calculation for the ins/outs emulation using a new
API function 'vie_calculate_gla()'.
While the current implementation is simplistic it forms the basis of doing
segmentation checks if the guest is in 32-bit protected mode.
Diffstat (limited to 'sys/amd64/include/vmm_instruction_emul.h')
-rw-r--r-- | sys/amd64/include/vmm_instruction_emul.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/include/vmm_instruction_emul.h b/sys/amd64/include/vmm_instruction_emul.h index 1703feb..5e6862b 100644 --- a/sys/amd64/include/vmm_instruction_emul.h +++ b/sys/amd64/include/vmm_instruction_emul.h @@ -67,6 +67,9 @@ int vie_canonical_check(enum vm_cpu_mode cpu_mode, uint64_t gla); uint64_t vie_size2mask(int size); +int vie_calculate_gla(enum vm_cpu_mode cpu_mode, int addrsize, + enum vm_reg_name seg, struct seg_desc *desc, uint64_t off, uint64_t *gla); + #ifdef _KERNEL /* * APIs to fetch and decode the instruction from nested page fault handler. @@ -89,9 +92,6 @@ int vmm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, void vie_init(struct vie *vie); -uint64_t vie_segbase(enum vm_reg_name segment, enum vm_cpu_mode cpu_mode, - const struct seg_desc *desc); - /* * Decode the instruction fetched into 'vie' so it can be emulated. * |