summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm/intel
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-09-13 22:16:40 +0000
committerneel <neel@FreeBSD.org>2014-09-13 22:16:40 +0000
commit32e0378b350c93dba19c615a6a91afeef12486e2 (patch)
tree70a00007f69968f48c3915bfacf511d0235b5081 /sys/amd64/vmm/intel
parent45bb1086d665c83d260280f8b94a5d61ed0756f3 (diff)
downloadFreeBSD-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/vmm/intel')
-rw-r--r--sys/amd64/vmm/intel/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 348cc2a..8e35781 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -1847,6 +1847,7 @@ vmexit_inst_emul(struct vm_exit *vmexit, uint64_t gpa, uint64_t gla)
vmexit->u.inst_emul.cs_d = 0;
break;
}
+ vie_init(&vmexit->u.inst_emul.vie, NULL, 0);
}
static int
OpenPOWER on IntegriCloud