Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5025345pxb; Sun, 6 Feb 2022 11:02:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwE30GP3E1rW0jZdTNu1BL6T1l9OKwig3z7SoAz+00tQ0qAaUPFjpz6QzPRXvLi98vkWgGi X-Received: by 2002:a05:6402:f0c:: with SMTP id i12mr10273094eda.156.1644174135335; Sun, 06 Feb 2022 11:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644174135; cv=none; d=google.com; s=arc-20160816; b=ez8ZHwzOhGZvN3a61+Dsk2Yy435iqKk3lzUZT0R0ADwPdL/DAqPQyWEkhaoeeARXZm T0i7dNGGBcCvbaDdWBv7s7Gxyx6pkn7mvPBRG2bJnN+zGCdTqkvrH0FLBA/x7AoEan7I hzJPHRW8tOZGeLl5t9yiwOg9ADM3QO7uPd8ZHzXfPqUvWEA6FNwq24VE4F5TFKOI+zUf 8dVEbV/TlaKVRJdbon4/dLChgDzcomVqptBB3bL0qAk6UcWURgUJrnFp18lleD1qgS4p ek9BudmQQ8jo+83T6IDH46gvWrVDm2Gf2NmhCcve3V1zpySQfN16YxjEoKfNKYA2sUeT 8vPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Eub9mVW6PyMZS6D3bkxgG0H0TJDAAx12nqT4lxyCz64=; b=xg18ZAyDsxAC7exLM17YV12VK9yOnqiMwCeXF/fYBjqJ6xuilRcUZEr+2dJb9yvO+W JiA/dglzhelpjBdzhD8hD+2XXde1VvJc06daDItOQ8aFjFtWH1gSS/PHJyDus30Unkum 1XWDLuB7T4is6+b7R5qLXKA3/smXZJbKmtbwF2yHjdC8rdpN4E4ZNXveMIn+86ZA6t// n69AQrvIepDBFF6YvGFCQP28xCi4lT0UgvT05fjPFyHkOGGzsiKhK2yleVjHww5Icxc4 1geVoZU5CdYxCudJfhigNM/sBIk24G0Y4r1ieSymQdpD1/K6Kh2ETPmIaJgIh8sD4hpl iHFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FlR5FmaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr8si5426274ejc.723.2022.02.06.11.01.48; Sun, 06 Feb 2022 11:02:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FlR5FmaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350841AbiBCNmu (ORCPT + 99 others); Thu, 3 Feb 2022 08:42:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245190AbiBCNmt (ORCPT ); Thu, 3 Feb 2022 08:42:49 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0402CC06173B; Thu, 3 Feb 2022 05:42:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Eub9mVW6PyMZS6D3bkxgG0H0TJDAAx12nqT4lxyCz64=; b=FlR5FmaWz2cUfG9to3RMgfeT9m vemsfOiYBDClBhczNpu2+Nn1sZQzpIOT8rJLq3j+J/LJ2Y8ogUmD2cWgmo+fLrYw5MXKIKtMhvd5L TuSfrLWwEGNWQXmOjKvojwiDPPY3QsTWPn3dd+zKZ3Ba8mamhv2QU6SoRYO3lv2zvXHgCgJZHPYfe RYDvB6PsGcEcsaSU6K/MDMymO6iefFhrC4onWQ3zJxEEWfkMx5M1l1yw51ITz5LMpvgzGGFzCtttd euHWkG6a1nq8uA884WE6bLE2Nap9N0L0wZ4KKeKWcJGqFL+NgYpIGGopCRxlpdoAfJMOqwzc2kOY5 vlBS2kCw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFcNc-001Sfi-KY; Thu, 03 Feb 2022 13:42:32 +0000 Date: Thu, 3 Feb 2022 05:42:32 -0800 From: Christoph Hellwig To: Jane Chu Cc: Christoph Hellwig , "david@fromorbit.com" , "djwong@kernel.org" , "dan.j.williams@intel.com" , "vishal.l.verma@intel.com" , "dave.jiang@intel.com" , "agk@redhat.com" , "snitzer@redhat.com" , "dm-devel@redhat.com" , "ira.weiny@intel.com" , "willy@infradead.org" , "vgoyal@redhat.com" , "linux-fsdevel@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" Subject: Re: [PATCH v5 1/7] mce: fix set_mce_nospec to always unmap the whole page Message-ID: References: <20220128213150.1333552-1-jane.chu@oracle.com> <20220128213150.1333552-2-jane.chu@oracle.com> <950a3e4e-573c-2d9f-b277-d1283c7256cd@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <950a3e4e-573c-2d9f-b277-d1283c7256cd@oracle.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 02, 2022 at 11:07:37PM +0000, Jane Chu wrote: > On 2/2/2022 1:20 PM, Jane Chu wrote: > >> Wouldn't it make more sense to move these helpers out of line rather > >> than exporting _set_memory_present? > > > > Do you mean to move > > return change_page_attr_set(&addr, numpages, __pgprot(_PAGE_PRESENT), 0); > > into clear_mce_nospec() for the x86 arch and get rid of _set_memory_present? > > If so, sure I'll do that. > > Looks like I can't do that. It's either exporting > _set_memory_present(), or exporting change_page_attr_set(). Perhaps the > former is more conventional? These helpers above means set_mce_nospec and clear_mce_nospec. If they are moved to normal functions instead of inlines, there is no need to export the internals at all.