Thread (75 messages) 75 messages, 6 authors, 2012-10-08

Re: [Qemu-ppc] [RFC PATCH 04/17] KVM: PPC64: booke: Add guest computation mode for irq delivery

flat view

From: Alexander Graf <hidden>
Date: 2012-07-06 07:03:27
Also in: kvm

On 06.07.2012, at 01:51, Scott Wood [off-list ref] wrote:
On 07/04/2012 08:40 AM, Alexander Graf wrote:
quoted
On 25.06.2012, at 14:26, Mihai Caraman wrote:
quoted
@@ -381,7 +386,8 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_v=
cpu *vcpu,
quoted
quoted
           set_guest_esr(vcpu, vcpu->arch.queued_esr);
       if (update_dear =3D=3D 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);
=20
Please split this computation out into its own variable and apply the mas=
king regardless. Something like
quoted
=20
ulong new_msr =3D vcpu->arch.shared->msr;
if (vcpu->arch.epcr & SPRN_EPCR_ICM)
   new_msr |=3D MSR_CM;
new_msr &=3D msr_mask;
kvmppc_set_msr(vcpu, new_msr);
=20
This will fail to clear MSR[CM] in the odd but legal situation where you
have MSR[CM] set but EPCR[ICM] unset.
Ah. Good point. Then leave the msr_mask logic as before and only stretch it o=
ut into its own variable.

Alex
=20
-Scott
=20
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help