Re: [PATCH v8 20/29] s390: Introduce Start Arm Execution instruction
From: Ilya Leoshkevich
Date: Mon Sep 28 2026 - 12:23:39 EST
On 9/28/26 18:15, Steffen Eiden wrote:
On Mon, Sep 28, 2026 at 05:53:33PM +0200, Ilya Leoshkevich wrote:
On 9/18/26 15:30, Steffen Eiden wrote:
The Start Arm Execution (SAE) instruction is the centerpiece for^^^^^^^^
executing arm64 (KVM) guests on s390. Its purpose is, similar to SIE, to
enable accelerated execution of arm64 virtual machines. SAE expects the
physical address of a control block as the only argument.
The host is responsible to save & restore
- GPRs 0-13
- access register 0-15
registers> - breaking event register (BEAR)
- vector/floating point registers^^^^^^^^^^^^^^^^^
between SAE executions to guarantee host consistency.
GPRs and BEAR are save and restores in the asm functions. The other
saved and restored
register are handled in within C code. Access registers are handled in a^^^^^^^^ ^^
registers not needed probably?
later patch and SVEs will be handled when they are introduced in a
future series. Most arm64 registers are handled by a satellite block
called save_area. Some registers, frequently used by hypervisors, are
placed into the SAE control block itself.
Enlighten asm/kvm_host_types.h for the new header variant. The new
header is chosen instead of asm/kvm_host_s390_types.h if KVM_S390_ARM64
is defined.
Co-developed-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
Signed-off-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
Co-developed-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>
Signed-off-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>
Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
---
arch/s390/include/asm/asm-prototypes.h | 1 +
arch/s390/include/asm/kvm_host_arm64_types.h | 124 +++++++++++++++++++
arch/s390/include/asm/kvm_host_types.h | 4 +
arch/s390/include/asm/sae.h | 58 +++++++++
arch/s390/include/asm/stacktrace.h | 5 +
arch/s390/kernel/asm-offsets.c | 1 +
arch/s390/kernel/entry.S | 22 ++++
arch/s390/tools/opcodes.txt | 3 +
8 files changed, 218 insertions(+)
create mode 100644 arch/s390/include/asm/kvm_host_arm64_types.h
create mode 100644 arch/s390/include/asm/sae.h
[...]
yes. Also, some later (unsent) patch needs this and before I forget this, let's+SYM_FUNC_START(__sae64a)
+ stmg %r6,%r14,__SF_GPRS(%r15) # store kernel registers
Strictly speaking we don't need to save %r14, but I guess you do this
for unwinding?
do it now.
Thanks for the clarification!
Reviewed-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
with typos fixes.