[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm-ppc
Subject: Re: [PATCH v2 05/37] KVM: PPC: Book3S HV: Ensure MSR[ME] is always set in guest MSR
From: Nicholas Piggin <npiggin () gmail ! com>
Date: 2021-02-26 23:55:52
Message-ID: 1614383549.rxe6rxw7w8.astroid () bobo ! none
[Download RAW message or body]
Excerpts from Daniel Axtens's message of February 26, 2021 4:06 pm:
> 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 :)
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.
>
> 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 <dja@axtens.net>
Thanks,
Nick
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic