summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_64_vio.c
diff options
context:
space:
mode:
authorDavid Matlack <dmatlack@google.com>2021-08-04 22:28:39 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2021-08-06 07:52:28 -0400
commit0f22af940dc8ec4f437189096a5f8677995323b0 (patch)
tree2aed49d93f3e57ecf5d5e04bfb73f71e474eaf1b /arch/powerpc/kvm/book3s_64_vio.c
parent87689270b10fa9e6fac7242233b355cb6792b845 (diff)
downloadlwn-0f22af940dc8ec4f437189096a5f8677995323b0.tar.gz
lwn-0f22af940dc8ec4f437189096a5f8677995323b0.zip
KVM: Move last_used_slot logic out of search_memslots
Make search_memslots unconditionally search all memslots and move the last_used_slot logic up one level to __gfn_to_memslot. This is in preparation for introducing a per-vCPU last_used_slot. As part of this change convert existing callers of search_memslots to __gfn_to_memslot to avoid making any functional changes. Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20210804222844.1419481-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_vio.c')
-rw-r--r--arch/powerpc/kvm/book3s_64_vio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 8da93fdfa59e..6365087f3160 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -346,7 +346,7 @@ static long kvmppc_tce_to_ua(struct kvm *kvm, unsigned long tce,
unsigned long gfn = tce >> PAGE_SHIFT;
struct kvm_memory_slot *memslot;
- memslot = search_memslots(kvm_memslots(kvm), gfn);
+ memslot = __gfn_to_memslot(kvm_memslots(kvm), gfn);
if (!memslot)
return -EINVAL;