[PATCH v9 26/30] KVM: arm64: Provide interface for configuring and enabling SME for guests

Mark Brown broonie at kernel.org
Wed Jan 14 10:48:34 PST 2026


On Tue, Jan 13, 2026 at 02:40:58PM +0000, Fuad Tabba wrote:
> On Tue, 23 Dec 2025 at 01:23, Mark Brown <broonie at kernel.org> wrote:

> > Due to the overlap with sizing the SVE state we finalise both SVE and
> > SME with a single finalization, preventing any further changes to the
> > SVE and SME configuration once KVM_ARM_VCPU_VEC (an alias for _VCPU_SVE)
> > has been finalised. This is not a thing of great elegance but it ensures

> With KVM_ARM_VCPU_VEC being an alias for KVM_ARM_VCPU_SVE, wouldn't
> kvm_arm_vcpu_finalize() fail for guests that have only SME enabled but
> not SVE?

If one of the extensions hasn't been enabled then the goal is that
finalizing should lock in the current state and prevent enabling it in
future but you should be able to finalize.  The check for vcpu_has_sve()
which blocks finialization is changed to vcpu_has_vec() which is true if
either SVE or SME is enabled.

We should, however, ensure that the VL of disabled vector types isn't
taken into account when allocating state in order to avoid wasting
memory - I'll update for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260114/82e708ef/attachment.sig>


More information about the linux-arm-kernel mailing list