Re: [PATCH v6 28/33] KVM: s390: Add basic arm64 kvm module
From: Janosch Frank
Date: Fri Aug 28 2026 - 07:33:48 EST
On 8/12/26 5:36 PM, Steffen Eiden wrote:
Add basic code for the new arm64 on s390 KVM implementation.
Add kernel module boilerplate code and trivial functions.
Add tracing scaffolding.
Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
---
arch/s390/kvm/arm64/arm.c | 157 ++++++++++++++++++++++++++++++++++++
arch/s390/kvm/arm64/arm.h | 7 ++
arch/s390/kvm/arm64/guest.c | 92 +++++++++++++++++++++
arch/s390/kvm/arm64/trace.h | 18 +++++
4 files changed, 274 insertions(+)
create mode 100644 arch/s390/kvm/arm64/arm.c
create mode 100644 arch/s390/kvm/arm64/arm.h
create mode 100644 arch/s390/kvm/arm64/guest.c
create mode 100644 arch/s390/kvm/arm64/trace.h
diff --git a/arch/s390/kvm/arm64/arm.c b/arch/s390/kvm/arm64/arm.c
new file mode 100644
index 000000000000..8e17b7eef813
--- /dev/null
+++ b/arch/s390/kvm/arm64/arm.c
@@ -0,0 +1,157 @@
[...]
+We're sure that the MSLA + 1 - MSOA > MGPAS check aka VIR code 4 will never bite us? Or will you touch this up with the qmc support?
+static u64 kvm_max_guest_address(void)
+{
+ u64 max_addr;
+
+ if (sclp.hamax == U64_MAX)
+ max_addr = TASK_SIZE_MAX;
+ else
+ max_addr = min_t(u64, TASK_SIZE_MAX, sclp.hamax);
+ return ALIGN_DOWN(max_addr + 1, 1 << 30) - 1;
+}