diff options
author | 2024-02-15 15:29:03 +0000 | |
---|---|---|
committer | 2024-02-20 07:37:45 -0800 | |
commit | 9e7325acb3dc8df8a6370ebc18aef107aae17ef0 (patch) | |
tree | bf4788b339005f914c08dcc6bb0006d11fad6a94 /include | |
parent | KVM: pfncache: include page offset in uhva and use it consistently (diff) | |
download | linux-9e7325acb3dc8df8a6370ebc18aef107aae17ef0.tar.gz linux-9e7325acb3dc8df8a6370ebc18aef107aae17ef0.tar.bz2 linux-9e7325acb3dc8df8a6370ebc18aef107aae17ef0.zip |
KVM: s390: Refactor kvm_is_error_gpa() into kvm_is_gpa_in_memslot()
Rename kvm_is_error_gpa() to kvm_is_gpa_in_memslot() and invert the
polarity accordingly in order to (a) free up kvm_is_error_gpa() to match
with kvm_is_error_{hva,page}(), and (b) to make it more obvious that the
helper is doing a memslot lookup, i.e. not simply checking for INVALID_GPA.
No functional change intended.
Link: https://lore.kernel.org/r/20240215152916.1158-9-paul@xen.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm_host.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 3e1c04608c67..81a9d1cf91a2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1779,11 +1779,11 @@ static inline hpa_t pfn_to_hpa(kvm_pfn_t pfn) return (hpa_t)pfn << PAGE_SHIFT; } -static inline bool kvm_is_error_gpa(struct kvm *kvm, gpa_t gpa) +static inline bool kvm_is_gpa_in_memslot(struct kvm *kvm, gpa_t gpa) { unsigned long hva = gfn_to_hva(kvm, gpa_to_gfn(gpa)); - return kvm_is_error_hva(hva); + return !kvm_is_error_hva(hva); } static inline void kvm_gpc_mark_dirty_in_slot(struct gfn_to_pfn_cache *gpc) |