Merge tag 'powerpc-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / setup_64.c
index a35fbf4d0bcef9fc8efd6ae1cd824b7c951173a6..1ff258f6c76c2733ce5c7dde8f0e6868be3e6aae 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/pgtable.h>
 
 #include <asm/debugfs.h>
+#include <asm/kvm_guest.h>
 #include <asm/io.h>
 #include <asm/kdump.h>
 #include <asm/prom.h>
@@ -939,16 +940,20 @@ u64 hw_nmi_get_sample_period(int watchdog_thresh)
  * disable it by default. Book3S has a soft-nmi hardlockup detector based
  * on the decrementer interrupt, so it does not suffer from this problem.
  *
- * It is likely to get false positives in VM guests, so disable it there
- * by default too.
+ * It is likely to get false positives in KVM guests, so disable it there
+ * by default too. PowerVM will not stop or arbitrarily oversubscribe
+ * CPUs, but give a minimum regular allotment even with SPLPAR, so enable
+ * the detector for non-KVM guests, assume PowerVM.
  */
 static int __init disable_hardlockup_detector(void)
 {
 #ifdef CONFIG_HARDLOCKUP_DETECTOR_PERF
        hardlockup_detector_disable();
 #else
-       if (firmware_has_feature(FW_FEATURE_LPAR))
-               hardlockup_detector_disable();
+       if (firmware_has_feature(FW_FEATURE_LPAR)) {
+               if (is_kvm_guest())
+                       hardlockup_detector_disable();
+       }
 #endif
 
        return 0;