qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [RFC PATCH 04/17] KVM: PPC64: booke: Add guest computatio


From: Scott Wood
Subject: Re: [Qemu-ppc] [RFC PATCH 04/17] KVM: PPC64: booke: Add guest computation mode for irq delivery
Date: Thu, 5 Jul 2012 18:51:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/04/2012 08:40 AM, Alexander Graf wrote:
> On 25.06.2012, at 14:26, Mihai Caraman wrote:
>> @@ -381,7 +386,8 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu 
>> *vcpu,
>>                      set_guest_esr(vcpu, vcpu->arch.queued_esr);
>>              if (update_dear == true)
>>                      set_guest_dear(vcpu, vcpu->arch.queued_dear);
>> -            kvmppc_set_msr(vcpu, vcpu->arch.shared->msr & msr_mask);
>> +            kvmppc_set_msr(vcpu, (vcpu->arch.shared->msr & msr_mask)
>> +                            | msr_cm);
> 
> Please split this computation out into its own variable and apply the masking 
> regardless. Something like
> 
> ulong new_msr = vcpu->arch.shared->msr;
> if (vcpu->arch.epcr & SPRN_EPCR_ICM)
>     new_msr |= MSR_CM;
> new_msr &= msr_mask;
> kvmppc_set_msr(vcpu, new_msr);

This will fail to clear MSR[CM] in the odd but legal situation where you
have MSR[CM] set but EPCR[ICM] unset.

-Scott




reply via email to

[Prev in Thread] Current Thread [Next in Thread]