Skip to content

KVM: arm64: NV trap forwarding infrastructure

Marc Zyngier kvm kvmarm linux-arm-kernel 4 versions – Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest28 patches 19 repliesApplied
  2. v327 patches 42 repliesSuperseded
  3. v226 patches 41 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v127 patches33 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/28arm64: Add missing VA CMO encodingsarch/arm64/include/asm/sysreg.h+26 -00 replies
2/28arm64: Add missing ERX*_EL1 encodingsarch/arm64/include/asm/sysreg.h+5 -00 replies
3/28arm64: Add missing DC ZVA/GVA/GZVA encodingsarch/arm64/include/asm/sysreg.h+5 -00 replies
4/28arm64: Add TLBI operation encodingsarch/arm64/include/asm/sysreg.h+128 -00 replies
5/28arm64: Add AT operation encodingsarch/arm64/include/asm/sysreg.h+17 -00 replies
6/28arm64: Add debug registers affected by HDFGxTR_EL2arch/arm64/include/asm/sysreg.h+76 -00 replies
7/28arm64: Add missing BRB/CFP/DVP/CPP instructionsarch/arm64/include/asm/sysreg.h+7 -00 replies
8/28arm64: Add HDFGRTR_EL2 and HDFGWTR_EL2 layoutsarch/arm64/include/asm/sysreg.h arch/arm64/tools/sysreg+129 -20 replies
9/28arm64: Add feature detection for fine grained trapsarch/arm64/kernel/cpufeature.c arch/arm64/tools/cpucaps+8 -00 replies
10/28KVM: arm64: Correctly handle ACCDATA_EL1 trapsarch/arm64/include/asm/sysreg.h arch/arm64/kvm/sys_regs.c+4 -00 replies
11/28KVM: arm64: Add missing HCR_EL2 trap bitsarch/arm64/include/asm/kvm_arm.h+9 -00 replies
12/28KVM: arm64: nv: Add FGT registersarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/sys_regs.c+10 -00 replies
13/28KVM: arm64: Restructure FGT register switchingarch/arm64/include/asm/kvm_arm.h arch/arm64/kvm/hyp/include/hyp/switch.h+50 -270 replies
14/28KVM: arm64: nv: Add trap forwarding infrastructurearch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_nested.h arch/arm64/kvm/emulate-nested.c +2 more+317 -02 replies
15/28KVM: arm64: nv: Add trap forwarding for HCR_EL2arch/arm64/kvm/emulate-nested.c+488 -04 replies
16/28KVM: arm64: nv: Expose FEAT_EVT to nested guestsarch/arm64/kvm/nested.c+1 -20 replies
17/28KVM: arm64: nv: Add trap forwarding for MDCR_EL2arch/arm64/kvm/emulate-nested.c+268 -01 reply
18/28KVM: arm64: nv: Add trap forwarding for CNTHCTL_EL2arch/arm64/kvm/emulate-nested.c+49 -11 reply
19/28KVM: arm64: nv: Add fine grained trap forwarding infrastructurearch/arm64/kvm/emulate-nested.c+87 -31 reply
20/28KVM: arm64: nv: Add trap forwarding for HFGxTR_EL2arch/arm64/kvm/emulate-nested.c+71 -01 reply
21/28KVM: arm64: nv: Add trap forwarding for HFGITR_EL2arch/arm64/include/asm/kvm_arm.h arch/arm64/kvm/emulate-nested.c+113 -01 reply
22/28KVM: arm64: nv: Add trap forwarding for HDFGxTR_EL2arch/arm64/include/asm/kvm_arm.h arch/arm64/kvm/emulate-nested.c+485 -01 reply
23/28KVM: arm64: nv: Add SVC trap forwardingarch/arm64/kvm/arm.c arch/arm64/kvm/handle_exit.c+16 -01 reply
24/28KVM: arm64: nv: Expand ERET trap forwarding to handle FGTarch/arm64/kvm/handle_exit.c+16 -11 reply
25/28KVM: arm64: nv: Add switching support for HFGxTR/HDFGxTRarch/arm64/kvm/hyp/include/hyp/switch.h+48 -01 reply
26/28KVM: arm64: nv: Expose FGT to nested guestsarch/arm64/kvm/nested.c+3 -21 reply
27/28KVM: arm64: Move HCRX_EL2 switch to load/put on VHE systemsarch/arm64/kvm/hyp/include/hyp/switch.h+6 -61 reply
28/28KVM: arm64: nv: Add support for HCRX_EL2arch/arm64/include/asm/kvm_arm.h arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/emulate-nested.c +3 more+83 -371 reply

Reviews trailers per patch

All 28 patches have a Reviewed-by or Acked-by.

