Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp720642imj; Thu, 7 Feb 2019 10:46:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IY1/2Axj4YBgcTfjNoLEyc3MPAx8WRmgMSf6ajJjsG4+ie6SjSJ7fB23YAapPNZRPykxxvk X-Received: by 2002:aa7:83c2:: with SMTP id j2mr9363696pfn.119.1549565200802; Thu, 07 Feb 2019 10:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549565200; cv=none; d=google.com; s=arc-20160816; b=dytowlWEKCU7nCyPXMSW3oBr42BUGwFJxzHA2cMoBEAq7WRm9p0fRShE0BuBZa8oE9 SH9qBIGsVzCoYa3NAvAs/WFGNc1/pOiEbu0ESCKtqkoeajRpF2NJ/yJSwvCeRWFvHlPQ A1f2fbtM0uoM9JwVBb78YCuz6ZRoHZULkVTKXdc3mj/zyLUCW/TGFs4129b5pjOnYzTh vlUtSfJr4ckpIybklik5pUO0pfMAVbTq14zGSxtBlBz0QcIded4aon3XoeBs3X2PYJwy qS3EwabA6VIfgIWfyOB5WcZ2uOxI+Q9neo97UOMgZ6+arFObuDK6hp+7HrorW16w22Nj GsnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=n6RxyIFHRJIlD+tKozlor2G65tENZiikqEPe2q8sky4=; b=ybLck7WR4xWOz1aAd0zmnzTgW7wOvgT5FXCZGgeYezyJVgUrrU46mmYx80/H9hztPr W6WTs94SsNNwzZYA+36j2TSk9pI5Bys2WmZ4BcF4v4ZM2b7U8gfB/AbkY7gU2p4hMSLn V1sD0xme2vcnZVnEEdmVDiUba5XrZKP9lswhQUX70M2ErN6rquDOW+5Ob/7y8mP3+IGm 6hZKwryD21D4kT8CKsNouHjLMeVnqSoRvJ4+0ngyXlvYHNJtxfagWwaA8Ti2rzJPKqWm KpGt+0/jQM4AVSoqklrwtZgSuGIo8QA2ObGM6ZjRebKi3mpZh+VvPEH9a5ousPMJ/aTr lLmg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r137si9160271pgr.395.2019.02.07.10.46.25; Thu, 07 Feb 2019 10:46:40 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbfBGSqI (ORCPT + 99 others); Thu, 7 Feb 2019 13:46:08 -0500 Received: from mga03.intel.com ([134.134.136.65]:38884 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbfBGSqI (ORCPT ); Thu, 7 Feb 2019 13:46:08 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2019 10:46:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,345,1544515200"; d="scan'208";a="114479477" Received: from agluck-desk.sc.intel.com (HELO agluck-desk) ([10.3.52.160]) by orsmga006.jf.intel.com with ESMTP; 07 Feb 2019 10:46:06 -0800 Date: Thu, 7 Feb 2019 10:46:06 -0800 From: "Luck, Tony" To: Andy Lutomirski Cc: Peter Zijlstra , Linus Torvalds , Dan Williams , Ingo Molnar , Linux List Kernel Mailing , Dave Hansen , Andy Lutomirski , Borislav Petkov , Thomas Gleixner , Rik van Riel Subject: Re: [GIT PULL] x86/mm changes for v4.21 Message-ID: <20190207184606.GB17049@agluck-desk> References: <20181224231106.GA27438@gmail.com> <20190207001737.GA32096@agluck-desk> <20190207101846.GB32511@hirez.programming.kicks-ass.net> <20190207140131.GB32477@hirez.programming.kicks-ass.net> <20190207173600.GA15682@agluck-desk> <20190207175720.GE32511@hirez.programming.kicks-ass.net> <8D8DF81C-3331-4105-8594-9600281010EF@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8D8DF81C-3331-4105-8594-9600281010EF@amacapital.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 07, 2019 at 10:07:28AM -0800, Andy Lutomirski wrote: > Joining this thread late... > > This is all IMO rather crazy. How about we fiddle with CR0 to turn off > the cache, then fiddle with page tables, then turn caching on? Or, heck, > see if there’s some chicken bit we can set to improve the situation > while we’re in the MCE handler. > Also, since I don’t really want > to dig into the code to answer this, how exactly do we do a broadcast TLB > flush from MCE context? We’re super-duper-atomic, and locks might be > held on various CPUs. Shouldn’t we be telling the cpa code to skip > the flush and then just have the MCE code do a full flush manually? > The MCE code has already taken over all CPUs on non-LMCE systems. MCE code doesn't do this while still in MCE context. You helped restructure this code so the recovery bits happen after we call ist_begin_non_atomic(regs); on just the CPU that hit the error (in the broadcast case we've let the other out of MCE jail by this point). So there is a small window where we know the broken page is still mapped WB in the kernel 1:1 map. But we just live dangerously for a few more microseconds until we can fix the map. > Or, better yet, get Intel to fix the hardware. A failed speculative > access while already in MCE context should just be ignored. Good idea. -Tony