Skip to content

KVM: arm64: nv: Align feature limitations with current state of support

Oliver Upton kvmarm 1 version Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11KVM: arm64: nv: Convert masks to denylists in limit_nv_id_reg()arch/arm64/kvm/nested.c+33 -140 replies
2/11KVM: arm64: nv: Don't erroneously claim FEAT_DoubleLock for NV VMsarch/arm64/kvm/nested.c arch/arm64/kvm/sys_regs.c+25 -10 replies
3/11KVM: arm64: nv: Expose FEAT_DF2 to NV-enabled VMsarch/arm64/kvm/nested.c+0 -10 replies
4/11KVM: arm64: nv: Expose FEAT_RASv1p1 via RAS_fracarch/arm64/kvm/nested.c+0 -10 replies
5/11KVM: arm64: nv: Expose FEAT_ECBHB to NV-enabled VMsarch/arm64/kvm/nested.c+1 -20 replies
6/11KVM: arm64: nv: Expose FEAT_AFP to NV-enabled VMsarch/arm64/kvm/nested.c+0 -10 replies
7/11KVM: arm64: nv: Exclude guest's TWED configuration when TWE isn't setarch/arm64/kvm/hyp/vhe/switch.c+7 -00 replies
8/11KVM: arm64: nv: Expose FEAT_TWED to NV-enabled VMsarch/arm64/kvm/nested.c+0 -10 replies
9/11KVM: arm64: nv: Advertise FEAT_SpecSEI to NV-enabled VMsarch/arm64/kvm/nested.c+0 -10 replies
10/11KVM: arm64: nv: Advertise FEAT_TIDCP1 to NV-enabled VMsarch/arm64/kvm/nested.c+0 -10 replies
11/11KVM: arm64: nv: Expose up to FEAT_Debugv8p8 to NV-enabled VMsarch/arm64/kvm/nested.c+5 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] KVM: arm64: nv: Align feature limitations with current state of support

There's a mix of features we currently hide for NV VMs that we actually can already support, either because they have no impact on our NV implementation or the feature was already implemented and someone forgot to update the mask...

On top of that, I decided to invert our masking for several registers to have denylist behavior. This is a better way to express things, IMO, as the features we do not support are explicitly listed. In so doing, I found a bug relating to FEAT_DoubleLock where we accidentally claim support where we shouldn't as the 0 value implies the feature is implemented.

I've made each relaxation into its own patch to capture the rationale in the changelog but I'm also fine squashing these based on the affected register. Features that limit our MMU implementation are deliberately left masked, e.g. FEAT_ETS* and FEAT_nTLBPA place constraints on the behavior of our nested MMU. Although the latter is highly unlikely to matter.

Applies to 6.17-rc4. **NOTE** this depends on Jinqian's series to make ID_AA64MMFR1_EL1.TWED writable [*], that should be applied before this series.

[*]: https://lore.kernel.org/kvmarm/[email protected]/

Oliver Upton (11):
KVM: arm64: nv: Convert masks to denylists in limit_nv_id_reg()
KVM: arm64: nv: Don't erroneously claim FEAT_DoubleLock for NV VMs
KVM: arm64: nv: Expose FEAT_DF2 to NV-enabled VMs
KVM: arm64: nv: Expose FEAT_RASv1p1 via RAS_frac
KVM: arm64: nv: Expose FEAT_ECBHB to NV-enabled VMs
KVM: arm64: nv: Expose FEAT_AFP to NV-enabled VMs
KVM: arm64: nv: Exclude guest's TWED configuration when TWE isn't set
KVM: arm64: nv: Expose FEAT_TWED to NV-enabled VMs
KVM: arm64: nv: Advertise FEAT_SpecSEI to NV-enabled VMs
KVM: arm64: nv: Advertise FEAT_TIDCP1 to NV-enabled VMs
KVM: arm64: nv: Expose up to FEAT_Debugv8p8 to NV-enabled VMs

 arch/arm64/kvm/hyp/vhe/switch.c |  7 +++++
 arch/arm64/kvm/nested.c         | 48 +++++++++++++++++++++------------
 arch/arm64/kvm/sys_regs.c       | 25 +++++++++++++++++
 3 files changed, 63 insertions(+), 17 deletions(-)

base-commit: b320789d6883cc00ac78ce83bccbfe7ed58afcf0

Signature · 1 line
2.39.5