[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 06/16] s390x: protvirt: KVM intercept changes
From: |
Janosch Frank |
Subject: |
[PATCH v10 06/16] s390x: protvirt: KVM intercept changes |
Date: |
Wed, 18 Mar 2020 10:30:37 -0400 |
Protected VMs no longer intercept with code 4 for an instruction
interception. Instead they have codes 104 and 108 for protected
instruction interception and protected instruction notification
respectively.
The 104 mirrors the 4 interception.
The 108 is a notification interception to let KVM and QEMU know that
something changed and we need to update tracking information or
perform specific tasks. It's currently taken for the following
instructions:
* spx (To inform about the changed prefix location)
* sclp (On incorrect SCCB values, so we can inject a IRQ)
* sigp (All but "stop and store status")
* diag308 (Subcodes 0/1)
Of these exits only sclp errors, state changing sigps and diag308 will
reach QEMU. QEMU will do its parts of the job, while the ultravisor
has done the instruction part of the job.
Signed-off-by: Janosch Frank <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Christian Borntraeger <address@hidden>
Reviewed-by: Claudio Imbrenda <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
---
target/s390x/kvm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index c695941076b7aead..cbb71aa11b9a626a 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -115,6 +115,8 @@
#define ICPT_CPU_STOP 0x28
#define ICPT_OPEREXC 0x2c
#define ICPT_IO 0x40
+#define ICPT_PV_INSTR 0x68
+#define ICPT_PV_INSTR_NOTIFICATION 0x6c
#define NR_LOCAL_IRQS 32
/*
@@ -1698,6 +1700,8 @@ static int handle_intercept(S390CPU *cpu)
(long)cs->kvm_run->psw_addr);
switch (icpt_code) {
case ICPT_INSTRUCTION:
+ case ICPT_PV_INSTR:
+ case ICPT_PV_INSTR_NOTIFICATION:
r = handle_instruction(cpu, run);
break;
case ICPT_PROGRAM:
--
2.25.1
- [PATCH v10 00/16] s390x: Protected Virtualization support, Janosch Frank, 2020/03/18
- [PATCH v10 01/16] s390x: Move diagnose 308 subcodes and rcs into ipl.h, Janosch Frank, 2020/03/18
- [PATCH v10 04/16] s390x: protvirt: Add migration blocker, Janosch Frank, 2020/03/18
- [PATCH v10 06/16] s390x: protvirt: KVM intercept changes,
Janosch Frank <=
- [PATCH v10 02/16] Sync pv, Janosch Frank, 2020/03/18
- [PATCH v10 08/16] s390x: protvirt: Move STSI data over SIDAD, Janosch Frank, 2020/03/18
- [PATCH v10 03/16] s390x: protvirt: Support unpack facility, Janosch Frank, 2020/03/18
[PATCH v10 07/16] s390x: Add SIDA memory ops, Janosch Frank, 2020/03/18
[PATCH v10 05/16] s390x: protvirt: Inhibit balloon when switching to protected mode, Janosch Frank, 2020/03/18