summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/sgx.c
diff options
context:
space:
mode:
authorHou Wenlong <houwenlong.hwl@antgroup.com>2022-07-01 17:24:13 +0800
committerSean Christopherson <seanjc@google.com>2022-07-12 22:31:12 +0000
commit6e1d2a3f25d518cc3d9703115c6fbec704a6c5bb (patch)
tree71e4b4a4c0046d3e42b1484711a1dc506b084fb3 /arch/x86/kvm/vmx/sgx.c
parent156b9d76e8822f2956c15029acf2d4b171502f3a (diff)
downloadlinux-6e1d2a3f25d518cc3d9703115c6fbec704a6c5bb.tar.bz2
KVM: x86/mmu: Replace UNMAPPED_GVA with INVALID_GPA for gva_to_gpa()
The result of gva_to_gpa() is physical address not virtual address, it is odd that UNMAPPED_GVA macro is used as the result for physical address. Replace UNMAPPED_GVA with INVALID_GPA and drop UNMAPPED_GVA macro. No functional change intended. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/6104978956449467d3c68f1ad7f2c2f6d771d0ee.1656667239.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/vmx/sgx.c')
-rw-r--r--arch/x86/kvm/vmx/sgx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/sgx.c b/arch/x86/kvm/vmx/sgx.c
index 35e7ec91ae86..7ae8aa73724c 100644
--- a/arch/x86/kvm/vmx/sgx.c
+++ b/arch/x86/kvm/vmx/sgx.c
@@ -79,7 +79,7 @@ static int sgx_gva_to_gpa(struct kvm_vcpu *vcpu, gva_t gva, bool write,
else
*gpa = kvm_mmu_gva_to_gpa_read(vcpu, gva, &ex);
- if (*gpa == UNMAPPED_GVA) {
+ if (*gpa == INVALID_GPA) {
kvm_inject_emulated_page_fault(vcpu, &ex);
return -EFAULT;
}