Skip to content

KVM: arm64: Reorganise vcpu first run

Marc Zyngier kvm kvmarm linux-arm-kernel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 0 repliesNew
  2. v15 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: arm64: Move SVE state mapping at HYP to finalize-timearch/arm64/kvm/fpsimd.c arch/arm64/kvm/reset.c+10 -120 replies
2/5KVM: arm64: Move kvm_arch_vcpu_run_pid_change() out of linearch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c+6 -60 replies
3/5KVM: arm64: Restructure the point where has_run_once is advertisedarch/arm64/kvm/arm.c+12 -80 replies
4/5KVM: arm64: Merge kvm_arch_vcpu_run_pid_change() and kvm_vcpu_first_run_init()arch/arm64/kvm/arm.c+18 -180 replies
5/5KVM: arm64: Drop vcpu->arch.has_run_once for vcpu->pidarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c arch/arm64/kvm/vgic/vgic-init.c+6 -90 replies

Reviews trailers per patch

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

PatchAndrew Jones
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/5] KVM: arm64: Reorganise vcpu first run

This is v2 of this series reworking the vcpu first run.

KVM/arm64 relies heavily on a bunch of things to be done on the first run of the vcpu. We also do a bunch of things on PID change. It turns out that these two things are pretty similar (the first PID change is also the first run).

This small series aims at simplifying all that, and to get rid of the vcpu->arch.has_run_once state. On top of being a decent cleanup, it also results in a minor performance improvement (my Debian installer on M1 consistently went from 2:23 down to 2:22, a ~0.6% reduction in execution time).

* From v1 [1]:
- Moved the kvm_vcpu_initialized() check into kvm_vcpu_first_run_init()
- Reorganise the series so that the userspace irqchip static key change appears earlier
- Collected Andrew's RBs

[1] https://lore.kernel/org/r/[email protected]

Marc Zyngier (5):
KVM: arm64: Move SVE state mapping at HYP to finalize-time
KVM: arm64: Move kvm_arch_vcpu_run_pid_change() out of line
KVM: arm64: Restructure the point where has_run_once is advertised
KVM: arm64: Merge kvm_arch_vcpu_run_pid_change() and
kvm_vcpu_first_run_init()
KVM: arm64: Drop vcpu->arch.has_run_once for vcpu->pid

 arch/arm64/include/asm/kvm_host.h | 12 ++-----
 arch/arm64/kvm/arm.c              | 57 +++++++++++++++++--------------
 arch/arm64/kvm/fpsimd.c           | 11 ------
 arch/arm64/kvm/reset.c            | 11 +++++-
 arch/arm64/kvm/vgic/vgic-init.c   |  2 +-
 5 files changed, 46 insertions(+), 47 deletions(-)
Signature · 1 line
2.30.2