Skip to content

KVM: arm64: Cleanup + fix to vCPU reset, feature flags

Oliver Upton kvm kvmarm 1 version Applied

Status from this message: Applied to kvmarm/next, with the change to use cpus_have_final_cap() per

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8KVM: arm64: Add generic check for system-supported vCPU featuresarch/arm64/kvm/arm.c+13 -32 replies
2/8KVM: arm64: Hoist PMUv3 check into KVM_ARM_VCPU_INIT ioctl handlerarch/arm64/kvm/arm.c arch/arm64/kvm/reset.c+3 -51 reply
3/8KVM: arm64: Hoist SVE check into KVM_ARM_VCPU_INIT ioctl handlerarch/arm64/kvm/arm.c arch/arm64/kvm/reset.c+6 -110 replies
4/8KVM: arm64: Hoist PAuth checks into KVM_ARM_VCPU_INIT ioctlarch/arm64/kvm/arm.c arch/arm64/kvm/reset.c+16 -180 replies
5/8KVM: arm64: Prevent NV feature flag on systems w/o nested virtarch/arm64/kvm/arm.c+3 -01 reply
6/8KVM: arm64: Hoist NV+SVE check into KVM_ARM_VCPU_INIT ioctl handlerarch/arm64/kvm/arm.c arch/arm64/kvm/reset.c+6 -70 replies
7/8KVM: arm64: Remove unused return value from kvm_reset_vcpu()arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arch_timer.c arch/arm64/kvm/arm.c +2 more+9 -150 replies
8/8KVM: arm64: Get rid of vCPU-scoped feature bitmaparch/arm64/include/asm/kvm_emulate.h arch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_nested.h +5 more+18 -220 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc ZyngierPhilippe Mathieu-Daudé
SeriesR-b
1/8R-b
2/8R-b
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] KVM: arm64: Cleanup + fix to vCPU reset, feature flags

The way we do vCPU feature flag checks is a bit of a scattered mess between the KVM_ARM_VCPU_INIT ioctl handler and kvm_reset_vcpu(). Let's move all the feature flag checks up into the ioctl() handler to eliminate failure paths from kvm_reset_vcpu(), as other usage of this function no not handle returned errors.

Nobody screamed about the VM-wide feature flag change, so its also a good time to rip out the vestiges of the vCPU-scoped bitmap.

I also spotted a bug with the NV feature flag where we allow it regardless of system support.

Oliver Upton (8):
KVM: arm64: Add generic check for system-supported vCPU features
KVM: arm64: Hoist PMUv3 check into KVM_ARM_VCPU_INIT ioctl handler
KVM: arm64: Hoist SVE check into KVM_ARM_VCPU_INIT ioctl handler
KVM: arm64: Hoist PAuth checks into KVM_ARM_VCPU_INIT ioctl
KVM: arm64: Prevent NV feature flag on systems w/o nested virt
KVM: arm64: Hoist NV+SVE check into KVM_ARM_VCPU_INIT ioctl handler
KVM: arm64: Remove unused return value from kvm_reset_vcpu()
KVM: arm64: Get rid of vCPU-scoped feature bitmap

 arch/arm64/include/asm/kvm_emulate.h | 13 +++---
 arch/arm64/include/asm/kvm_host.h    |  5 +--
 arch/arm64/include/asm/kvm_nested.h  |  3 +-
 arch/arm64/kvm/arch_timer.c          |  4 +-
 arch/arm64/kvm/arm.c                 | 62 +++++++++++++++++++++-------
 arch/arm64/kvm/hypercalls.c          |  2 +-
 arch/arm64/kvm/reset.c               | 56 +++++--------------------
 include/kvm/arm_arch_timer.h         |  2 +-
 include/kvm/arm_pmu.h                |  2 +-
 include/kvm/arm_psci.h               |  2 +-
 10 files changed, 72 insertions(+), 79 deletions(-)

base-commit: ce9ecca0238b140b88f43859b211c9fdfd8e5b70

Signature · 1 line
2.42.0.515.g380fc7ccd1-goog