From owner-freebsd-current@FreeBSD.ORG Thu Feb 13 20:24:53 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AB80F53; Thu, 13 Feb 2014 20:24:53 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D42A1E52; Thu, 13 Feb 2014 20:24:53 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 11C6EB9D8; Thu, 13 Feb 2014 15:24:52 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH RFC 12/13] mca: disable cmc enable on Xen PV Date: Sat, 08 Feb 2014 17:02:47 -0500 Message-ID: <2452208.OksOsMWhSU@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <1387884062-41154-13-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> <1387884062-41154-13-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 13 Feb 2014 15:24:52 -0500 (EST) Cc: julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, xen-devel@lists.xenproject.org, gibbs@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 20:24:53 -0000 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 > @@ -897,7 +897,7 @@ _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