diff options
author | neel <neel@FreeBSD.org> | 2014-05-27 04:26:22 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-05-27 04:26:22 +0000 |
commit | 4b40e47cf8359d8523d7bc430a69b6a9d2858f99 (patch) | |
tree | 4797cc8702eb6792ba901cc3743ab04d42013fa6 /sys/amd64/include/vmm_instruction_emul.h | |
parent | 79126286127856e52fef833f89f41ffc8235c951 (diff) | |
download | FreeBSD-src-4b40e47cf8359d8523d7bc430a69b6a9d2858f99.zip FreeBSD-src-4b40e47cf8359d8523d7bc430a69b6a9d2858f99.tar.gz |
Add segment protection and limits violation checks in vie_calculate_gla()
for 32-bit x86 guests.
Tested using ins/outs executed in a FreeBSD/i386 guest.
Diffstat (limited to 'sys/amd64/include/vmm_instruction_emul.h')
-rw-r--r-- | sys/amd64/include/vmm_instruction_emul.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/amd64/include/vmm_instruction_emul.h b/sys/amd64/include/vmm_instruction_emul.h index 5e6862b..e4c408b 100644 --- a/sys/amd64/include/vmm_instruction_emul.h +++ b/sys/amd64/include/vmm_instruction_emul.h @@ -29,6 +29,8 @@ #ifndef _VMM_INSTRUCTION_EMUL_H_ #define _VMM_INSTRUCTION_EMUL_H_ +#include <sys/mman.h> + /* * Callback functions to read and write memory regions. */ @@ -67,8 +69,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); +int vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum vm_reg_name seg, + struct seg_desc *desc, uint64_t off, int length, int addrsize, int prot, + uint64_t *gla); #ifdef _KERNEL /* |