Re: [PATCH] KVM: PPC: Book3S HV: Initialize AMOR in nested entry

Nicholas Piggin <[email protected]>
Newsgroups org.kernel.vger.kvm-ppc,org.ozlabs.lists.linuxppc-dev
Message-ID <[email protected]>
Excerpts from Fabiano Rosas's message of April 26, 2022 12:21 am:
> The hypervisor always sets AMOR to ~0, but let's ensure we're not
> passing stale values around.
> 

Reviewed-by: Nicholas Piggin <[email protected]>

Looks like our L0 doesn't do anything with hvregs.amor ?

Thanks,
Nick

> Signed-off-by: Fabiano Rosas <[email protected]>
> ---
>  arch/powerpc/kvm/book3s_hv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 6fa518f6501d..b5f504576765 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) {
> -- 
> 2.35.1
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.