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 --- arch/s390/include/asm/kvm_host_types.h | 21 ++++++++++++++++++++- tools/testing/selftests/kvm/include/s390/sie.h | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/kvm_host_types.h b/arch/s390/include/asm/kvm_host_types.h index 1394d3fb648f1e46dba2c513ed26e5dfd275fad4..ce52608449735d6ca629008c554e7df09f97e67b 100644 --- a/arch/s390/include/asm/kvm_host_types.h +++ b/arch/s390/include/asm/kvm_host_types.h @@ -45,6 +45,13 @@ struct bsca_entry { __u64 reserved2[2]; }; +struct ssca_entry { + __u64 reserved1; + __u64 ssda; + __u64 ossea; + __u64 reserved2; +}; + union ipte_control { unsigned long val; struct { @@ -86,6 +93,18 @@ 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 allocate space for 256 entries that are defined in the + * architecture. + * The header part of the struct must not cross page boundaries. + */ +struct ssca_block { + __u64 osca; + __u64 reserved08[7]; + struct ssca_entry cpu[KVM_MAX_VCPUS]; +}; + /* * This struct is used to store some machine check info from lowcore * for machine checks that happen while the guest is running. @@ -316,7 +335,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 diff --git a/tools/testing/selftests/kvm/include/s390/sie.h b/tools/testing/selftests/kvm/include/s390/sie.h index 160acd4a1db92d6129c0f084db82c8c147d5c23e..4ff1c1a354af51d322042c03d59a8cf56685abd3 100644 --- a/tools/testing/selftests/kvm/include/s390/sie.h +++ b/tools/testing/selftests/kvm/include/s390/sie.h @@ -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 -- 2.51.1