All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] KVM: arm64: Writable MIDR/REVIDR (and associated baggage)
@ 2025-02-25  0:53 Oliver Upton
  2025-02-25  0:53 ` [PATCH v4 1/5] KVM: arm64: Set HCR_EL2.TID1 unconditionally Oliver Upton
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Oliver Upton @ 2025-02-25  0:53 UTC (permalink / raw)
  To: kvmarm
  Cc: Marc Zyngier, Joey Gouly, Suzuki K Poulose, Sebastian Ott,
	Oliver Upton

This is hopefully the last take on the writable MIDR/REVIDR/AIDR series.

I've restructured things in order to work around the existing
shortcomings, have a stable-worthy backport for SMIDR_EL1, and avoid
breaking ABI.

I personally hate using a capability for this, but given the subtlety of
the issue (and our habit of breaking save/restore) it is probably best
to put userspace in the driver's seat.

v3: https://lore.kernel.org/kvmarm/20250218163443.32836-1-sebott@redhat.com/

v3 -> v4:
 - Trap SMIDR_EL1 accesses so they actually UNDEF
 - Snapshot MIDR, REVIDR, and AIDR from the boot CPU
 - Require buy-in from userspace to make ID registers writable

Oliver Upton (2):
  KVM: arm64: Set HCR_EL2.TID1 unconditionally
  KVM: arm64: Load VPIDR_EL2 with the VM's MIDR_EL1 value

Sebastian Ott (3):
  KVM: arm64: Maintain per-VM copy of implementation ID regs
  KVM: arm64: Allow userspace to change the implementation ID registers
  KVM: selftests: arm64: Test writes to MIDR,REVIDR,AIDR

 Documentation/virt/kvm/api.rst                |  18 ++
 arch/arm64/include/asm/kvm_arm.h              |   4 +-
 arch/arm64/include/asm/kvm_host.h             |  11 +
 arch/arm64/kvm/arm.c                          |   9 +
 arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h    |  14 +-
 arch/arm64/kvm/hyp/nvhe/sysreg-sr.c           |   4 +-
 arch/arm64/kvm/hyp/vhe/sysreg-sr.c            |  28 +--
 arch/arm64/kvm/sys_regs.c                     | 219 +++++++++++-------
 include/uapi/linux/kvm.h                      |   1 +
 .../testing/selftests/kvm/arm64/set_id_regs.c |  37 ++-
 10 files changed, 229 insertions(+), 116 deletions(-)


base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
-- 
2.39.5


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

end of thread, other threads:[~2025-02-28 13:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25  0:53 [PATCH v4 0/5] KVM: arm64: Writable MIDR/REVIDR (and associated baggage) Oliver Upton
2025-02-25  0:53 ` [PATCH v4 1/5] KVM: arm64: Set HCR_EL2.TID1 unconditionally Oliver Upton
2025-02-25 11:09   ` Marc Zyngier
2025-02-25  0:53 ` [PATCH v4 2/5] KVM: arm64: Maintain per-VM copy of implementation ID regs Oliver Upton
2025-02-25  0:53 ` [PATCH v4 3/5] KVM: arm64: Load VPIDR_EL2 with the VM's MIDR_EL1 value Oliver Upton
2025-02-25  0:54 ` [PATCH v4 4/5] KVM: arm64: Allow userspace to change the implementation ID registers Oliver Upton
2025-02-25 11:19   ` Marc Zyngier
2025-02-25  0:54 ` [PATCH v4 5/5] KVM: selftests: arm64: Test writes to MIDR,REVIDR,AIDR Oliver Upton
2025-02-27 20:39   ` Mark Brown
2025-02-28  9:47     ` Sebastian Ott
2025-02-28 13:21       ` Sebastian Ott
2025-02-25 13:54 ` [PATCH v4 0/5] KVM: arm64: Writable MIDR/REVIDR (and associated baggage) Marc Zyngier
2025-02-26  9:49 ` Oliver Upton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.