PatchEric AugerMiguel LuisCatalin MarinasZenghui YuJing ZhangMark BrownSuzuki K PouloseOliver Upton
1/28R-b R-b A-b R-b R-b
2/28R-b R-b A-b R-b R-b
3/28R-b R-b A-b R-b R-b
4/28R-b R-b A-b R-b R-b
5/28R-b R-b A-b R-b R-b
6/28R-b A-b R-b
7/28R-b R-b A-b R-b
8/28R-b R-b A-b R-b R-b
9/28R-b R-b A-b R-b R-b
10/28R-b R-b R-b
11/28R-b R-b R-b
12/28R-b R-b R-b
13/28R-b R-b R-b
14/28R-b R-b
15/28R-b R-b
16/28R-b R-b
17/28R-b R-b
18/28R-b R-b
19/28R-b R-b
20/28R-b R-b
21/28R-b R-b
22/28R-b R-b R-b
23/28R-b R-b
24/28R-b
25/28R-b R-b
26/28R-b R-b
27/28R-b R-b
28/28R-b R-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 8 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/28] KVM: arm64: NV trap forwarding infrastructure

Another week, another version. Change log below.

I'll drop this into -next now, and see what happens.

* From v3 [3]:

- Renamed trap_group to cgt_group_id (Eric)

- Plenty of comment rework (Eric)

- Fix HCR_EL2.FIEN handling (Miguel)

- Fix missing validation of last MCB entry (Miguel)

- Fix instance of recursive MCB (Jing)

- Handle error return from xa_store()/xa_range_store() (Jing)

- Propagate error generated from populate_nv_trap_config() (Jing)

- Added more consistency checks for sysregs and trap bits

- Added a line number entry, which is useful for debugging overlapping entries.

- Fixed duplicate entries for SP_EL1, DBGDTRRX_EL0 and SCXTNUM_EL0

- Correctly handle fine grained trapping for ERET

- Collected RBs, with thanks

* From v2 [2]:

- Another set up fixups thanks to Oliver, Eric and Miguel: TRCID bits, duplicate encodings, sanity checking, error handling at boot time, spelling mistakes...

- Split the HFGxTR_EL2 patch in two patches: one that provides the FGT infrastructure, and one that provides the HFGxTR_EL2 traps. It makes it easier to review and matches the rest of the series.

- Collected RBs, with thanks

* From v1 [1]:

- Lots of fixups all over the map (too many to mention) after Eric's fantastic reviewing effort. Hopefully the result is easier to understand and less wrong

- Amended Mark's patch to use the ARM64_CPUID_FIELDS() macro

- Collected RBs, with thanks.

[1] https://lore.kernel.org/all/[email protected]
[2] https://lore.kernel.org/all/[email protected]
[3] https://lore.kernel.org/all/[email protected]

Marc Zyngier (27):
arm64: Add missing VA CMO encodings
arm64: Add missing ERX*_EL1 encodings
arm64: Add missing DC ZVA/GVA/GZVA encodings
arm64: Add TLBI operation encodings
arm64: Add AT operation encodings
arm64: Add debug registers affected by HDFGxTR_EL2
arm64: Add missing BRB/CFP/DVP/CPP instructions
arm64: Add HDFGRTR_EL2 and HDFGWTR_EL2 layouts
KVM: arm64: Correctly handle ACCDATA_EL1 traps
KVM: arm64: Add missing HCR_EL2 trap bits
KVM: arm64: nv: Add FGT registers
KVM: arm64: Restructure FGT register switching
KVM: arm64: nv: Add trap forwarding infrastructure
KVM: arm64: nv: Add trap forwarding for HCR_EL2
KVM: arm64: nv: Expose FEAT_EVT to nested guests
KVM: arm64: nv: Add trap forwarding for MDCR_EL2
KVM: arm64: nv: Add trap forwarding for CNTHCTL_EL2
KVM: arm64: nv: Add fine grained trap forwarding infrastructure
KVM: arm64: nv: Add trap forwarding for HFGxTR_EL2
KVM: arm64: nv: Add trap forwarding for HFGITR_EL2
KVM: arm64: nv: Add trap forwarding for HDFGxTR_EL2
KVM: arm64: nv: Add SVC trap forwarding
KVM: arm64: nv: Expand ERET trap forwarding to handle FGT
KVM: arm64: nv: Add switching support for HFGxTR/HDFGxTR
KVM: arm64: nv: Expose FGT to nested guests
KVM: arm64: Move HCRX_EL2 switch to load/put on VHE systems
KVM: arm64: nv: Add support for HCRX_EL2

Mark Brown (1):
arm64: Add feature detection for fine grained traps

 arch/arm64/include/asm/kvm_arm.h        |   50 +
 arch/arm64/include/asm/kvm_host.h       |    7 +
 arch/arm64/include/asm/kvm_nested.h     |    2 +
 arch/arm64/include/asm/sysreg.h         |  268 +++-
 arch/arm64/kernel/cpufeature.c          |    7 +
 arch/arm64/kvm/arm.c                    |    4 +
 arch/arm64/kvm/emulate-nested.c         | 1850 +++++++++++++++++++++++
 arch/arm64/kvm/handle_exit.c            |   29 +-
 arch/arm64/kvm/hyp/include/hyp/switch.h |  127 +-
 arch/arm64/kvm/nested.c                 |   11 +-
 arch/arm64/kvm/sys_regs.c               |   15 +
 arch/arm64/kvm/trace_arm.h              |   26 +
 arch/arm64/tools/cpucaps                |    1 +
 arch/arm64/tools/sysreg                 |  129 ++
 14 files changed, 2485 insertions(+), 41 deletions(-)
Signature · 1 line
2.34.1