diff options
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 3e294bd9b8c6..241795bdf34c 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -125,11 +125,10 @@ void kvmppc_inject_interrupt(struct kvm_vcpu *vcpu, int vec, u64 flags) | |||
125 | vcpu->arch.mmu.reset_msr(vcpu); | 125 | vcpu->arch.mmu.reset_msr(vcpu); |
126 | } | 126 | } |
127 | 127 | ||
128 | void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec) | 128 | static int kvmppc_book3s_vec2irqprio(unsigned int vec) |
129 | { | 129 | { |
130 | unsigned int prio; | 130 | unsigned int prio; |
131 | 131 | ||
132 | vcpu->stat.queue_intr++; | ||
133 | switch (vec) { | 132 | switch (vec) { |
134 | case 0x100: prio = BOOK3S_IRQPRIO_SYSTEM_RESET; break; | 133 | case 0x100: prio = BOOK3S_IRQPRIO_SYSTEM_RESET; break; |
135 | case 0x200: prio = BOOK3S_IRQPRIO_MACHINE_CHECK; break; | 134 | case 0x200: prio = BOOK3S_IRQPRIO_MACHINE_CHECK; break; |
@@ -149,7 +148,15 @@ void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec) | |||
149 | default: prio = BOOK3S_IRQPRIO_MAX; break; | 148 | default: prio = BOOK3S_IRQPRIO_MAX; break; |
150 | } | 149 | } |
151 | 150 | ||
152 | set_bit(prio, &vcpu->arch.pending_exceptions); | 151 | return prio; |
152 | } | ||
153 | |||
154 | void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec) | ||
155 | { | ||
156 | vcpu->stat.queue_intr++; | ||
157 | |||
158 | set_bit(kvmppc_book3s_vec2irqprio(vec), | ||
159 | &vcpu->arch.pending_exceptions); | ||
153 | #ifdef EXIT_DEBUG | 160 | #ifdef EXIT_DEBUG |
154 | printk(KERN_INFO "Queueing interrupt %x\n", vec); | 161 | printk(KERN_INFO "Queueing interrupt %x\n", vec); |
155 | #endif | 162 | #endif |