Re: [PATCH v3 23/23] s390: Report AEF features to sysfs

From: Janosch Frank

Date: Mon Nov 23 2026 - 08:05:09 EST


On 11/6/26 5:07 PM, Steffen Eiden wrote:
Display various information about the Arm execution Facility (AEF) to
userspace. The files are located in /sys/firmware/aef/. Show if the
feature is available and usable for the host, which formats are
available, and how many arm vCPUS per guest are supported by the
machine. Additionally, provide the raw binary output of QAAF fc1 (Query
Model Capabilities) in the file qmc and fc2 (Initial
System-Registers-Save Area) in the file save_area.

Co-developed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
Co-developed-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
Signed-off-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
---
Documentation/ABI/testing/sysfs-firmware-aef | 70 +++++++++++++++++
arch/s390/kernel/aef.c | 113 +++++++++++++++++++++++++++
2 files changed, 183 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-firmware-aef b/Documentation/ABI/testing/sysfs-firmware-aef
new file mode 100644
index 000000000000..6ccd8491a017
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-aef

[...]

+
+What: /sys/firmware/aef/query/sae_avail
+KernelVersion: 7.5
+Contact: linux-s390@xxxxxxxxxxxxxxx
+Description: Read-only, decimal boolean. Reports 1 if the machine
+ provides the SAE instruction.
+
+What: /sys/firmware/aef/query/ptff_avail
+KernelVersion: 7.5
+Contact: linux-s390@xxxxxxxxxxxxxxx
+Description: Read-only, decimal boolean. Reports 1 if the PTFF
+ instruction supports the QAGTO and QAGPT subfunctions.
+
+What: /sys/firmware/aef/query/edat2_avail
+KernelVersion: 7.5
+Contact: linux-s390@xxxxxxxxxxxxxxx
+Description: Read-only, decimal boolean. Reports 1 if the EDAT-2
+ facility is available.

I don't think we need any of the three files above.
sae should be reported as a feature in /proc/cpuinfo, same as sief2.

edat2 is facility 78 in the same file.

PTFF-QAF is unprivileged.

Also, if aef is the requirement for the directory to exist, why would saef not be enabled?