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

Michael Mueller
2018-12-20T10:09:54Z

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