diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2020-06-11 06:05:59 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-06-12 09:19:53 +0300 |
commit | e881bfaf5a5f409390973e076333281465f2b0d9 (patch) | |
tree | 53768e44e785871ad2371ab680e438c1a37270e3 | |
parent | 7ae77150d94d3b535c7b85e6b3647113095e79bf (diff) | |
download | linux-e881bfaf5a5f409390973e076333281465f2b0d9.tar.xz |
KVM: PPC: Fix nested guest RC bits update
Before commit 6cdf30375f82 ("powerpc/kvm/book3s: Use kvm helpers
to walk shadow or secondary table") we called __find_linux_pte() with
a page table pointer from a kvm_nested_guest struct but
now we rely on kvmhv_find_nested() which takes an L1 LPID and returns
a kvm_nested_guest pointer, however we pass a L0 LPID there and
the L2 guest hangs.
This fixes the LPID passed to kvmppc_hv_handle_set_rc().
Fixes: 6cdf30375f82 ("powerpc/kvm/book3s: Use kvm helpers to walk shadow or secondary table")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200611030559.75257-1-aik@ozlabs.ru
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_nested.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_nested.c b/arch/powerpc/kvm/book3s_hv_nested.c index 66c38ee37fd5..75993f44519b 100644 --- a/arch/powerpc/kvm/book3s_hv_nested.c +++ b/arch/powerpc/kvm/book3s_hv_nested.c @@ -1234,7 +1234,7 @@ static long kvmhv_handle_nested_set_rc(struct kvm_vcpu *vcpu, /* Set the rc bit in the pte of the shadow_pgtable for the nest guest */ ret = kvmppc_hv_handle_set_rc(kvm, true, writing, - n_gpa, gp->shadow_lpid); + n_gpa, gp->l1_lpid); if (!ret) ret = -EINVAL; else |