Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5956992ybe; Tue, 10 Sep 2019 11:18:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyc9x9PYtZvClG7cgP7ZCOfAier8knKBIPNqxhBdjaXp46czJOVbCejt4rqMxmUhgzWUTsW X-Received: by 2002:a50:c209:: with SMTP id n9mr32484742edf.215.1568139525438; Tue, 10 Sep 2019 11:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568139525; cv=none; d=google.com; s=arc-20160816; b=aG7N5OmaM1BHXhOF0rxmy1IedOFd4of35Fxyudt6m48gpba+L0i1sglgeUg2xFjXRU ziAT+p8TBCc0r+Ro5fHl5bR2BRSOAULFo4VWazB5KLpNF7H/wmU8BkXlc0IzBx7KoilE ATmK6y3OBdqFiV5wfQnuxpy4P6A8fs/blNOY5/1/nvTBFxdXqDaAJ4nQ4ECPqwB7wwae /j1i5giMrDI6OtRnVLFxEzr23eBL3LDWk+N93z9k31DmaEh79TDPkwBWVCvMrn/NT0e9 A4KFLFmz7CffwVeoFYoVN4R/XGiuQO7Duitom1zF6lptjOOlldSI0DINZAvLXHkfeg16 Bs8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id:date :references:subject:cc:to:from; bh=rrH+xVvZzycN2RYsyyWxdPpNSmsizTTFwCYSPeSOOyc=; b=TeG5rUILB7UXUTN0trQ3i3JOlkrHNreM/BR3LH16YmGd7P0kk9QJD1HGhjFSM4cNxC t2/vBMdQSLV9XNFSZMCFhl7M7bwVKkAAvnVa0xTO9JI9INJzOTQO8JajP19EI1kCV3RC Wuxv0O2+sGCxVdl9PUED1BCo3IkA2oypUKoAoK+HK1V0sVSiRggSVhKTWgIWN4YNRr5k 8u4a4K6erzVujbGXFofeFtb6/mg4e7y4/PttO867u2rtKPCQaP5wQH7/jRRMR8T0WA10 TZ4HV2jhID6KfLbSovgVR+rOqgxiB990zWSwAeWtQBHmHZ3sPDW65qNsBOKV2R0iX3qQ lZzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id um16si1495889ejb.256.2019.09.10.11.18.20; Tue, 10 Sep 2019 11:18:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404990AbfIINyP (ORCPT + 99 others); Mon, 9 Sep 2019 09:54:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18760 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404954AbfIINyP (ORCPT ); Mon, 9 Sep 2019 09:54:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7DF418CCF0F; Mon, 9 Sep 2019 13:54:14 +0000 (UTC) Received: from gigantic.usersys.redhat.com (helium.bos.redhat.com [10.18.17.132]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F80B620DC; Mon, 9 Sep 2019 13:54:14 +0000 (UTC) From: Bandan Das To: Linus Torvalds Cc: Thomas Gleixner , Chris Wilson , Linux List Kernel Mailing Subject: Re: Linux 5.3-rc7 References: <156785100521.13300.14461504732265570003@skylake-alporthouse-com> <156786727951.13300.15226856788926071603@skylake-alporthouse-com> Date: Mon, 09 Sep 2019 09:54:13 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Mon, 09 Sep 2019 13:54:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Sat, Sep 7, 2019 at 12:17 PM Linus Torvalds > wrote: >> >> I'm really not clear on why it's a good idea to clear the LDR bits on >> shutdown, and commit 558682b52919 ("x86/apic: Include the LDR when >> clearing out APIC registers") just looks pointless. And now it has >> proven to break some machines. >> >> So why wouldn't we just revert it? > > Side note: looking around for the discussion about this patch, at > least one version of the patch from Bandan had > > + if (!x2apic_enabled) { > > rather than > > + if (!x2apic_enabled()) { > I believe this crept up by accident when I was preparing the series, my testing was with x2apic_enabled() but I didn't test CPU hotplug - only the kdump path with 32 bit guest. In hindsight, I should have been more careful with testing, sorry about that. Bandan > which meant that whatever Bandan tested at that point was actually a > complete no-op, since "!x2apic_enabled" is never true (it tests a > function pointer against NULL, which it won't be). > > Then that was fixed by the time it hit -tip (and eventually my tree), > but it kind of shows how the patch history of this is all > questionable. Further strengthened by a quote from that discussion: > > "this is really a KVM bug but it doesn't hurt to clear out the LDR in > the guest and then, it wouldn't need a hypervisor fix" > > and clearly it *does* hurt to clear the LDR in the guest, making the > whole thinking behind the patch wrong and broken. The kernel clearly > _does_ depend on LDR having the right contents. > > Now, I still suspect the boot problem then comes from our > cpu0_logical_apicid use mentioned in that previous email, but at this > point I think the proper fix is "revert for now, and we can look at > this as a cleanup with the cpu0_logical_apicid thing for 5.4 instead". > > Hmm? > > Linus