On Tue May 20, 2025 at 7:41 AM CEST, Thomas Huth wrote: > On 19/05/2025 13.36, Christoph Schlameuss wrote: >> Instead of allocating a BSCA and upgrading it for PV or when adding the >> 65th cpu we can always use the ESCA. >> >> The only downside of the change is that we will always allocate 4 pages >> for a 248 cpu ESCA instead of a single page for the BSCA per VM. >> In return we can delete a bunch of checks and special handling depending >> on the SCA type as well as the whole BSCA to ESCA conversion. >> >> As a fallback we can still run without SCA entries when the SIGP >> interpretation facility or ESCA are not available. >> >> Signed-off-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx> >> --- >> arch/s390/include/asm/kvm_host.h | 1 - >> arch/s390/kvm/interrupt.c | 67 ++++------------- >> arch/s390/kvm/kvm-s390.c | 159 ++++++--------------------------------- >> arch/s390/kvm/kvm-s390.h | 4 +- >> 4 files changed, 42 insertions(+), 189 deletions(-) > > Could you now also remove struct bsca_block from the kvm_host_types.h header? > We still need these to support sigp with bsca in vsie. (Once I have that running properly.) > ... >> diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h >> index 8d3bbb2dd8d27802bbde2a7bd1378033ad614b8e..2c8e177e4af8f2dab07fd42a904cefdea80f6855 100644 >> --- a/arch/s390/kvm/kvm-s390.h >> +++ b/arch/s390/kvm/kvm-s390.h >> @@ -531,7 +531,7 @@ int kvm_s390_handle_per_event(struct kvm_vcpu *vcpu); >> /* support for Basic/Extended SCA handling */ >> static inline union ipte_control *kvm_s390_get_ipte_control(struct kvm *kvm) >> { >> - struct bsca_block *sca = kvm->arch.sca; /* SCA version doesn't matter */ >> + struct esca_block *sca = kvm->arch.sca; /* SCA version doesn't matter */ > > You might want to adjust/remove the comment here now. > Yes. This does not make any sense anymore. But it is already completely removed along with that whole message in the next patch. > > >> return &sca->ipte_control; >> } >> @@ -542,7 +542,7 @@ static inline int kvm_s390_use_sca_entries(void) >> * might use the entries. By not setting the entries and keeping them >> * invalid, hardware will not access them but intercept. >> */ >> - return sclp.has_sigpif; >> + return sclp.has_sigpif && sclp.has_esca; >> } >> void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu, >> struct mcck_volatile_info *mcck_info); >> -- Cheers, Christoph