diff options
author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2014-02-11 13:48:07 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-03-25 13:27:12 +0100 |
commit | 2ed10cc15e7edf2daf22ce807a877a1266e97711 (patch) | |
tree | 07af72afb5acc318c9ee4e8c562e74dd324912d4 /arch/s390/kvm/interrupt.c | |
parent | 91880d07fc9b2b6b7a726765039897af99d9ca78 (diff) | |
download | op-kernel-dev-2ed10cc15e7edf2daf22ce807a877a1266e97711.zip op-kernel-dev-2ed10cc15e7edf2daf22ce807a877a1266e97711.tar.gz |
KVM: s390: clear local interrupts at cpu initial reset
Empty list of local interrupts when vcpu goes through initial reset
to provide a clean state
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/interrupt.c')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 79d2e4f..05bffd7 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -509,6 +509,20 @@ enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer) return HRTIMER_NORESTART; } +void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu) +{ + struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; + struct kvm_s390_interrupt_info *n, *inti = NULL; + + spin_lock_bh(&li->lock); + list_for_each_entry_safe(inti, n, &li->list, list) { + list_del(&inti->list); + kfree(inti); + } + atomic_set(&li->active, 0); + spin_unlock_bh(&li->lock); +} + void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) { struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; |