Commit db1c056c authored by Paolo Bonzini's avatar Paolo Bonzini

kvm: vmx: Use the hardware provided GPA instead of page walk

As in the SVM patch, the guest physical address is passed by
VMX to x86_emulate_instruction already, so mark the GPA as available
in vcpu->arch.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ee106891
...@@ -6382,6 +6382,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) ...@@ -6382,6 +6382,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
EPT_VIOLATION_EXECUTABLE)) EPT_VIOLATION_EXECUTABLE))
? PFERR_PRESENT_MASK : 0; ? PFERR_PRESENT_MASK : 0;
vcpu->arch.gpa_available = true;
vcpu->arch.exit_qualification = exit_qualification; vcpu->arch.exit_qualification = exit_qualification;
return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0); return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0);
...@@ -6399,6 +6400,7 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu) ...@@ -6399,6 +6400,7 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
} }
ret = handle_mmio_page_fault(vcpu, gpa, true); ret = handle_mmio_page_fault(vcpu, gpa, true);
vcpu->arch.gpa_available = true;
if (likely(ret == RET_MMIO_PF_EMULATE)) if (likely(ret == RET_MMIO_PF_EMULATE))
return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) == return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) ==
EMULATE_DONE; EMULATE_DONE;
...@@ -8517,6 +8519,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) ...@@ -8517,6 +8519,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
u32 vectoring_info = vmx->idt_vectoring_info; u32 vectoring_info = vmx->idt_vectoring_info;
trace_kvm_exit(exit_reason, vcpu, KVM_ISA_VMX); trace_kvm_exit(exit_reason, vcpu, KVM_ISA_VMX);
vcpu->arch.gpa_available = false;
/* /*
* Flush logged GPAs PML buffer, this will make dirty_bitmap more * Flush logged GPAs PML buffer, this will make dirty_bitmap more
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment