[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 0/2] Guest Support for DIAGNOSE 0x318
From: |
Collin Walling |
Subject: |
[Qemu-devel] [PATCH v5 0/2] Guest Support for DIAGNOSE 0x318 |
Date: |
Tue, 25 Jun 2019 11:17:07 -0400 |
Changelog:
v5
- split off header updates in kvm_s390x.h to a separate patch
- implemented CPU model feature for this insn made available with
zEC12-full and later models
- s/cpc/diag318_info in order to make the relevant data more clear
- reduced S390_MAX_CPUS from 248 to 247
The DIAGNOSE 0x318 instruction is a privileged instruction that is executed by
the
linux kernel once and only once during setup. This requires interception by KVM
to
handle the instruction call safely. The instruction assists with determining
the
environment the VM is running in -- this is better described in the KVM patches.
The analogous KVM patches still under review can be found here:
https://marc.info/?l=linux-s390&m=156147521528818&w=2
Guest support for the diag 318 instruction is accomplished by implementing a
device
class, a cpu model feature, and adjusting the Read Info struct. The Read Info
struct
adjustment coincidentally reduces the maximum number of VCPUs we can have by
one.
A device class is used for this instruction in order to streamline the
migration and
reset of the DIAG 318 related data.
A CPU model feature is added for this instruction, appropriately named diag318.
The instruction is determined by a Read Info byte 134 bit 0. This is a new byte
that
expands into the space of the Read Info SCCB that is also used to contain CPU
entry
data. Due to this expansion, we lose space for one CPU entry and we must reduce
the
maximum possible CPUs from 248 to 247. Hopefully this drawback does not affect
many
VMs.
Collin Walling (2):
s390/kvm: header sync for diag318
s390: diagnose 318 info reset and migration support
hw/s390x/Makefile.objs | 1 +
hw/s390x/diag318.c | 80 +++++++++++++++++++++++++++++++++++++++++
hw/s390x/diag318.h | 38 ++++++++++++++++++++
hw/s390x/s390-virtio-ccw.c | 17 +++++++++
hw/s390x/sclp.c | 3 ++
include/hw/s390x/sclp.h | 2 ++
linux-headers/asm-s390/kvm.h | 4 +++
target/s390x/cpu.h | 8 ++++-
target/s390x/cpu_features.c | 3 ++
target/s390x/cpu_features.h | 1 +
target/s390x/cpu_features_def.h | 3 ++
target/s390x/gen-features.c | 1 +
target/s390x/kvm-stub.c | 10 ++++++
target/s390x/kvm.c | 29 +++++++++++++++
target/s390x/kvm_s390x.h | 2 ++
15 files changed, 201 insertions(+), 1 deletion(-)
create mode 100644 hw/s390x/diag318.c
create mode 100644 hw/s390x/diag318.h
--
2.7.4