[lkml]   [2019]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v6 11/13] KVM: s390: add functions to (un)register GISC with GISA
On Thu, 24 Jan 2019 13:59:37 +0100
Michael Mueller <> wrote:

> Add the Interruption Alert Mask (IAM) to the architecture specific
> kvm struct. This mask in the GISA is used to define for which ISC
> a GIB alert will be issued.
> The functions kvm_s390_gisc_register() and kvm_s390_gisc_unregister()
> are used to (un)register a GISC (guest ISC) with a virtual machine and
> its GISA.
> Upon successful completion, kvm_s390_gisc_register() returns the
> ISC to be used for GIB alert interruptions. A negative return code
> indicates an error during registration.
> Theses functions will be used by other adapter types like AP and PCI to
> request pass-through interruption support.

I'm not sure this interface is going to to fit PCI that well. But IMHO
no reason to delay the whole series -- we can think about zPCI later.
Same goes for some of the names.

Another idea for later would be to sanity check in gisa destroy that
alert.mask is back to all zero -- to catch any corresponding driver

Acked-by: Halil Pasic <>

> Signed-off-by: Michael Mueller <>


> static inline void gisa_set_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
> {
> set_bit_inv(IPM_BIT_OFFSET + gisc, (unsigned long *) gisa);
> @@ -2911,6 +2938,8 @@ void kvm_s390_gisa_init(struct kvm *kvm)
> if (!css_general_characteristics.aiv)
> return;
> gi->origin = &kvm->arch.sie_page2->gisa;
> + gi->alert.mask = 0;

I don't think this is necessary. Otherwise you would need to
zero the alert.ref[] too, or?


> + spin_lock_init(&gi->alert.ref_lock);
> kvm_s390_gisa_clear(kvm);
> VM_EVENT(kvm, 3, "gisa 0x%pK initialized", gi->origin);
> }

 \ /
  Last update: 2019-01-28 19:13    [W:0.255 / U:7.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site