Linux CXL
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Borislav Petkov <bp@alien8.de>
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
Date: Wed, 7 Sep 2022 09:22:45 -0700	[thread overview]
Message-ID: <20220907162245.5ddexpmibjbanrho@offworld> (raw)
In-Reply-To: <YxjBSxtoav7PQVei@nazgul.tnic>

On Wed, 07 Sep 2022, Borislav Petkov wrote:

>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?

So the context here is:

e2efb6359e62 ("ACPICA: Avoid cache flush inside virtual machines")

>
>Does that nfit stuff even run in guests?

No, nor does cxl. This was mostly in general a precautionary check such
that the api is unavailable in VMs.

>
>> +EXPORT_SYMBOL(arch_has_flush_memregion);
>
>...
>
>> +EXPORT_SYMBOL(arch_flush_memregion);
>
>Why aren't those exports _GPL?

Fine by me.

Thanks,
Davidlohr

  reply	other threads:[~2022-09-07 16:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 21:29 [PATCH -next] memregion: Add arch_flush_memregion() interface Davidlohr Bueso
2022-08-29 23:02 ` Dan Williams
2022-09-07 14:36 ` Davidlohr Bueso
2022-09-07 16:46   ` Dan Williams
2022-09-07 16:05 ` Borislav Petkov
2022-09-07 16:22   ` Davidlohr Bueso [this message]
2022-09-07 16:52     ` Dan Williams
2022-09-07 17:24       ` Davidlohr Bueso
2022-09-08  4:35       ` Borislav Petkov
2022-09-08  6:53         ` Dan Williams
2022-09-08 13:00           ` Jonathan Cameron
2022-09-08  4:31     ` Borislav Petkov
2022-09-07 22:30 ` Andrew Morton
2022-09-08  1:07   ` Dan Williams
2022-09-08 13:13     ` Jonathan Cameron
2022-09-08 22:51       ` Dan Williams
2022-09-08 23:00         ` Andrew Morton
2022-09-08 23:22           ` Dan Williams
2022-09-09 11:43             ` Jonathan Cameron
2022-09-13 15:56               ` Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220907162245.5ddexpmibjbanrho@offworld \
    --to=dave@stgolabs.net \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=a.manzanares@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=vishal.l.verma@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox