]> Gentwo Git Trees - linux/.git/commit
KVM: arm64: Fix WFxT handling of nested virt
authorMarc Zyngier <maz@kernel.org>
Mon, 29 Sep 2025 16:04:53 +0000 (17:04 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 13 Oct 2025 13:42:41 +0000 (14:42 +0100)
commit892f7c38ba3b7de19b3dffb8e148d5fbf1228f20
tree2031b610cd1a7ad4e58b22802873b59f11f717c4
parentc3be3a48fb18f9d243fac452e0be41469bb246b4
KVM: arm64: Fix WFxT handling of nested virt

The spec for WFxT indicates that the parameter to the WFxT instruction
is relative to the reading of CNTVCT_EL0. This means that the implementation
needs to take the execution context into account, as CNTVOFF_EL2
does not always affect readings of CNTVCT_EL0 (such as when HCR_EL2.E2H
is 1 and that we're in host context).

This also rids us of the last instance of KVM_REG_ARM_TIMER_CNT
outside of the userspace interaction code.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/handle_exit.c