Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp960774iob; Fri, 13 May 2022 17:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuO7r26CU3/C4wnfDlwPlqQjy4gCp1ixOwNMQS6ZJzeZt3D9WKLCRNsi/jzHsMgxf8L75x X-Received: by 2002:a05:6000:168a:b0:20c:5bed:1c37 with SMTP id y10-20020a056000168a00b0020c5bed1c37mr5959658wrd.684.1652489299576; Fri, 13 May 2022 17:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489299; cv=none; d=google.com; s=arc-20160816; b=0HsLbOQKCERHwhgKeik3VtYbzjUEtdS8CSplrRYFpwqMFBWCaKE1f9ocQggDRNqP9r dVJOV4LKa0FNtzHDVYsdDlPnResjoHcj7EbmE3ATrpqUh+ULNMTmfDflzIB6uYGzvHAP NOSv7AS95cjyKm9MCUfD7zVxaFUUhTc/JWh+waeh5v58BLBqeLkQ1AfcYKIvWVOoJqE9 qs1cH8RM64MkW9BVsqw/qCj4WWS1/PgZFMvGMTIrkX/5MkVkxw1swsZ1FxZVjXVrw/Ld T+hMLmM8LD15nVR4ygiMonqyKjvNiMI3ZmxycYUGl83oTeECcj9ybXspjh0ztE4mcx7p 7a2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JaD/7HsV0lHA07q8V2RCBkaHsJJjfnySNbAofgOVR+s=; b=u5JnBfaaOLrKPw6/hMo03CsA8DRrzzy0s4G1JD0k376zJv+Kp45HnaLs9OiFEtI4Wy LxI2tl9odCm3C+JNo90Sc5fiZ4I48YR+5UpzIf7j/O+c1Cjz/3BCcHF6C13ci8wHzTJ7 U0CEiWMl2wWu+cbjxFKpc5BdoEnVz8YhbGGEpNY4DJyZWwAonpKcU7ralA3tg6ld/GIh V8Lmd0hT4mLgcKQ8ZRcYA+ATr61wtHuRjwhOkvSYhyH0raA4uis9sQ29AaQyY+UfSLvS 7pSE3S+WnEZ1RUGrKJxlhHR6OjgRsJfDfjU+YeFoKS9SwCXdPnIPyWpM1kmgF+xPoGa0 WGfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=c5Kb2dLI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y5-20020adff6c5000000b002061c09cddasi3679163wrp.140.2022.05.13.17.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:48:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=c5Kb2dLI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65DDA337DE3; Fri, 13 May 2022 16:26:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376886AbiEMDl0 (ORCPT + 99 others); Thu, 12 May 2022 23:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350532AbiEMDlW (ORCPT ); Thu, 12 May 2022 23:41:22 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 308212A26B for ; Thu, 12 May 2022 20:41:21 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d25so6566031pfo.10 for ; Thu, 12 May 2022 20:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JaD/7HsV0lHA07q8V2RCBkaHsJJjfnySNbAofgOVR+s=; b=c5Kb2dLIuZWvdFJVbRc2JEjzw2B2Dzf6Pnk5QeLzsmOpoGIwIXrpk2u4HDZxZATVcb RQCZB7AVQpilRtH7j3HgXELDOxJYJ9AKnOiXcozN38K+eOYCpZP4eAlTuzhX/IbcCHuF fD3vymdbg+d0WJZH2mnnTf1n84ziyZHJdMP43IJNspQjPgKbCRjFPWCi0TXAHs+tLuGU urDfcdgnspQ7g4DGHkyU07WM4OnHipWnDR8hHhzB2+jand1Ci74ZFyKlmSFQx8u+ZRJl /fHf7uqFlvRKRzQk/sbZFyLyxR/TYYupQSVu7Zpa7xukHKA19d6/I9LAJEHLHh9NSCHf 9I6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JaD/7HsV0lHA07q8V2RCBkaHsJJjfnySNbAofgOVR+s=; b=Gb3bcBW5mfhJndwqV5rB+tCzmZvcyKRAiSVaCAIsW4FDyuK0LuJU6X26LDm6XkZ6P9 155Aut6yzT11LykiHzXVrHFtnn+VVHh5aljqTe7IXkUMX0+INkB37H0VhVMlDIgMyN59 25ALzfHky6uIpecn2PtLs4uRRZXCH/elGIoPh0wlcINLKADauP0+zvDLO+CJhNrrj3ri RnueB58YMBJMGeAfUEJc3PN4EzJ9NGE/VVIzdTzKLgu3p1mGoGnc7VdPeaT0BWzVw/tr KXHhCl6QC9Hosl07adwu9NdiF12gTPwrsUt6e2JHNUgdlQvfW5UUrg6SV0sb+FXugzk/ QxEA== X-Gm-Message-State: AOAM530V9xwIYtaRrR/WsjxRdl9Szq+0E5aJJgklJIAWzizqe6DU9fn9 1Rugq6Gr/09J/n0jrzK6q8Wcf2fb9nijNHLsQG391A== X-Received: by 2002:a63:1117:0:b0:399:2df0:7fb9 with SMTP id g23-20020a631117000000b003992df07fb9mr2395090pgl.40.1652413280701; Thu, 12 May 2022 20:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20220422224508.440670-1-jane.chu@oracle.com> <20220422224508.440670-4-jane.chu@oracle.com> <5aa1c9aacc5a4086a904440641062669@intel.com> In-Reply-To: <5aa1c9aacc5a4086a904440641062669@intel.com> From: Dan Williams Date: Thu, 12 May 2022 20:41:09 -0700 Message-ID: Subject: Re: [PATCH v9 3/7] mce: fix set_mce_nospec to always unmap the whole page To: "Luck, Tony" Cc: Borislav Petkov , "chu, jane" , Christoph Hellwig , "Hansen, Dave" , Peter Zijlstra , "Lutomirski, Andy" , david , "Darrick J. Wong" , linux-fsdevel , Linux NVDIMM , Linux Kernel Mailing List , X86 ML , "Verma, Vishal L" , "Jiang, Dave" , Alasdair Kergon , Mike Snitzer , device-mapper development , "Weiny, Ira" , Matthew Wilcox , Vivek Goyal , "Wang, Jue" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 10:17 AM Luck, Tony wrote: > > > I - just like you - am waiting for Tony to say whether he still needs > > this whole_page() thing. I already suggested removing it so I'm fine > > with this patch. > > IIRC this new patch effectively reverts back to the original behavior that > I implemented back at the dawn of time. I.e. just always mark the whole > page "not present" and don't try to mess with UC mappings to allow > partial (but non-speculative) access to the not-poisoned parts of the > page. > > If that is the case ... then Acked-by: Tony Luck > > If I've misunderstood ... then please explain what it is doing. You are correct. The page is always marked not present as far as the page-offlining code is concerned, back to the way it always was. The code in the pmem driver that repairs the page now knows that the page is to be kept "not present" until the poison is cleared and clear_mce_nospec() returns the mapping to typical write-back caching. There is no support for what the UC case previously allowed which was reading the good lines around the one bad line, just handle overwrites to clear poison and restore access.