From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Axtens Date: Fri, 26 Feb 2021 06:06:37 +0000 Subject: Re: [PATCH v2 05/37] KVM: PPC: Book3S HV: Ensure MSR[ME] is always set in guest MSR Message-Id: <87zgzr8is2.fsf@linkitivity.dja.id.au> List-Id: References: <20210225134652.2127648-1-npiggin@gmail.com> <20210225134652.2127648-6-npiggin@gmail.com> In-Reply-To: <20210225134652.2127648-6-npiggin@gmail.com> 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, Nicholas Piggin , Fabiano Rosas Hi Nick, > void kvmppc_set_msr_hv(struct kvm_vcpu *vcpu, u64 msr) > { > + /* > + * Guest must always run with machine check interrupt > + * enabled. > + */ > + if (!(msr & MSR_ME)) > + msr |= MSR_ME; 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 :) 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 Kind regards, Daniel > + > /* > * Check for illegal transactional state bit combination > * and if we find it, force the TS field to a safe state. > -- > 2.23.0