public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] KVM: arm64: Fixes to fine grain traps and pKVM traps
@ 2023-12-06 10:04 Fuad Tabba
  2023-12-06 10:04 ` [PATCH v2 01/12] KVM: Add missing HCRX_EL2 field definitions Fuad Tabba
                   ` (11 more replies)
  0 siblings, 12 replies; 30+ messages in thread
From: Fuad Tabba @ 2023-12-06 10:04 UTC (permalink / raw)
  To: kvmarm
  Cc: maz, oliver.upton, james.morse, suzuki.poulose, yuzenghui,
	catalin.marinas, will, eric.auger, jingzhangos, joey.gouly, tabba,
	linux-arm-kernel

Changes from v1:
- Handle HAFGRTR_EL2 in nested virt
- Update the nested virt FGT tables with the added trap bits (Marc)
- Use the generated value for RES0 (Marc)
- Calculate the value of NMASK based on RES0 and MASK

This patch series has fixes, updates, and code for validating
fine grain trap register masks, as well as some fixes to feature
trapping in pKVM.

New fine grain trap (FGT) bits have been defined in the latest
Arm Architecture System Registers xml specification (2023-09)
[*], so the code is updated to reflect them. Moreover, some of
the already-defined masks overlap with RES0, which this series
fixes.

It also adds FGT register masks that weren't defined earlier,
handling of HAFGRTR_EL2 in nested virt, as well as build time
validation that the bits of the various masks are all accounted
for and without overlap.

Based on 6.7-rc4.

Cheers,
/fuad

[*] https://developer.arm.com/downloads/-/exploration-tools

Fuad Tabba (12):
  KVM: Add missing HCRX_EL2 field definitions
  KVM: arm64: Add latest HFGxTR_EL2 FGT entries to nested virt
  KVM: arm64: Add latest HFGITR_EL2 FGT entries to nested virt
  KVM: arm64: Add bit masks for HAFGRTR_EL2
  KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt
  KVM: arm64: Update and fix FGT register masks
  KVM: arm64: Add build validation for FGT trap mask values
  KVM: arm64: Use generated FGT RES0 bits instead of specifying them
  KVM: arm64: Generate the HFGWTR-only RES0 bits
  KVM: arm64: Define FGT NMASK bits relative to other fields
  KVM: arm64: Trap external trace for protected VMs
  KVM: arm64: Mark CMOW as allowed for protected VMs

 arch/arm64/include/asm/kvm_arm.h              | 58 +++++++------
 arch/arm64/include/asm/kvm_host.h             |  1 +
 arch/arm64/include/asm/sysreg.h               | 20 +++++
 arch/arm64/kvm/emulate-nested.c               | 63 ++++++++++++++
 arch/arm64/kvm/hyp/include/hyp/switch.h       | 29 +++++++
 .../arm64/kvm/hyp/include/nvhe/fixed_config.h |  4 +-
 arch/arm64/kvm/hyp/nvhe/pkvm.c                |  4 +
 arch/arm64/kvm/sys_regs.c                     |  1 +
 arch/arm64/tools/sysreg                       | 82 ++++++++++++++++++-
 9 files changed, 231 insertions(+), 31 deletions(-)


base-commit: 33cc938e65a98f1d29d0a18403dbbee050dcad9a
-- 
2.43.0.rc2.451.g8631bc7472-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-12-08 13:52 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 10:04 [PATCH v2 00/12] KVM: arm64: Fixes to fine grain traps and pKVM traps Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 01/12] KVM: Add missing HCRX_EL2 field definitions Fuad Tabba
2023-12-07 16:57   ` Mark Brown
2023-12-08  8:14     ` Fuad Tabba
2023-12-08 13:43       ` Mark Brown
2023-12-06 10:04 ` [PATCH v2 02/12] KVM: arm64: Add latest HFGxTR_EL2 FGT entries to nested virt Fuad Tabba
2023-12-07 17:06   ` Mark Brown
2023-12-08  8:16     ` Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 03/12] KVM: arm64: Add latest HFGITR_EL2 " Fuad Tabba
2023-12-07 17:14   ` Mark Brown
2023-12-08  8:17     ` Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 04/12] KVM: arm64: Add bit masks for HAFGRTR_EL2 Fuad Tabba
2023-12-07 17:19   ` Mark Brown
2023-12-08  8:17     ` Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 05/12] KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt Fuad Tabba
2023-12-07 17:28   ` Mark Brown
2023-12-08  8:19     ` Fuad Tabba
2023-12-08 13:51       ` Mark Brown
2023-12-06 10:04 ` [PATCH v2 06/12] KVM: arm64: Update and fix FGT register masks Fuad Tabba
2023-12-07 15:00   ` Joey Gouly
2023-12-07 15:06     ` Fuad Tabba
2023-12-07 17:12       ` Joey Gouly
2023-12-08  8:23         ` Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 07/12] KVM: arm64: Add build validation for FGT trap mask values Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 08/12] KVM: arm64: Use generated FGT RES0 bits instead of specifying them Fuad Tabba
2023-12-06 10:04 ` [PATCH v2 09/12] KVM: arm64: Generate the HFGWTR-only RES0 bits Fuad Tabba
2023-12-06 10:19   ` Fuad Tabba
2023-12-06 10:05 ` [PATCH v2 10/12] KVM: arm64: Define FGT NMASK bits relative to other fields Fuad Tabba
2023-12-06 10:05 ` [PATCH v2 11/12] KVM: arm64: Trap external trace for protected VMs Fuad Tabba
2023-12-06 10:05 ` [PATCH v2 12/12] KVM: arm64: Mark CMOW as allowed " Fuad Tabba

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