Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

From: Michael Mueller
Date: Thu Dec 20 2018 - 05:10:06 EST




On 19.12.18 20:17, Michael Mueller wrote:
-static inline unsigned long pending_irqs(struct kvm_vcpu *vcpu)
-{
- return pending_irqs_no_gisa(vcpu) |
- kvm_s390_gisa_get_ipm(vcpu->kvm->arch.gisa) << IRQ_PEND_IO_ISC_7;
+ if (irq_flags & IRQ_FLAG_LOCAL)
+ pending_irqs |= vcpu->arch.local_int.pending_irqs;
+ if (irq_flags & IRQ_FLAG_FLOATING)
+ pending_irqs |= vcpu->kvm->arch.float_int.pending_irqs;
+ if (irq_flags & IRQ_FLAG_GISA)


Fix crash under vsie:

pending_irqs |= vcpu->kvm->arch.float_int.pending_irqs;
- if (irq_flags & IRQ_FLAG_GISA)
+ if (vcpu->kvm->arch.gisa && irq_flags & IRQ_FLAG_GISA)
pending_irqs |= get_ipm(vcpu->kvm->arch.gisa, irq_flags)


+ pending_irqs |= kvm_s390_gisa_get_ipm(vcpu->kvm->arch.gisa) <<
+ IRQ_PEND_IO_ISC_7;
+ return pending_irqs;
}

--
Mit freundlichen GrÃÃen / Kind regards
Michael MÃller

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Matthias Hartmann
GeschÃftsfÃhrung: Dirk Wittkopp
Sitz der Gesellschaft: BÃblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294