Skip to content

Commit e881bfa

Browse files
aikmpe
authored andcommitted
KVM: PPC: Fix nested guest RC bits update
Before commit 6cdf303 ("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: 6cdf303 ("powerpc/kvm/book3s: Use kvm helpers to walk shadow or secondary table") Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7ae7715 commit e881bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kvm/book3s_hv_nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ static long kvmhv_handle_nested_set_rc(struct kvm_vcpu *vcpu,
12341234

12351235
/* Set the rc bit in the pte of the shadow_pgtable for the nest guest */
12361236
ret = kvmppc_hv_handle_set_rc(kvm, true, writing,
1237-
n_gpa, gp->shadow_lpid);
1237+
n_gpa, gp->l1_lpid);
12381238
if (!ret)
12391239
ret = -EINVAL;
12401240
else

0 commit comments

Comments
 (0)