summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv.c
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@linux.ibm.com>2022-04-25 16:21:51 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-05-18 16:28:49 +0200
commit1d1cd0f12a3ab5d7f79ae6cca28e7d23dd351ce3 (patch)
tree4134d3499ac7da974767e6fa50125b7eb7fc3a30 /arch/powerpc/kvm/book3s_hv.c
parentKVM: PPC: Book3S HV: Use consistent type for return value of kvm_age_rmapp() (diff)
downloadlinux-1d1cd0f12a3ab5d7f79ae6cca28e7d23dd351ce3.tar.xz
linux-1d1cd0f12a3ab5d7f79ae6cca28e7d23dd351ce3.zip
KVM: PPC: Book3S HV: Initialize AMOR in nested entry
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
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r--arch/powerpc/kvm/book3s_hv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index cd63dd0eea31..c5fd9b4657dd 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -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) {