Skip to content

Commit db1c056

Browse files
committed
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: Paolo Bonzini <pbonzini@redhat.com>
1 parent ee10689 commit db1c056

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/vmx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6382,6 +6382,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
63826382
EPT_VIOLATION_EXECUTABLE))
63836383
? PFERR_PRESENT_MASK : 0;
63846384

6385+
vcpu->arch.gpa_available = true;
63856386
vcpu->arch.exit_qualification = exit_qualification;
63866387

63876388
return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0);
@@ -6399,6 +6400,7 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
63996400
}
64006401

64016402
ret = handle_mmio_page_fault(vcpu, gpa, true);
6403+
vcpu->arch.gpa_available = true;
64026404
if (likely(ret == RET_MMIO_PF_EMULATE))
64036405
return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) ==
64046406
EMULATE_DONE;
@@ -8517,6 +8519,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
85178519
u32 vectoring_info = vmx->idt_vectoring_info;
85188520

85198521
trace_kvm_exit(exit_reason, vcpu, KVM_ISA_VMX);
8522+
vcpu->arch.gpa_available = false;
85208523

85218524
/*
85228525
* Flush logged GPAs PML buffer, this will make dirty_bitmap more

0 commit comments

Comments
 (0)