armqemu

How to specify SME Vector Length when running QEMU for ARMv9 in user mode on Ubuntu 20.04?


I am currently working on emulating an ARMv9 architecture with SME (Scalable Matrix Extension) using QEMU on an x86 host running Ubuntu 20.04. I am using the qemu-aarch64 binary to run my tests in user mode, but I am facing an issue when trying to specify the SME vector length.

From the QEMU documentation (https://qemu.readthedocs.io/en/v9.0.2/system/arm/cpu-features.html#sme-cpu-properties), I understand that the sme_default_vector_length parameter needs to be configured in /proc/sys/abi/ to control the SME vector length. However, when I check my system, I do not see this parameter in /proc/sys/abi/.

My question is:

How can I specify or modify the SME vector length while running QEMU in user mode for ARMv9? Is there a way to control this setting in a user-mode QEMU execution, or is this feature limited to system-mode emulation? Any help or guidance would be greatly appreciated. Thank you in advance!


Solution

  • You have misinterpreted that part of the documentation. It is not telling you that you must configure these vector lengths in /proc/sys/abi/. It is telling you that the QEMU options for configuring the vector lengths use the same values as you would use if you were on a real Arm system and configuring the vector length on the real kernel (which you do via /proc/sys/abi), and that it has the same behaviour as if you'd done that on a real Arm Linux kernel.

    For QEMU, you specify the default vector length using the CPU properties sve-default-vector-length and sme-default-vector-length (e.g. -cpu max,sve-default-vector-length=128).