From: Collin Walling <walling@linux.ibm.com>
To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org, cohuck@redhat.com,
rth@twiddle.net, david@redhat.com, pasic@linux.ibm.com,
borntraeger@de.ibm.com, mst@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v5 0/2] Guest Support for DIAGNOSE 0x318
Date: Tue, 25 Jun 2019 11:17:07 -0400 [thread overview]
Message-ID: <1561475829-19202-1-git-send-email-walling@linux.ibm.com> (raw)
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
next reply other threads:[~2019-06-25 15:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 15:17 Collin Walling [this message]
2019-06-25 15:17 ` [Qemu-devel] [PATCH v5 1/2] s390/kvm: header sync for diag318 Collin Walling
2019-06-26 9:43 ` David Hildenbrand
2019-06-25 15:17 ` [Qemu-devel] [PATCH v5 2/2] s390: diagnose 318 info reset and migration support Collin Walling
2019-06-26 9:12 ` Christian Borntraeger
2019-06-26 12:14 ` Cornelia Huck
2019-06-26 14:22 ` [Qemu-devel] [qemu-s390x] " Collin Walling
2019-06-26 14:30 ` David Hildenbrand
2019-06-27 10:29 ` Christian Borntraeger
2019-06-26 12:33 ` [Qemu-devel] " Cornelia Huck
2019-06-26 14:07 ` Collin Walling
2019-07-02 11:05 ` Cornelia Huck
2019-06-25 16:34 ` [Qemu-devel] [PATCH v5 0/2] Guest Support for DIAGNOSE 0x318 no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561475829-19202-1-git-send-email-walling@linux.ibm.com \
--to=walling@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).