]> www.infradead.org Git - nvme.git/commit
KVM: arm64: Add early_param to control WFx trapping
authorColton Lewis <coltonlewis@google.com>
Thu, 23 May 2024 17:40:55 +0000 (17:40 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 14 Jun 2024 20:11:15 +0000 (20:11 +0000)
commit0b5afe05377d7993f19292bf49dd13e959000790
tree6bffe6de6acca7d36ce8818bc2904503435343c1
parent83a7eefedc9b56fe7bfeff13b6c7356688ffa670
KVM: arm64: Add early_param to control WFx trapping

Add an early_params to control WFI and WFE trapping. This is to
control the degree guests can wait for interrupts on their own without
being trapped by KVM. Options for each param are trap and notrap. trap
enables the trap. notrap disables the trap. Note that when enabled,
traps are allowed but not guaranteed by the CPU architecture. Absent
an explicitly set policy, default to current behavior: disabling the
trap if only a single task is running and enabling otherwise.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Reviewed-by: Jing Zhang <jingzhangos@google.com>
Link: https://lore.kernel.org/r/20240523174056.1565133-1-coltonlewis@google.com
[ oliver: rework kvm_vcpu_should_clear_tw*() for readability ]
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Documentation/admin-guide/kernel-parameters.txt
arch/arm64/kvm/arm.c