[PATCH 6/5] x86/nmi: Support watchdogs on Intel Fam18/19 CPUs

Andrew Cooper <[email protected]>
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
It is the Pentium 4 (Fam15) which is the odd-one-out.  The counter indicies
used in the P6 went on to be declared architectural, and Fam18/19 continue
using the architectural indices.

Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>

This wants backporting to 4.21.  So does "Check MSR_MISC_ENABLE for all Intel
platforms" on which it texturally depends.
---
 xen/arch/x86/nmi.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index b3d18270b13a..0a03ef68b586 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -329,17 +329,12 @@ void setup_apic_nmi_watchdog(void)
             break;
         }
 
-        switch ( boot_cpu_data.family )
-        {
-        case 6:
+        if ( boot_cpu_data.family == 15 )
+            setup_p4_watchdog(misc);
+        else
             setup_p6_watchdog((boot_cpu_data.model < 14)
                               ? P6_EVENT_CPU_CLOCKS_NOT_HALTED
                               : CORE_EVENT_CPU_CLOCKS_NOT_HALTED);
-            break;
-        case 15:
-            setup_p4_watchdog(misc);
-            break;
-        }
         break;
     }
 
-- 
2.39.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.