]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Exclude guest's TWED configuration when TWE isn't set
authorOliver Upton <oliver.upton@linux.dev>
Fri, 12 Sep 2025 21:22:54 +0000 (14:22 -0700)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Sep 2025 13:01:35 +0000 (14:01 +0100)
commit05d9f3408334afb97b91dc869c658e6951c3dcb3
treef6ebd1fe51627ca8f52b2eac5031c3e13bcbf396
parent09dc6b42c62e47718ce0e94d44db7deffdc193ff
KVM: arm64: nv: Exclude guest's TWED configuration when TWE isn't set

Ignore the guest hypervisor's configured TWE delay if it hasn't actually
requested WFE traps. Otherwise, OR'ing these fields into the effective
HCR when the guest sets TWE is safe as KVM doesn't use FEAT_TWED and
leaves the fields initialized to 0.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/vhe/switch.c