Skip to contentSkip to conversation

KVM: s390: introduce struct kvm_s390_gisa_interrupt

GIT PULL Janosch Frank 1 participant 1 message Feb 22, 2019

Subsystems (2)
lore
Share & tools
lore

Janosch Frank

author maintainer
#0 lore raw

From: Michael Mueller <[email protected]>

Use this struct analog to the kvm interruption structs for kvm emulated floating and local interruptions.

GIB handling will add further fields to this structure as required.

Message-Id: <[email protected]>

---
 arch/s390/include/asm/kvm_host.h |  6 ++++-
 arch/s390/kvm/interrupt.c        | 52 +++++++++++++++++++++++-----------------
 arch/s390/kvm/kvm-s390.c         |  2 +-
 3 files changed, 36 insertions(+), 24 deletions(-)
arch/s390/include/asm/kvm_host.h +5 -1
index c259a67..0941571 100644
@@ -803,6 +803,10 @@ struct kvm_s390_vsie {
 	struct page *pages[KVM_MAX_VCPUS];
 };
 
+struct kvm_s390_gisa_interrupt {
+	struct kvm_s390_gisa *origin;
+};
+
 struct kvm_arch{
 	void *sca;
 	int use_esca;
@@ -836,8 +840,8 @@ struct kvm_arch{
 	atomic64_t cmma_dirty_pages;
 	/* subset of available cpu features enabled by user space */
 	DECLARE_BITMAP(cpu_feat, KVM_S390_VM_CPU_FEAT_NR_BITS);
-	struct kvm_s390_gisa *gisa;
 	DECLARE_BITMAP(idle_mask, KVM_MAX_VCPUS);
+	struct kvm_s390_gisa_interrupt gisa_int;
 };
 
 #define KVM_HVA_ERR_BAD		(-1UL)
arch/s390/kvm/interrupt.c +30 -22

156 lines not on this page · raw message

arch/s390/kvm/kvm-s390.c +1 -1
index 11b4be3..5eaffb3 100644
@@ -2812,7 +2812,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
 
 	vcpu->arch.sie_block->icpua = id;
 	spin_lock_init(&vcpu->arch.local_int.lock);
-	vcpu->arch.sie_block->gd = (u32)(u64)kvm->arch.gisa;
+	vcpu->arch.sie_block->gd = (u32)(u64)kvm->arch.gisa_int.origin;
 	if (vcpu->arch.sie_block->gd && sclp.has_gisaf)
 		vcpu->arch.sie_block->gd |= GISA_FORMAT1;
 	seqcount_init(&vcpu->arch.cputm_seqcount);
Signature · 1 line
2.7.4