Re: [RFCv2 15/37] KVM: s390: protvirt: Implement interruption injection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 05.02.20 12:31, Cornelia Huck wrote:
On Mon,  3 Feb 2020 08:19:35 -0500
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:

From: Michael Mueller <mimu@xxxxxxxxxxxxx>

The patch implements interruption injection for the following
list of interruption types:

   - I/O
     __deliver_io (III)

   - External
     __deliver_cpu_timer (IEI)
     __deliver_ckc (IEI)
     __deliver_emergency_signal (IEI)
     __deliver_external_call (IEI)

   - cpu restart
     __deliver_restart (IRI)

Hm... what do 'III', 'IEI', and 'IRI' stand for?


The service interrupt is handled in a followup patch.

Signed-off-by: Michael Mueller <mimu@xxxxxxxxxxxxx>
Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
[fixes]
---
  arch/s390/include/asm/kvm_host.h |  8 +++
  arch/s390/kvm/interrupt.c        | 93 ++++++++++++++++++++++----------
  2 files changed, 74 insertions(+), 27 deletions(-)

diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index a45d10d87a8a..989cea7a5591 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -563,6 +563,14 @@ enum irq_types {
  #define IRQ_PEND_MCHK_MASK ((1UL << IRQ_PEND_MCHK_REP) | \
  			    (1UL << IRQ_PEND_MCHK_EX))
+#define IRQ_PEND_MCHK_REP_MASK (1UL << IRQ_PEND_MCHK_REP)
+
+#define IRQ_PEND_EXT_II_MASK ((1UL << IRQ_PEND_EXT_CPU_TIMER)  | \

What does 'II' stand for? Interrupt Injection?

+			      (1UL << IRQ_PEND_EXT_CLOCK_COMP) | \
+			      (1UL << IRQ_PEND_EXT_EMERGENCY)  | \
+			      (1UL << IRQ_PEND_EXT_EXTERNAL)   | \
+			      (1UL << IRQ_PEND_EXT_SERVICE))
+
  struct kvm_s390_interrupt_info {
  	struct list_head list;
  	u64	type;

(...)

@@ -1834,7 +1872,8 @@ static void __floating_irq_kick(struct kvm *kvm, u64 type)
  		break;
  	case KVM_S390_INT_IO_MIN...KVM_S390_INT_IO_MAX:
  		if (!(type & KVM_S390_INT_IO_AI_MASK &&
-		      kvm->arch.gisa_int.origin))
+		      kvm->arch.gisa_int.origin) ||
+		      kvm_s390_pv_handle_cpu(dst_vcpu))
  			kvm_s390_set_cpuflags(dst_vcpu, CPUSTAT_IO_INT);
  		break;
  	default:

Looking at this... can you also talk about protected virt vs. exitless
interrupts?


Adapter interruptions are placed into the GISA but currently
not proceessed in SIE context when running in PV context.
Thus they get delivered by KVM explicitly by means of the
io interruption injection code.

...
00 01580915540:999281 4 - 04 00000000eb351b8a  inject: I/O (AI/gisa) isc 3
00 01580915540:999287 4 - 02 000000008345868d 00[0706c00180000000-00000000f4d2c544]: deliver: I/O (AI/gisa) isc 3
00 01580915542:999283 4 - 04 00000000eb351b8a  inject: I/O (AI/gisa) isc 3
00 01580915542:999288 4 - 02 000000008345868d 00[0706c00180000000-00000000f4d2c544]: deliver: I/O (AI/gisa) isc 3
00 01580915543:996622 4 - 04 00000000eb351b8a  inject: I/O (AI/gisa) isc 3
00 01580915543:996629 4 - 02 000000008345868d 00[0706c00180000000-00000000f4d2c544]: deliver: I/O (AI/gisa) isc 3
00 01580915544:039280 4 - 04 00000000eb351b8a  inject: I/O (AI/gisa) isc 3
00 01580915544:039290 4 - 02 000000008345868d 00[0706c00180000000-00000000f4d2c544]: deliver: I/O (AI/gisa) isc 3
00 01580915544:039313 4 - 04 00000000eb351b8a  inject: I/O (AI/gisa) isc 3
00 01580915544:039319 4 - 02 000000008345868d 00[0706c00180000000-00000000f4d2c544]: deliver: I/O (AI/gisa) isc 3
...


Michael




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux