From owner-freebsd-stable@freebsd.org Wed Sep 14 19:26:42 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDF63BDA2F8 for ; Wed, 14 Sep 2016 19:26:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id C79DB1FD1 for ; Wed, 14 Sep 2016 19:26:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id C3734BDA2F6; Wed, 14 Sep 2016 19:26:42 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C31E2BDA2F5 for ; Wed, 14 Sep 2016 19:26:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id EA53A1FCE for ; Wed, 14 Sep 2016 19:26:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA26413; Wed, 14 Sep 2016 22:26:33 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bkFpJ-00061u-8w; Wed, 14 Sep 2016 22:26:33 +0300 Subject: Re: X2APIC support To: Konstantin Belousov , Slawa Olhovchenkov References: <20160913142118.GA34394@zxy.spb.ru> <37f5cebc-3fa1-9e95-5123-f3d8daa3130a@FreeBSD.org> <20160913152240.GE38409@kib.kiev.ua> <20160914113634.GF38409@kib.kiev.ua> <763df55a-4b69-9f7a-1042-0f631a729881@FreeBSD.org> <20160914123313.GC2840@zxy.spb.ru> <966c58d6-db64-2879-6709-0aa596bec24b@FreeBSD.org> <20160914124950.GE2840@zxy.spb.ru> <50cf91d9-072d-76fe-768c-8a6a9515bd93@FreeBSD.org> <20160914160802.GH38409@kib.kiev.ua> Cc: stable@FreeBSD.org From: Andriy Gapon Message-ID: <791a83d5-3303-038f-7912-9a2671eba485@FreeBSD.org> Date: Wed, 14 Sep 2016 22:25:36 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160914160802.GH38409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2016 19:26:43 -0000 On 14/09/2016 19:08, Konstantin Belousov wrote: > Well, the following might work, but I have no good idea what to do > when BIOS does handoff with x2APIC enabled and directs us to not > enable it. Switching to xAPIC mode is not an option, I suspect. The specification describes a way to transition from x2APIC to xAPIC mode, but it's not trivial, because it requires checking all CPU IDs and disabling CPUs with too high ones. Personally, I am not comfortable with your patch. First, it seems that the patch does not cover hw.x2apic_enable=0. And I don't like that we leave x2APIC mode enabled even when we otherwise would not enable it just because BIOS. All in all, if we can't go x2APIC -> xAPIC, then I would prefer a meaningful panic over a "compromise". Just my opinion. The topic probably warrants a wider discussion and a proper review. Slawa, thank you for your persistence and testing. -- Andriy Gapon