Skip to content

KVM: arm64: Allow userspace to modify CTR_EL0

Oliver Upton kvm kvmarm 1 version Applied

Status from this message: Applied to kvmarm/next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest10 patches 15 repliesApplied

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/10KVM: arm64: Get sys_reg encoding from descriptor in idregs_debug_show()arch/arm64/kvm/sys_regs.c+1 -11 reply
2/10KVM: arm64: Make idregs debugfs iterator search sysreg table directlyarch/arm64/kvm/sys_regs.c+23 -131 reply
3/10KVM: arm64: Use read-only helper for reading VM ID registersarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/pmu-emul.c arch/arm64/kvm/sys_regs.c+19 -51 reply
4/10KVM: arm64: Add helper for writing ID regsarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/nested.c arch/arm64/kvm/sys_regs.c+18 -61 reply
5/10KVM: arm64: nv: Use accessors for modifying ID registersarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/nested.c+122 -1350 replies
6/10KVM: arm64: unify code to prepare trapsarch/arm64/include/asm/kvm_emulate.h arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c +1 more+43 -350 replies
7/10KVM: arm64: Treat CTR_EL0 as a VM feature ID registerarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/sys_regs.c+14 -109 replies
8/10KVM: arm64: show writable masks for feature registersarch/arm64/kvm/sys_regs.c+5 -140 replies
9/10KVM: arm64: rename functions for invariant sys regsarch/arm64/kvm/sys_regs.c+5 -50 replies
10/10KVM: selftests: arm64: Test writes to CTR_EL0tools/testing/selftests/kvm/aarch64/set_id_regs.c+16 -00 replies

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by.

PatchEric AugerShaoqin HuangSebastian Ott
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/10] KVM: arm64: Allow userspace to modify CTR_EL0

As I'd mentioned on the list, here is my rework of Sebastian's CTR_EL0 series. Changes this time around:

- Drop the cross-validation of the guest's CTR_EL0 with CLIDR_EL1 and the CCSIDR_EL1 hierarchy, instead independently checking these registers against the system's CTR_EL0 value.

- Rework the idregs debugfs interface to print all VM scoped feature ID registers, which now includes CTR_EL0.

- Only reset the VM scoped value of CTR_EL0 once for a VM

- Make feature ID register accesses go through read / write helpers, with the intention of abstracting the layout of the registers + adding sanity checks to writers.

What I didn't do after all is come up with a better generic way to store ID registers at the VM scope, but the hope is that the accessors will make that trivial to change in the future.

Oliver Upton (5):
KVM: arm64: Get sys_reg encoding from descriptor in
idregs_debug_show()
KVM: arm64: Make idregs debugfs iterator search sysreg table directly
KVM: arm64: Use read-only helper for reading VM ID registers
KVM: arm64: Add helper for writing ID regs
KVM: arm64: nv: Use accessors for modifying ID registers

Sebastian Ott (5):
KVM: arm64: unify code to prepare traps
KVM: arm64: Treat CTR_EL0 as a VM feature ID register
KVM: arm64: show writable masks for feature registers
KVM: arm64: rename functions for invariant sys regs
KVM: selftests: arm64: Test writes to CTR_EL0

 arch/arm64/include/asm/kvm_emulate.h          |  40 +--
 arch/arm64/include/asm/kvm_host.h             |  26 +-
 arch/arm64/kvm/arm.c                          |   2 +-
 arch/arm64/kvm/nested.c                       | 256 +++++++++---------
 arch/arm64/kvm/pmu-emul.c                     |   2 +-
 arch/arm64/kvm/sys_regs.c                     | 140 ++++++----
 .../selftests/kvm/aarch64/set_id_regs.c       |  16 ++
 7 files changed, 262 insertions(+), 220 deletions(-)

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 1 line
2.45.2.627.g7a2c4fd464-goog