[PATCH v3 23/23] s390: Report AEF features to sysfs
Steffen Eiden
seiden at linux.ibm.com
Tue Nov 24 00:43:18 PST 2026
On Mon, Nov 23, 2026 at 02:04:12PM +0100, Janosch Frank wrote:
> 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 at linux.ibm.com>
> > Signed-off-by: Janosch Frank <frankja at linux.ibm.com>
> > Co-developed-by: Andreas Grapentin <gra at linux.ibm.com>
> > Signed-off-by: Andreas Grapentin <gra at linux.ibm.com>
> > Signed-off-by: Steffen Eiden <seiden at linux.ibm.com>
> > ---
> > 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 at vger.kernel.org
> > +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 at vger.kernel.org
> > +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 at vger.kernel.org
> > +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.
OK, I can remove those. Primarily, I added them for convenience. I'll
add those to the Documentation (I'll create one soonish)
>
> Also, if aef is the requirement for the directory to exist, why would saef
> not be enabled?
>
You are right. I'll drop the three files.
I am thinking about always providing the aef directory. And just not
calling qaaf in the !aef case. Then userspace does not have to test if
the file exists and guess if the file does not exists because the kernel
does not support it or the HW. Or is this a non-issue?
Steffen
More information about the linux-arm-kernel
mailing list