Skip to content

KVM: arm64: nv: FGT traps of MDSCR_EL1

Oliver Upton kvmarm 1 version Applied

Status from this message: Applied to fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Compute per-vCPU FGTs at vcpu_load()arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c arch/arm64/kvm/config.c +2 more+151 -1311 reply
2/2KVM: arm64: nv: Use FGT write trap of MDSCR_EL1 when availablearch/arm64/kvm/config.c arch/arm64/kvm/nested.c+15 -41 reply

Reviews trailers per patch

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

PatchJoey Gouly
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm64: nv: FGT traps of MDSCR_EL1

KVM now traps MDSCR_EL1 (and a hell of a lot of other things) because of bad architecture redirecting the register to the VNCR. Marc reports that this hurts (surprised?) meaning it is probably time to send in the FGTs.

As part of this the FGT configuration becomes contextual to the vCPU. FGT computation is now hoisted up into vcpu_load() which avoids doing a bunch of bit twiddling on every entry into the guest.

The last thing we can do to speed this up is add an early exit handleer, but it's EOD for me over here and would rather push out what appears to work right now.

Based directly on kvmarm/next given the fact that the dependency is there also.

Oliver Upton (2):
KVM: arm64: Compute per-vCPU FGTs at vcpu_load()
KVM: arm64: nv: Use FGT write trap of MDSCR_EL1 when available

 arch/arm64/include/asm/kvm_host.h       |  50 ++++++++
 arch/arm64/kvm/arm.c                    |   1 +
 arch/arm64/kvm/config.c                 |  90 ++++++++++++++
 arch/arm64/kvm/hyp/include/hyp/switch.h | 148 +++---------------------
 arch/arm64/kvm/hyp/nvhe/pkvm.c          |   1 +
 arch/arm64/kvm/nested.c                 |   9 +-
 6 files changed, 165 insertions(+), 134 deletions(-)

base-commit: 181ce6b01ad52aeb791545edbae0b92648c6428d

Signature · 1 line
2.47.3