summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/vmm_instruction_emul.h
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-05-25 00:57:24 +0000
committerneel <neel@FreeBSD.org>2014-05-25 00:57:24 +0000
commitffc6a3825939d41297e840fd814e632c1e9beafa (patch)
tree88b474b3403d076cec0ddc0873ec0df3dbc90f68 /sys/amd64/include/vmm_instruction_emul.h
parent505c6cdc05fb89d0866357abe117e92040168175 (diff)
downloadFreeBSD-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.h6
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.
*
OpenPOWER on IntegriCloud