@@ -87,6 +87,13 @@ struct bsca_entry {
__u64 reserved2[2];
};
+struct ssca_entry {
+ __u8 reserved0[8];
+ __u64 ssda;
+ __u64 ossea;
+ __u8 reserved18[8];
+};
+
union ipte_control {
unsigned long val;
struct {
@@ -128,6 +135,17 @@ struct esca_block {
struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS];
};
+/*
+ * The shadow sca / ssca needs to cover both bsca and esca depending on what the
+ * guest uses so we use KVM_S390_ESCA_CPU_SLOTS.
+ * The header part of the struct must not cross page boundaries.
+ */
+struct ssca_block {
+ __u64 osca;
+ __u64 reserved08[7];
+ struct ssca_entry cpu[KVM_S390_ESCA_CPU_SLOTS];
+};
+
/*
* This struct is used to store some machine check info from lowcore
* for machine checks that happen while the guest is running.
@@ -358,7 +376,7 @@ struct kvm_s390_sie_block {
__u32 fac; /* 0x01a0 */
__u8 reserved1a4[20]; /* 0x01a4 */
__u64 cbrlo; /* 0x01b8 */
- __u8 reserved1c0[8]; /* 0x01c0 */
+ __u64 osda; /* 0x01c0 */
#define ECD_HOSTREGMGMT 0x20000000
#define ECD_MEF 0x08000000
#define ECD_ETOKENF 0x02000000
@@ -223,7 +223,7 @@ struct kvm_s390_sie_block {
__u32 fac; /* 0x01a0 */
__u8 reserved1a4[20]; /* 0x01a4 */
__u64 cbrlo; /* 0x01b8 */
- __u8 reserved1c0[8]; /* 0x01c0 */
+ __u64 osda; /* 0x01c0 */
#define ECD_HOSTREGMGMT 0x20000000
#define ECD_MEF 0x08000000
#define ECD_ETOKENF 0x02000000
Add the required guest-1 structures for the vsie_sigpif to the SIE control block and vsie_page for use in later patches. The shadow SCA features the address of the original SCA as well as an entry for each original SIGP entry. The entries contain the addresses of the shadow state description and original SIGP entry. Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com> --- arch/s390/include/asm/kvm_host.h | 20 +++++++++++++++++++- tools/testing/selftests/kvm/include/s390/sie.h | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-)