]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Store gpa as gpa_t, not unsigned long, when unprotecting for retry
authorSean Christopherson <seanjc@google.com>
Sat, 31 Aug 2024 00:15:22 +0000 (17:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 10 Sep 2024 03:16:22 +0000 (20:16 -0700)
commit9c19129e535bfff85bdfcb5a804e19e5aae935b2
tree7314f5fa442e646862a81392ac5664881cb25ef1
parent019f3f84a40c88b68ca4d455306b92c20733e784
KVM: x86: Store gpa as gpa_t, not unsigned long, when unprotecting for retry

Store the gpa used to unprotect the faulting gfn for retry as a gpa_t, not
an unsigned long.  This fixes a bug where 32-bit KVM would unprotect and
retry the wrong gfn if the gpa had bits 63:32!=0.  In practice, this bug
is functionally benign, as unprotecting the wrong gfn is purely a
performance issue (thanks to the anti-infinite-loop logic).  And of course,
almost no one runs 32-bit KVM these days.

Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Link: https://lore.kernel.org/r/20240831001538.336683-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c