diff options
author | neel <neel@FreeBSD.org> | 2014-09-13 22:16:40 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-09-13 22:16:40 +0000 |
commit | 32e0378b350c93dba19c615a6a91afeef12486e2 (patch) | |
tree | 70a00007f69968f48c3915bfacf511d0235b5081 /sys/amd64/include/vmm_instruction_emul.h | |
parent | 45bb1086d665c83d260280f8b94a5d61ed0756f3 (diff) | |
download | FreeBSD-src-32e0378b350c93dba19c615a6a91afeef12486e2.zip FreeBSD-src-32e0378b350c93dba19c615a6a91afeef12486e2.tar.gz |
AMD processors that have the SVM decode assist capability will store the
instruction bytes in the VMCB on a nested page fault. This is useful because
it saves having to walk the guest page tables to fetch the instruction.
vie_init() now takes two additional parameters 'inst_bytes' and 'inst_len'
that map directly to 'vie->inst[]' and 'vie->num_valid'.
The instruction emulation handler skips calling 'vmm_fetch_instruction()'
if 'vie->num_valid' is non-zero.
The use of this capability can be turned off by setting the sysctl/tunable
'hw.vmm.svm.disable_npf_assist' to '1'.
Reviewed by: Anish Gupta (akgupt3@gmail.com)
Discussed with: grehan
Diffstat (limited to 'sys/amd64/include/vmm_instruction_emul.h')
-rw-r--r-- | sys/amd64/include/vmm_instruction_emul.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/include/vmm_instruction_emul.h b/sys/amd64/include/vmm_instruction_emul.h index bbd3d88..516cc01 100644 --- a/sys/amd64/include/vmm_instruction_emul.h +++ b/sys/amd64/include/vmm_instruction_emul.h @@ -93,7 +93,7 @@ int vmm_fetch_instruction(struct vm *vm, int cpuid, int vmm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa); -void vie_init(struct vie *vie); +void vie_init(struct vie *vie, const char *inst_bytes, int inst_length); /* * Decode the instruction fetched into 'vie' so it can be emulated. |