diff options
author | Scott Wood <scottwood@freescale.com> | 2011-11-08 19:23:27 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 07:52:26 -0500 |
commit | 29ac26efbdc651303643025c83009ce5766c1676 (patch) | |
tree | 463d9c10951b527c6459b2e0d66088e71841f807 /arch/powerpc/kvm/booke.c | |
parent | c59a6a3e4e5976a938e21faf3da65a2784187aa7 (diff) |
KVM: PPC: booke: Fix int_pending calculation for MSR[EE] paravirt
int_pending was only being lowered if a bit in pending_exceptions
was cleared during exception delivery -- but for interrupts, we clear
it during IACK/TSR emulation. This caused paravirt for enabling
MSR[EE] to be ineffective.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 557f028a9ad4..8dfc59a8a715 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -285,7 +285,6 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, | |||
285 | static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu) | 285 | static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu) |
286 | { | 286 | { |
287 | unsigned long *pending = &vcpu->arch.pending_exceptions; | 287 | unsigned long *pending = &vcpu->arch.pending_exceptions; |
288 | unsigned long old_pending = vcpu->arch.pending_exceptions; | ||
289 | unsigned int priority; | 288 | unsigned int priority; |
290 | 289 | ||
291 | priority = __ffs(*pending); | 290 | priority = __ffs(*pending); |
@@ -299,10 +298,7 @@ static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu) | |||
299 | } | 298 | } |
300 | 299 | ||
301 | /* Tell the guest about our interrupt status */ | 300 | /* Tell the guest about our interrupt status */ |
302 | if (*pending) | 301 | vcpu->arch.shared->int_pending = !!*pending; |
303 | vcpu->arch.shared->int_pending = 1; | ||
304 | else if (old_pending) | ||
305 | vcpu->arch.shared->int_pending = 0; | ||
306 | } | 302 | } |
307 | 303 | ||
308 | /* Check pending exceptions and deliver one, if possible. */ | 304 | /* Check pending exceptions and deliver one, if possible. */ |