KVM: arm64: Fix initialization of trap register values in pKVM
Status from this message: Applied to kvmarm/next, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 1 replyApplied
- v14 patches 7 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu()arch/ arch/ arch/ +2 more | +3 | 0 replies | |
| 2/4 | KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp usearch/ arch/ | +4 | 0 replies | |
| 3/4 | KVM: arm64: Initialize the hypervisor's VM state at EL2arch/ | +77 | 0 replies | |
| 4/4 | KVM: arm64: Initialize trap register values in hyp in pKVMarch/ arch/ | +38 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] KVM: arm64: Fix initialization of trap register values in pKVM
The patch that dropped PAuth instruction/key traps [1] did not apply to non-protected VMs in protected mode, since as noted [2], the hypervisor is supposed to handle trap register values in pKVM. However, in pKVM upstream code the hypervisor does not set all necessary trap register values in protected mode, and running non-protected VMs with PAuth enabled in pKVM has been broken since then [1].
This patch series lets the hypervisor initialize the values of trap registers for both non-protected and protected VMs, including setting PAuth traps depending on whether PAuth is available in the system and configured for the target VCPU.
Based on Linux 6.12-rc3 (8e929cb546ee).
Changes from V1 [3]:
- Clarify rational for allowing flushing of HCR_EL2 TWI and TWE bits in commit msg (Oliver)
Cheers,
/fuad
[1] Commit 814ad8f96e92 ("KVM: arm64: Drop trapping of PAuth instructions/keys")
[2] Commit 7e814a20f6da ("KVM: arm64: Tidying up PAuth code in KVM")
[3] https://lore.kernel.org/all/[email protected]/
Fuad Tabba (4):
KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu()
KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use
KVM: arm64: Initialize the hypervisor's VM state at EL2
KVM: arm64: Initialize trap register values in hyp in pKVM
arch/arm64/include/asm/kvm_asm.h | 1 - arch/arm64/include/asm/kvm_emulate.h | 4 + arch/arm64/kvm/arm.c | 8 -- .../arm64/kvm/hyp/include/nvhe/trap_handler.h | 2 - arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 +- arch/arm64/kvm/hyp/nvhe/pkvm.c | 116 +++++++++++++++++- arch/arm64/kvm/reset.c | 5 - 7 files changed, 122 insertions(+), 26 deletions(-)
base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354
Signature · 1 line
2.47.0.rc1.288.g06298d1525-goog