Re: Re: [PATCH v2] KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'

Amit Machhiwal <[email protected]> Mon, 5 Feb 2024 23:39:12 +0530
Newsgroups org.kernel.vger.kvm-ppc,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.ozlabs.lists.linuxppc-dev
Message-ID <z47adbiweldcumlq4uejggkfcvfaw5nrd7v3tbh2e3pcvzjot2@gourfue5ytbl>
Hi Vaibhav,

Thanks for looking into the patch.

On 2024/02/05 11:05 PM, Vaibhav Jain wrote:
> Hi Amit,
> 
> Thanks for the patch. Minor comment on the patch below:
> 
> Amit Machhiwal <[email protected]> writes:
> 
> <snip>
> 
> >  
> > +static inline unsigned long map_pcr_to_cap(unsigned long pcr)
> > +{
> > +	unsigned long cap = 0;
> > +
> > +	switch (pcr) {
> > +	case PCR_ARCH_300:
> > +		cap = H_GUEST_CAP_POWER9;
> > +		break;
> > +	case PCR_ARCH_31:
> > +		cap = H_GUEST_CAP_POWER10;
> Though CONFIG_CC_IMPLICIT_FALLTHROUGH and '-Wimplicit-fallthrough'
> doesnt explicitly flag this usage, please consider using the
> 'fallthrough;' keyword here.
> 
> However you probably dont want this switch-case to fallthrough so please
> use a 'break' instead.

Sure, v3 on the way.

> 
> > +	default:
> > +		break;
> > +	}
> > +
> > +	return cap;
> > +}
> > +
> >
> <snip>
> 
> With the suggested change above
> 
> Reviewed-by: Vaibhav Jain <[email protected]>

Thanks!

> 
> -- 
> Cheers
> ~ Vaibhav

~Amit