Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5903397rwb; Wed, 7 Sep 2022 09:34:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5V18ba06SUc5PbicKfQOQyhGQnyvUoaypkbZxXBArfynpvxjBdlTtXjtgChjEHEvS8K1gK X-Received: by 2002:a05:6402:10cc:b0:446:491f:d6dd with SMTP id p12-20020a05640210cc00b00446491fd6ddmr3832994edu.360.1662568448489; Wed, 07 Sep 2022 09:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662568448; cv=none; d=google.com; s=arc-20160816; b=IJLUa/ZT7vc57H7xAB3+52LI5O60LLu19W3AjyaT98ZozglODr+bgOOqcFWtytBxBH oqo71+C603Rc9qZ0/DgDBc2A0EjGY107NR41JvoeRmKy0VMoFzHmiGVIqGMEWQNHizy8 9A6g442CWOt6XaCoEYZXylR92lxVaSztn+RQxs9oVhgkHIUT6L+U6ez2LvvkVj63URnW IGUZUA1RaY1Fj28J+1XyUf8HaOitiEwdMvDh97VFKxHehFhfb5acNwSG8/yycMzLrVBW GMKbiAoIF9KWFyvSeO6SxpaBwa+UceDL4gYKQ2t3nzpoQNDhBIMLbujXqYxnhU+hS+h8 PLEA== 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=jgNWsBoBSXWNUzswLsLjK+/VN0ef25YJ6b11A0o0dh0=; b=ddBpTijH38+rAwcdjbd3PryzCUAG+BjJkY4GU73b6HR4LISerRfdE9M5rm72Pm7YRt ohKT/a8fgsAW9yVQfM5pgsBQpgndVdGQM3piaaGECxkwD2ysVoq5HUy5ShnH3B3kdm+e 4tSC1g8S73tF4MbKxF7RN/ZQ5iX7gYSpzxOwZ958ZUuQjw3MJUT4hNY7mZi9sWI1obvq EhejP77TpcfFKTX38DdZOgBMMgaKr/TIJ8HsCG1crByRM4+VX16CFyrYnYbib5twWO0c wdqipgJLfgAg11+Gmy8mrs7l8Y+upVYnwGtJ2xM4J9p8AXGxmfRVSvna6zd1hB86sAx8 gxzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="ANOb/YoU"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a056402524c00b00446190ccceesi14540285edd.10.2022.09.07.09.33.43; Wed, 07 Sep 2022 09:34:08 -0700 (PDT) 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=@alien8.de header.s=dkim header.b="ANOb/YoU"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbiIGQHG (ORCPT + 99 others); Wed, 7 Sep 2022 12:07:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbiIGQGk (ORCPT ); Wed, 7 Sep 2022 12:06:40 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 562F1A2DB7; Wed, 7 Sep 2022 09:05:27 -0700 (PDT) Received: from nazgul.tnic (unknown [84.201.196.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E5A681EC068D; Wed, 7 Sep 2022 18:05:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1662566722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=jgNWsBoBSXWNUzswLsLjK+/VN0ef25YJ6b11A0o0dh0=; b=ANOb/YoU74sl6o8ATWokQlofsEAbLbhiPYAeFjTUgsqLPpTTN+Xg7YTj/sbMwziDtlHiLj zkyzmsYH9Cf717QwJJ+jyGCZR1VrjQR5xhii4Q+XC2+xR9XraxBXtETsVI7ZOGqDBv4i+T Vl4QrqyPsIM/ZmCvg2Dxrtx6hXRKJuU= Date: Wed, 7 Sep 2022 18:05:31 +0200 From: Borislav Petkov To: Davidlohr Bueso Cc: dan.j.williams@intel.com, x86@kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, peterz@infradead.org, akpm@linux-foundation.org, dave.jiang@intel.com, Jonathan.Cameron@huawei.com, vishal.l.verma@intel.com, ira.weiny@intel.com, a.manzanares@samsung.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] memregion: Add arch_flush_memregion() interface Message-ID: References: <20220829212918.4039240-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220829212918.4039240-1-dave@stgolabs.net> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Aug 29, 2022 at 02:29:18PM -0700, Davidlohr Bueso wrote: > diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c > index 1abd5438f126..18463cb704fb 100644 > --- a/arch/x86/mm/pat/set_memory.c > +++ b/arch/x86/mm/pat/set_memory.c > @@ -330,6 +330,20 @@ void arch_invalidate_pmem(void *addr, size_t size) > EXPORT_SYMBOL_GPL(arch_invalidate_pmem); > #endif > > +#ifdef CONFIG_ARCH_HAS_MEMREGION_INVALIDATE > +bool arch_has_flush_memregion(void) > +{ > + return !cpu_feature_enabled(X86_FEATURE_HYPERVISOR); This looks really weird. Why does this need to care about HV at all? Does that nfit stuff even run in guests? > +EXPORT_SYMBOL(arch_has_flush_memregion); ... > +EXPORT_SYMBOL(arch_flush_memregion); Why aren't those exports _GPL? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette