diff options
author | Andre Przywara <andre.przywara@amd.com> | 2010-12-21 05:12:07 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:31:07 -0500 |
commit | dc25e89e07d5ef31c476117d2c76b34dbb22196c (patch) | |
tree | 9fef452c4bd0704b9d74512a9a58dc5d5b742d53 /arch/x86/kvm/vmx.c | |
parent | df4f3108562dc6f6ae6648f2698df7f4c9acf52d (diff) |
KVM: SVM: copy instruction bytes from VMCB
In case of a nested page fault or an intercepted #PF newer SVM
implementations provide a copy of the faulting instruction bytes
in the VMCB.
Use these bytes to feed the instruction emulator and avoid the costly
guest instruction fetch in this case.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f3c60fb8d95e..736f83955ce9 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3055,7 +3055,7 @@ static int handle_exception(struct kvm_vcpu *vcpu) | |||
3055 | 3055 | ||
3056 | if (kvm_event_needs_reinjection(vcpu)) | 3056 | if (kvm_event_needs_reinjection(vcpu)) |
3057 | kvm_mmu_unprotect_page_virt(vcpu, cr2); | 3057 | kvm_mmu_unprotect_page_virt(vcpu, cr2); |
3058 | return kvm_mmu_page_fault(vcpu, cr2, error_code); | 3058 | return kvm_mmu_page_fault(vcpu, cr2, error_code, NULL, 0); |
3059 | } | 3059 | } |
3060 | 3060 | ||
3061 | if (vmx->rmode.vm86_active && | 3061 | if (vmx->rmode.vm86_active && |
@@ -3502,7 +3502,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) | |||
3502 | 3502 | ||
3503 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); | 3503 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); |
3504 | trace_kvm_page_fault(gpa, exit_qualification); | 3504 | trace_kvm_page_fault(gpa, exit_qualification); |
3505 | return kvm_mmu_page_fault(vcpu, gpa, exit_qualification & 0x3); | 3505 | return kvm_mmu_page_fault(vcpu, gpa, exit_qualification & 0x3, NULL, 0); |
3506 | } | 3506 | } |
3507 | 3507 | ||
3508 | static u64 ept_rsvd_mask(u64 spte, int level) | 3508 | static u64 ept_rsvd_mask(u64 spte, int level) |