From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
david@redhat.com, thuth@redhat.com, seiden@linux.ibm.com
Subject: [kvm-unit-tests PATCH v2 02/10] s390x: sie: Add PV fields to SIE control block
Date: Tue, 7 Dec 2021 15:59:57 +0000 [thread overview]
Message-ID: <20211207160005.1586-3-frankja@linux.ibm.com> (raw)
In-Reply-To: <20211207160005.1586-1-frankja@linux.ibm.com>
We need those fields for format 4 SIE tests (protected VMs).
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
lib/s390x/sie.h | 41 ++++++++++++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/lib/s390x/sie.h b/lib/s390x/sie.h
index f34e3c80..c6eb6441 100644
--- a/lib/s390x/sie.h
+++ b/lib/s390x/sie.h
@@ -38,7 +38,13 @@ struct kvm_s390_sie_block {
uint8_t reserved08[4]; /* 0x0008 */
#define PROG_IN_SIE (1<<0)
uint32_t prog0c; /* 0x000c */
- uint8_t reserved10[16]; /* 0x0010 */
+union {
+ uint8_t reserved10[16]; /* 0x0010 */
+ struct {
+ uint64_t pv_handle_cpu;
+ uint64_t pv_handle_config;
+ };
+ };
#define PROG_BLOCK_SIE (1<<0)
#define PROG_REQUEST (1<<1)
uint32_t prog20; /* 0x0020 */
@@ -87,10 +93,22 @@ struct kvm_s390_sie_block {
#define ICPT_PARTEXEC 0x38
#define ICPT_IOINST 0x40
#define ICPT_KSS 0x5c
+#define ICPT_INT_ENABLE 0x64
+#define ICPT_PV_INSTR 0x68
+#define ICPT_PV_NOTIFY 0x6c
+#define ICPT_PV_PREF 0x70
uint8_t icptcode; /* 0x0050 */
uint8_t icptstatus; /* 0x0051 */
uint16_t ihcpu; /* 0x0052 */
- uint8_t reserved54[2]; /* 0x0054 */
+ uint8_t reserved54; /* 0x0054 */
+#define IICTL_CODE_NONE 0x00
+#define IICTL_CODE_MCHK 0x01
+#define IICTL_CODE_EXT 0x02
+#define IICTL_CODE_IO 0x03
+#define IICTL_CODE_RESTART 0x04
+#define IICTL_CODE_SPECIFICATION 0x10
+#define IICTL_CODE_OPERAND 0x11
+ uint8_t iictl; /* 0x0055 */
uint16_t ipa; /* 0x0056 */
uint32_t ipb; /* 0x0058 */
uint32_t scaoh; /* 0x005c */
@@ -112,7 +130,7 @@ struct kvm_s390_sie_block {
#define ECB3_RI 0x01
uint8_t ecb3; /* 0x0063 */
uint32_t scaol; /* 0x0064 */
- uint8_t reserved68; /* 0x0068 */
+ uint8_t sdf; /* 0x0068 */
uint8_t epdx; /* 0x0069 */
uint8_t reserved6a[2]; /* 0x006a */
uint32_t todpr; /* 0x006c */
@@ -128,9 +146,15 @@ struct kvm_s390_sie_block {
#define HPID_KVM 0x4
#define HPID_VSIE 0x5
uint8_t hpid; /* 0x00b8 */
- uint8_t reservedb9[11]; /* 0x00b9 */
- uint16_t extcpuaddr; /* 0x00c4 */
- uint16_t eic; /* 0x00c6 */
+ uint8_t reservedb9[7]; /* 0x00b9 */
+ union {
+ struct {
+ uint32_t eiparams; /* 0x00c0 */
+ uint16_t extcpuaddr; /* 0x00c4 */
+ uint16_t eic; /* 0x00c6 */
+ };
+ uint64_t mcic; /* 0x00c0 */
+ } __attribute__ ((__packed__));
uint32_t reservedc8; /* 0x00c8 */
uint16_t pgmilc; /* 0x00cc */
uint16_t iprcc; /* 0x00ce */
@@ -152,7 +176,10 @@ struct kvm_s390_sie_block {
#define CRYCB_FORMAT2 0x00000003
uint32_t crycbd; /* 0x00fc */
uint64_t gcr[16]; /* 0x0100 */
- uint64_t gbea; /* 0x0180 */
+ union {
+ uint64_t gbea; /* 0x0180 */
+ uint64_t sidad;
+ };
uint8_t reserved188[8]; /* 0x0188 */
uint64_t sdnxo; /* 0x0190 */
uint8_t reserved198[8]; /* 0x0198 */
--
2.32.0
next prev parent reply other threads:[~2021-12-07 16:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 15:59 [kvm-unit-tests PATCH v2 00/10] s390x: sie: Add PV snippet support Janosch Frank
2021-12-07 15:59 ` [kvm-unit-tests PATCH v2 01/10] lib: s390x: sie: Add sca allocation and freeing Janosch Frank
2021-12-07 15:59 ` Janosch Frank [this message]
2021-12-07 15:59 ` [kvm-unit-tests PATCH v2 03/10] s390x: sie: Add UV information into VM struct Janosch Frank
2021-12-07 15:59 ` [kvm-unit-tests PATCH v2 04/10] s390x: uv: Add more UV call functions Janosch Frank
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 05/10] s390x: lib: Extend UV library with PV guest management Janosch Frank
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 06/10] lib: s390: sie: Add PV guest register handling Janosch Frank
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 07/10] s390x: snippets: Add PV support Janosch Frank
2021-12-08 12:57 ` Claudio Imbrenda
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 08/10] lib: s390x: Introduce snippet helpers Janosch Frank
2021-12-08 11:46 ` Claudio Imbrenda
2021-12-08 13:56 ` Janosch Frank
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 09/10] s390x: mvpg-sie: Use " Janosch Frank
2021-12-08 11:19 ` Claudio Imbrenda
2021-12-07 16:00 ` [kvm-unit-tests PATCH v2 10/10] s390x: sie: Add PV diag test Janosch Frank
2021-12-08 12:55 ` Claudio Imbrenda
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=20211207160005.1586-3-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=david@redhat.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=seiden@linux.ibm.com \
--cc=thuth@redhat.com \
/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