[RFC PATCH v7 07/28] KVM: arm64: Add KVM_ARM_VCPU_SPE VCPU feature
Alexandru Elisei
alexandru.elisei at arm.com
Thu Nov 12 09:18:49 PST 2026
Hi Lorenzo,
On Fri, Oct 16, 2026 at 03:23:57PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Thu, Sep 03, 2026 at 05:06:02PM +0100, Alexandru Elisei wrote:
> > Add a new VCPU feature that enables SPE virtualization when set by
> > userspace. KVM_VCPU_MAX_FEATURE will be bumped and the feature will
> > become selectable by userspace once SPE support in KVM is implemented.
>
> I guess it's also limited currently at this point in the series by
> KVM_CAP_ARM_SPE being unselectable as it stands I think?
Yes, indirectly - KVM_CAP_ARM_SPE is advertised only when
kvm_supports_spe() is true, and KVM_ARM_VCPU_SPE also depends on
kvm_supports_spe(). CONFIG_KVM_ARM_SPE=y is required, but not sufficient,
for kvm_supports_spe() to be true. So all of this depends on the Kconfig
option, maybe I should document that in the capability doc.
>
> Maybe worth mentioning here that you're adding KVM_ARM_VPCU_SPE to the uapi,
> updating docs, etc.?
I can mention it, but the short diff should speak for itself?
>
> >
> > Signed-off-by: Alexandru Elisei <alexandru.elisei at arm.com>
>
> I wonder if there are any dependencies that need expressing in
> arch/arm64/kvm/config.c?
>
> In any case all LGTM, with mega-nit below addressed :):
>
> Reviewed-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
>
> > ---
> > Documentation/virt/kvm/api.rst | 2 ++
> > arch/arm64/include/asm/kvm_spe.h | 5 +++++
> > arch/arm64/include/uapi/asm/kvm.h | 1 +
> > arch/arm64/kvm/arm.c | 7 +++++++
> > 4 files changed, 15 insertions(+)
> >
> > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> > index 1ed5c389c7a4..654736fac78c 100644
> > --- a/Documentation/virt/kvm/api.rst
> > +++ b/Documentation/virt/kvm/api.rst
> > @@ -3591,6 +3591,8 @@ Possible features:
> > Depends on KVM_CAP_ARM_EL2_E2H0.
> > KVM_ARM_VCPU_HAS_EL2 must also be set.
> >
> > + - KVM_ARM_VCPU_SPE: Enable SPE for the CPU. Depends on KVM_CAP_ARM_SPE.
>
> Super nitty, sorry, but it seems other parts of the docs use tabs, whereas this
> uses spaces?
Fixed.
Thanks,
Alex
More information about the linux-arm-kernel
mailing list