KVM: s390: add functions to (un)register GISC with GISA
Janosch Frank
maintainerFrom: Michael Mueller <[email protected]>
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.
Signed-off-by Michael Mueller <[email protected]>
Acked-by Pierre Morel <[email protected]>
Acked-by Halil Pasic <[email protected]>
Reviewed-by Cornelia Huck <[email protected]>
Message-Id: <[email protected]>
Signed-off-by Christian Borntraeger <[email protected]>
--- arch/s390/include/asm/kvm_host.h | 13 +++++ arch/s390/kvm/interrupt.c | 112 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+)
arch/s390/include/asm/kvm_host.h +13 -0
@@ -781,6 +781,9 @@ struct kvm_s390_gisa {u8 reserved03[11 ];u32 airq_count; } g1; +struct { +u64 word[4 ]; + } u64; }; };
@@ -813,8 +816,15 @@ struct kvm_s390_vsie {struct page *pages[KVM_MAX_VCPUS ]; }; +struct kvm_s390_gisa_iam { +u8 mask; +spinlock_t ref_lock; +u32 ref_count[MAX_ISC +1 ]; +}; +struct kvm_s390_gisa_interrupt {struct kvm_s390_gisa *origin; +struct kvm_s390_gisa_iam alert; };struct kvm_arch {
@@ -885,6 +895,9 @@ void kvm_arch_crypto_set_masks(struct kvm *kvm, unsigned long *apm,extern int sie64a (struct kvm_s390_sie_block *,u64 *);extern char sie_exit; +extern int kvm_s390_gisc_register (struct kvm *kvm,u32 gisc); +extern int kvm_s390_gisc_unregister (struct kvm *kvm,u32 gisc); +static inline void kvm_arch_hardware_disable (void ) {}static inline void kvm_arch_check_processor_compat (void *rtn) {}static inline void kvm_arch_sync_events (struct kvm *kvm) {}
arch/s390/kvm/interrupt.c +112 -0
130 lines not on this page · raw message
Signature · 1 line
2.7.4