Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3732642ybe; Sun, 8 Sep 2019 20:52:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxz/jFNi7jQuR5JjSdiPdSGefgETlrVtvHsiAkMH9IaLz4wrLk1KkdYG/uGWm8feee/TotK X-Received: by 2002:a50:f782:: with SMTP id h2mr21640860edn.225.1568001174070; Sun, 08 Sep 2019 20:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568001174; cv=none; d=google.com; s=arc-20160816; b=wcHEgIe4gdgzuMS//+/xS5rwsvkoNdAQbLnOJcb6PIK+er2HCqNgsYTtx76cJzz+YB 77m7WU0XUfeuZKM5waBTuAg5n25L2gDg1WOKmQ0kAdcbWw9nM2gkl3kkU9kCzQh+QH/2 cvyApnHTDa8auEPCRyUG7J4GnofxkQdIkZ35CM/XK8SQegzs7vKowf9YoyBSYPFMlq49 tJWq0lGhje8Mynt+qGwaaYwmYY6jsLuWvnsT3v4AwzofwhDp/tmGKIFQmQMiT0xIlXIF wqWA9PCKs9rJvKd1RJFEcVx3lTwTKXg8iebGU8e4Yvm1LKUwnsYgZbvJkXG3dhEvi62J TVgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cvf94hkMNtV2tovWa4EFFtQ7MzVwBeT/1I0CJcOizE4=; b=T/en1dza8PfNlewXQmT7suDVTBhWzRjCAOubVqKQaaBr0He7T+jlfTayIQ9lSrx1Vv 8xq2u4SghGtO5QcSwzaZFuafp3z9wtPyZ6s80+JtvJEWy+imE2OYNJ6ApuhtzyxCFvrF EuwTnay815lXyLXhjSn2hquV+4HIzyuugy4FWYnyfw7mWoRFQHI0TNCMY0XS0XKYLF24 B5hAZ3V9LpBvBYkxMJjhCx6rH3jji0v4KSQ2JlM+/hU06fBBEEP/QslQSjefgJXwYfHt t0VRMVxKLxnk0jXh8yne8LtKNmi6MreadWCrAla1ysn9L8DnMaoPBkTLmIm71A3UuSNj +cLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WkZOy1pE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si5508319edw.17.2019.09.08.20.52.29; Sun, 08 Sep 2019 20:52:54 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WkZOy1pE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436647AbfIGT2B (ORCPT + 99 others); Sat, 7 Sep 2019 15:28:01 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41522 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436634AbfIGT2B (ORCPT ); Sat, 7 Sep 2019 15:28:01 -0400 Received: by mail-lf1-f67.google.com with SMTP id j4so7572634lfh.8 for ; Sat, 07 Sep 2019 12:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cvf94hkMNtV2tovWa4EFFtQ7MzVwBeT/1I0CJcOizE4=; b=WkZOy1pETguk5cMBv//IdgRbCj+4j4/Yht9NxT6MvmEBa1xxabfBAqBSVBZnbNZnil LrYbn9LpNxyHN3UYGUlLN47SD7Mb8U6r0nJlHk+vwWghzYWPDyQiyZ99JZWctqnYRW7m E/G6gjr0R4ivaEwraD218Wan7lHeLd9u8bc+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cvf94hkMNtV2tovWa4EFFtQ7MzVwBeT/1I0CJcOizE4=; b=f8GSX9xiJjSNLY/aLvG2i14OuPit8BubF2ybXuImWMzfIH6seo1Ei7WG5nmiXZjYjJ PhXM4PDjfXlbaaTRizvhZJUhqZpBZ7kAyzN7ox1eKjyR+sR6RoWXGfZarEpPgYf3Cjnm RVHjS5J/HVApy1Dh/oeeLa/H5Yo5S/qfoCCtDrq2gQ5gYw2+sMKRPi2l4NC0vMgYY/Qy VHrsvQXkMVMWUTMcGEbsuSpeHKCriiPSlr+P73WClXsS/APQmnhCM6QNntnsTzKeiguG TO1K5Jxg4xroMgSMGJj+neu0dnvM7vQkHQlunlMZd8+tisJdRTwCiYj+mtaDfqlvh2hi Ie/Q== X-Gm-Message-State: APjAAAWDpHgjSHf6XFp/5xC4mmFOCvlcBdAhhI8nQ5O2xz/tEQ8CBBUY 9+luBvoZNdn3t91NxWU+FfLFhIVv0/U= X-Received: by 2002:a19:c709:: with SMTP id x9mr11065446lff.20.1567884478970; Sat, 07 Sep 2019 12:27:58 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id n24sm1601939ljj.87.2019.09.07.12.27.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 Sep 2019 12:27:58 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id y23so9014296lje.9 for ; Sat, 07 Sep 2019 12:27:58 -0700 (PDT) X-Received: by 2002:a2e:3c14:: with SMTP id j20mr9675480lja.84.1567884477831; Sat, 07 Sep 2019 12:27:57 -0700 (PDT) MIME-Version: 1.0 References: <156785100521.13300.14461504732265570003@skylake-alporthouse-com> <156786727951.13300.15226856788926071603@skylake-alporthouse-com> In-Reply-To: From: Linus Torvalds Date: Sat, 7 Sep 2019 12:27:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.3-rc7 To: Thomas Gleixner Cc: Chris Wilson , Linux List Kernel Mailing , Bandan Das Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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()) { 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