提交 29ac26ef 编写于 作者: S Scott Wood 提交者: Avi Kivity

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: NScott Wood <scottwood@freescale.com>
Signed-off-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 c59a6a3e
...@@ -285,7 +285,6 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, ...@@ -285,7 +285,6 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu) static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu)
{ {
unsigned long *pending = &vcpu->arch.pending_exceptions; unsigned long *pending = &vcpu->arch.pending_exceptions;
unsigned long old_pending = vcpu->arch.pending_exceptions;
unsigned int priority; unsigned int priority;
priority = __ffs(*pending); priority = __ffs(*pending);
...@@ -299,10 +298,7 @@ static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu) ...@@ -299,10 +298,7 @@ static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu)
} }
/* Tell the guest about our interrupt status */ /* Tell the guest about our interrupt status */
if (*pending) vcpu->arch.shared->int_pending = !!*pending;
vcpu->arch.shared->int_pending = 1;
else if (old_pending)
vcpu->arch.shared->int_pending = 0;
} }
/* Check pending exceptions and deliver one, if possible. */ /* Check pending exceptions and deliver one, if possible. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册