Skip to content

Commit ef02af3

Browse files
Gautam MenghaniWen Zhiwei
authored andcommitted
powerpc/pseries: Fix KVM guest detection for disabling hardlockup detector
stable inclusion from stable-v6.6.64 commit 10c95568e7ac054e0488f1ebfc1814a338d6cdc6 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBL4B6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=10c95568e7ac054e0488f1ebfc1814a338d6cdc6 -------------------------------- commit 44e5d21e6d3fd2a1fed7f0327cf72e99397e2eaf upstream. As per the kernel documentation[1], hardlockup detector should be disabled in KVM guests as it may give false positives. On PPC, hardlockup detector is enabled inside KVM guests because disable_hardlockup_detector() is marked as early_initcall and it relies on kvm_guest static key (is_kvm_guest()) which is initialized later during boot by check_kvm_guest(), which is a core_initcall. check_kvm_guest() is also called in pSeries_smp_probe(), which is called before initcalls, but it is skipped if KVM guest does not have doorbell support or if the guest is launched with SMT=1. Call check_kvm_guest() in disable_hardlockup_detector() so that is_kvm_guest() check goes through fine and hardlockup detector can be disabled inside the KVM guest. [1]: Documentation/admin-guide/sysctl/kernel.rst Fixes: 633c8e9 ("powerpc/pseries: Enable hardlockup watchdog for PowerVM partitions") Cc: [email protected] # v5.14+ Signed-off-by: Gautam Menghani <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Wen Zhiwei <[email protected]>
1 parent 13dd097 commit ef02af3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/kernel/setup_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@ static int __init disable_hardlockup_detector(void)
927927
hardlockup_detector_disable();
928928
#else
929929
if (firmware_has_feature(FW_FEATURE_LPAR)) {
930+
check_kvm_guest();
930931
if (is_kvm_guest())
931932
hardlockup_detector_disable();
932933
}

0 commit comments

Comments
 (0)