]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: PPC: Book3S HV: Initialize AMOR in nested entry
authorFabiano Rosas <farosas@linux.ibm.com>
Mon, 25 Apr 2022 14:21:51 +0000 (11:21 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 18 May 2022 14:28:49 +0000 (00:28 +1000)
The hypervisor always sets AMOR to ~0, but let's ensure we're not
passing stale values around.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220425142151.1495142-1-farosas@linux.ibm.com
arch/powerpc/kvm/book3s_hv.c

index cd63dd0eea3155f3a4cf38ff790e559f5e9a86f7..c5fd9b4657dd05eae196e7f8c0a0ab0feca0e5ef 100644 (file)
@@ -3967,6 +3967,7 @@ static int kvmhv_vcpu_entry_p9_nested(struct kvm_vcpu *vcpu, u64 time_limit, uns
 
        kvmhv_save_hv_regs(vcpu, &hvregs);
        hvregs.lpcr = lpcr;
+       hvregs.amor = ~0;
        vcpu->arch.regs.msr = vcpu->arch.shregs.msr;
        hvregs.version = HV_GUEST_STATE_VERSION;
        if (vcpu->arch.nested) {