[RFC PATCH v7 08/28] HACK! KVM: arm64: Disable SPE virtualization if protected KVM is enabled

Alexandru Elisei alexandru.elisei at arm.com
Fri Nov 27 07:04:42 PST 2026


Hi Lorenzo,

On Fri, Oct 16, 2026 at 03:30:26PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Thu, Sep 03, 2026 at 05:06:03PM +0100, Alexandru Elisei wrote:
> > For RFC only.
> >
> 
> I realise this isn't intended for the final series :) but be good to put
> something here briefly for reviewers to explain why this is here, e.g. pKVM
> needs special attention etc. Similar comment for 9, 10 if there's an RFC
> respin.
> 
> So for this and patches 9, 10 in general it seems you disable the feature
> for:
> 
> - pKVM (at global level)
> - non-VHE
> - nested virt
> 
> Are these temporary for proof-of-concept reasons or do you plan to make
> them permanent limitations for the initial implementation of SPE?

This was intended to be temporary ('For RFC only'), until we can get to a
consensus that using guest_memfd to keep memory mapped at stage 2 for SPE is
viable.

As per the ongoing conversation on the cover letter [0], it is possible
that these limitations (VHE-only, no pKVM, no NV) might end up as part of
the initial implementation.

[0] https://lore.kernel.org/kvmarm/auy-TwnMbIn-r2xl@gremlin/

> 
> If the former it'd be good to know what your plans are to provide support
> for these, if the latter it seems sensible to put these all in one patch
> that describes why you are limiting each.

The reason for each limitation:

- VHE-only: to save me the effort to implement the context switching code, which
  is a pain to get right. Arguably this is the easiest to implement out of the
  three though.

- no pKVM: last I checked, the __host__ SPE driver is broken under pKVM, didn't
  even bother figuring out if it can be made to work for a guest.

- no NV: too much complexity around reinjecting an SPE fault back into the L1
  hypervisor for an RFC. I'm also not sure if KVM can configure VNCR_EL1 to
  transform accesses to the profiling buffer system registers to memory accesses
  instead of traps, and how that interacts with the errata workarounds, and with
  dirty page logging.

Thanks,
Alex



More information about the linux-arm-kernel mailing list