summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2011-05-11 00:38:50 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-05-20 13:43:41 +1000
commit44075d95e2567ce7b454bc1a4cf264ff6afebe65 (patch)
tree8d72f5a6c5cb2753cc335796ae1d04e3f6605d0a /arch/powerpc/kvm
parentf38aa708776aefd9e3ba7ec1211c07efe9fa3227 (diff)
downloadop-kernel-dev-44075d95e2567ce7b454bc1a4cf264ff6afebe65.zip
op-kernel-dev-44075d95e2567ce7b454bc1a4cf264ff6afebe65.tar.gz
powerpc/kvm: Fix kvmppc_core_pending_dec
The vcpu->arch.pending_exceptions field is a bitfield indexed by interrupt priority number as returned by kvmppc_book3s_vec2irqprio. However, kvmppc_core_pending_dec was using an interrupt vector shifted by 7 as the bit index. Fix it to use the irqprio value for the decrementer interrupt instead. This problem was found by code inspection. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/book3s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index c961de4..0f95b5c 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -236,7 +236,7 @@ void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu)
int kvmppc_core_pending_dec(struct kvm_vcpu *vcpu)
{
- return test_bit(BOOK3S_INTERRUPT_DECREMENTER >> 7, &vcpu->arch.pending_exceptions);
+ return test_bit(BOOK3S_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions);
}
void kvmppc_core_dequeue_dec(struct kvm_vcpu *vcpu)
OpenPOWER on IntegriCloud