public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] KVM: arm64: Cleanup + fix to vCPU reset, feature flags
@ 2023-09-20 19:50 Oliver Upton
  2023-09-20 19:50 ` [PATCH 1/8] KVM: arm64: Add generic check for system-supported vCPU features Oliver Upton
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Oliver Upton @ 2023-09-20 19:50 UTC (permalink / raw)
  To: kvmarm
  Cc: kvm, Marc Zyngier, James Morse, Suzuki K Poulose, Zenghui Yu,
	Oliver Upton

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
-- 
2.42.0.515.g380fc7ccd1-goog


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-09-21 22:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 19:50 [PATCH 0/8] KVM: arm64: Cleanup + fix to vCPU reset, feature flags Oliver Upton
2023-09-20 19:50 ` [PATCH 1/8] KVM: arm64: Add generic check for system-supported vCPU features Oliver Upton
2023-09-21  8:30   ` Marc Zyngier
2023-09-21 12:47   ` Philippe Mathieu-Daudé
2023-09-20 19:50 ` [PATCH 2/8] KVM: arm64: Hoist PMUv3 check into KVM_ARM_VCPU_INIT ioctl handler Oliver Upton
2023-09-21 12:48   ` Philippe Mathieu-Daudé
2023-09-20 19:50 ` [PATCH 3/8] KVM: arm64: Hoist SVE " Oliver Upton
2023-09-20 19:50 ` [PATCH 4/8] KVM: arm64: Hoist PAuth checks into KVM_ARM_VCPU_INIT ioctl Oliver Upton
2023-09-20 19:50 ` [PATCH 5/8] KVM: arm64: Prevent NV feature flag on systems w/o nested virt Oliver Upton
2023-09-21  8:25   ` Marc Zyngier
2023-09-20 19:50 ` [PATCH 6/8] KVM: arm64: Hoist NV+SVE check into KVM_ARM_VCPU_INIT ioctl handler Oliver Upton
2023-09-20 19:50 ` [PATCH 7/8] KVM: arm64: Remove unused return value from kvm_reset_vcpu() Oliver Upton
2023-09-20 19:50 ` [PATCH 8/8] KVM: arm64: Get rid of vCPU-scoped feature bitmap Oliver Upton
2023-09-21  8:49 ` [PATCH 0/8] KVM: arm64: Cleanup + fix to vCPU reset, feature flags Marc Zyngier
2023-09-21 18:18 ` Oliver Upton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox