]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clocksource: hyper-v: Skip unnecessary checks for the root partition
authorWei Liu <wei.liu@kernel.org>
Tue, 12 Aug 2025 19:48:45 +0000 (19:48 +0000)
committerWei Liu <wei.liu@kernel.org>
Mon, 8 Sep 2025 22:10:46 +0000 (22:10 +0000)
commit47691ced158ab3a7ce2189b857b19c0c99a9aa80
tree0f431e7993f9717192e283a9177f52f370f17e11
parent4cd661c248b6671914ad59e16760bb6d908dfc61
clocksource: hyper-v: Skip unnecessary checks for the root partition

The HV_ACCESS_TSC_INVARIANT bit is always zero when Linux runs as the
root partition. The root partition will see directly what the hardware
provides.

The old logic in ms_hyperv_init_platform caused the native TSC clock
source to be incorrectly marked as unstable on x86. Fix it.

Skip the unnecessary checks in code for the root partition. Add one
extra comment in code to clarify the behavior.

Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
arch/x86/kernel/cpu/mshyperv.c
drivers/clocksource/hyperv_timer.c