Re: [PATCH RFC 12/13] mca: disable cmc enable on Xen PV

From: John Baldwin <jhb_at_freebsd.org>
Date: Sat, 08 Feb 2014 17:02:47 -0500
On Tuesday, December 24, 2013 12:21:01 PM Roger Pau Monne wrote:
> Xen PV guests doesn't have a lapic, so disable the lapic call in mca
> initialization.

I think this is fine, but I wonder if it wouldn't be cleaner to have 
lapic_enable_cmc() do the check instead.  Where else do you check 
lapic_disabled?

> ---
>  sys/x86/x86/mca.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c
> index f1369cd..e9d2c1d 100644
> --- a/sys/x86/x86/mca.c
> +++ b/sys/x86/x86/mca.c
> _at__at_ -897,7 +897,7 _at__at_ _mca_init(int boot)
>  		}
> 
>  #ifdef DEV_APIC
> -		if (PCPU_GET(cmci_mask) != 0 && boot)
> +		if (PCPU_GET(cmci_mask) != 0 && boot && !lapic_disabled)
>  			lapic_enable_cmc();
>  #endif
>  	}

-- 
John Baldwin
Received on Thu Feb 13 2014 - 19:24:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:46 UTC