From: Daniel Axtens Date: Fri, 05 Mar 2021 04:50:59 +0000 Subject: Re: [PATCH v2 05/37] KVM: PPC: Book3S HV: Ensure MSR[ME] is always set in guest MSR Message-Id: <87tupq8aq4.fsf@linkitivity.dja.id.au> List-Id: References: <20210225134652.2127648-1-npiggin@gmail.com> <20210225134652.2127648-6-npiggin@gmail.com> <87zgzr8is2.fsf@linkitivity.dja.id.au> <1614383549.rxe6rxw7w8.astroid@bobo.none> In-Reply-To: <1614383549.rxe6rxw7w8.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Nicholas Piggin , kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, Fabiano Rosas >> This 'if' is technically redundant but you mention a future patch warning >> on !(msr & MSR_ME) so I'm holding off on any judgement about the 'if' until >> I get to that patch :) > > That's true. The warning is actually further down when we're setting up > the msr to run in guest mode. At this point the MSR I think comes from > qemu (and arguably the guest setup code shouldn't need to know about HV > specific MSR bits) so a warning here wouldn't be appropriate. > > I could remove the if, although the compiler might already do that. Yes, I think the compiler is almost certainly going to remove that. I'd probably not include the 'if' statement even though it probably gets removed by the compiler but I think that's more a matter of taste than anything else. Kind regards, Daniel > >> >> The patch seems sane to me, I agree that we don't want guests running with >> MSR_ME=0 and kvmppc_set_msr_hv already ensures that the transactional state is >> sane so this is another sanity-enforcement in the same sort of vein. >> >> All up: >> Reviewed-by: Daniel Axtens > > Thanks, > Nick