kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] KVM: s390: Use ESCA instead of BSCA at VM init
@ 2025-05-22  9:31 Christoph Schlameuss
  2025-05-22  9:31 ` [PATCH v3 1/3] KVM: s390: Set KVM_MAX_VCPUS to 256 Christoph Schlameuss
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Christoph Schlameuss @ 2025-05-22  9:31 UTC (permalink / raw)
  To: kvm
  Cc: linux-s390, Christian Borntraeger, Janosch Frank,
	Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Sven Schnelle, Thomas Huth,
	Christoph Schlameuss

All modern IBM Z and Linux One machines do offer support for the
Extended System Control Area (ESCA). The ESCA is available since the
z114/z196 released in 2010.
KVM needs to allocate and manage the SCA for guest VMs. Prior to this
change the SCA was setup as Basic SCA only supporting a maximum of 64
vCPUs when initializing the VM. With addition of the 65th vCPU the SCA
was needed to be converted to a ESCA.

Instead we will now allocate the ESCA directly upon VM creation
simplifying the code in multiple places as well as completely removing
the need to convert an existing SCA.

In cases where the ESCA is not supported (z10 and earlier) the use of
the SCA entries and with that SIGP interpretation are disabled for VMs.
This increases the number of exits from the VM in multiprocessor
scenarios and thus decreases performance.
The same is true for VSIE where SIGP is currently disabled and thus no
SCA entries are used.

---
I found a slight problem when testing this to run without sca entries.
Fixed now and tests are successful with and without using the sca
entries (incl. vsie).

Changes in v3:
- do not enable sigp for guests when kvm_s390_use_sca_entries() is false
  - consistently use kvm_s390_use_sca_entries() instead of sclp.has_sigpif
- Link to v2: https://lore.kernel.org/r/20250519-rm-bsca-v2-0-e3ea53dd0394@linux.ibm.com

Changes in v2:
- properly apply checkpatch --strict (Thanks Claudio)
- some small comment wording changes
- rebased
- Link to v1: https://lore.kernel.org/r/20250514-rm-bsca-v1-0-6c2b065a8680@linux.ibm.com

---
Christoph Schlameuss (3):
      KVM: s390: Set KVM_MAX_VCPUS to 256
      KVM: s390: Always allocate esca_block
      KVM: s390: Specify kvm->arch.sca as esca_block

 arch/s390/include/asm/kvm_host.h       |   7 +-
 arch/s390/include/asm/kvm_host_types.h |   2 +
 arch/s390/kvm/gaccess.c                |  10 +-
 arch/s390/kvm/interrupt.c              |  71 ++++----------
 arch/s390/kvm/kvm-s390.c               | 163 ++++++---------------------------
 arch/s390/kvm/kvm-s390.h               |   9 +-
 6 files changed, 55 insertions(+), 207 deletions(-)
---
base-commit: a5806cd506af5a7c19bcd596e4708b5c464bfd21
change-id: 20250513-rm-bsca-ab1e8649aca7

Best regards,
-- 
Christoph Schlameuss <schlameuss@linux.ibm.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-02 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  9:31 [PATCH v3 0/3] KVM: s390: Use ESCA instead of BSCA at VM init Christoph Schlameuss
2025-05-22  9:31 ` [PATCH v3 1/3] KVM: s390: Set KVM_MAX_VCPUS to 256 Christoph Schlameuss
2025-05-30  7:39   ` Janosch Frank
2025-05-22  9:31 ` [PATCH v3 2/3] KVM: s390: Always allocate esca_block Christoph Schlameuss
2025-05-22 10:49   ` Claudio Imbrenda
2025-05-26  8:22   ` Janosch Frank
2025-06-02 10:01     ` Christoph Schlameuss
2025-05-26 10:36   ` Janosch Frank
2025-06-02  9:24     ` Christoph Schlameuss
2025-05-22  9:31 ` [PATCH v3 3/3] KVM: s390: Specify kvm->arch.sca as esca_block Christoph Schlameuss

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).