On 04.03.2026 20:53, Kevin Lampis wrote:
> --- a/xen/arch/x86/nmi.c
> +++ b/xen/arch/x86/nmi.c
> @@ -216,12 +216,12 @@ void disable_lapic_nmi_watchdog(void)
> {
> if (nmi_active <= 0)
> return;
> - switch (boot_cpu_data.x86_vendor) {
> + switch (boot_cpu_data.vendor) {
> case X86_VENDOR_AMD:
> wrmsrns(MSR_K7_EVNTSEL0, 0);
> break;
> case X86_VENDOR_INTEL:
> - switch (boot_cpu_data.x86) {
> + switch (boot_cpu_data.family) {
> case 6:
> wrmsrns(MSR_P6_EVNTSEL(0), 0);
> break;
I think here we would benefit from switching to Xen style at this occasion.
Fair parts of the file are already Xen style, and this function would then
end up almost correct.
> @@ -362,7 +362,7 @@ static void setup_p4_watchdog(void)
> clear_msr_range(0x3F1, 2);
> /* MSR 0x3F0 seems to have a default value of 0xFC00, but current
> docs doesn't fully define it, so leave it alone for now. */
> - if (boot_cpu_data.x86_model >= 0x3) {
> + if (boot_cpu_data.model >= 0x3) {
> /* MSR_P4_IQ_ESCR0/1 (0x3ba/0x3bb) removed */
> clear_msr_range(0x3A0, 26);
> clear_msr_range(0x3BC, 3);
This may want leaving as is, to match the rest of the function, but ...
> @@ -387,16 +387,16 @@ void setup_apic_nmi_watchdog(void)
> if ( nmi_watchdog == NMI_NONE )
> return;
>
> - switch ( boot_cpu_data.x86_vendor )
> + switch ( boot_cpu_data.vendor )
> {
> case X86_VENDOR_AMD:
> setup_k7_watchdog();
> break;
>
> case X86_VENDOR_INTEL:
> - switch (boot_cpu_data.x86) {
> + switch (boot_cpu_data.family) {
... this (again to match the rest of the function) would want adjusting again.
With that (again, happy to make the adjustments while committing):
Acked-by: Jan Beulich <[email protected]>
Jan