From: Christoph Hellwig <hch@infradead.org>
To: Jane Chu <jane.chu@oracle.com>
Cc: david@fromorbit.com, djwong@kernel.org, dan.j.williams@intel.com,
hch@infradead.org, 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
Date: Wed, 2 Feb 2022 05:21:30 -0800 [thread overview]
Message-ID: <YfqFWjFcdJSwjRaU@infradead.org> (raw)
In-Reply-To: <20220128213150.1333552-2-jane.chu@oracle.com>
> +static inline int set_mce_nospec(unsigned long pfn)
> {
> unsigned long decoy_addr;
> int rc;
> @@ -117,10 +113,7 @@ static inline int set_mce_nospec(unsigned long pfn, bool unmap)
> */
> decoy_addr = (pfn << PAGE_SHIFT) + (PAGE_OFFSET ^ BIT(63));
>
> - if (unmap)
> - rc = set_memory_np(decoy_addr, 1);
> - else
> - rc = set_memory_uc(decoy_addr, 1);
> + rc = set_memory_np(decoy_addr, 1);
> if (rc)
> pr_warn("Could not invalidate pfn=0x%lx from 1:1 map\n", pfn);
> return rc;
> @@ -130,7 +123,7 @@ static inline int set_mce_nospec(unsigned long pfn, bool unmap)
> /* Restore full speculative operation to the pfn. */
> static inline int clear_mce_nospec(unsigned long pfn)
> {
> - return set_memory_wb((unsigned long) pfn_to_kaddr(pfn), 1);
> + return _set_memory_present((unsigned long) pfn_to_kaddr(pfn), 1);
> }
Wouldn't it make more sense to move these helpers out of line rather
than exporting _set_memory_present?
> /*
> - * _set_memory_prot is an internal helper for callers that have been passed
> + * __set_memory_prot is an internal helper for callers that have been passed
This looks unrelated to the patch.
next prev parent reply other threads:[~2022-02-02 13:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 21:31 [PATCH v5 0/7] DAX poison recovery Jane Chu
2022-01-28 21:31 ` [PATCH v5 1/7] mce: fix set_mce_nospec to always unmap the whole page Jane Chu
2022-02-02 13:21 ` Christoph Hellwig [this message]
2022-02-02 21:20 ` Jane Chu
2022-02-02 23:07 ` Jane Chu
2022-02-03 13:42 ` Christoph Hellwig
2022-02-04 5:23 ` Dan Williams
2022-02-06 8:30 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 2/7] dax: introduce dax device flag DAXDEV_RECOVERY Jane Chu
2022-02-02 13:23 ` Christoph Hellwig
2022-02-02 21:27 ` Jane Chu
2022-02-03 13:43 ` Christoph Hellwig
2022-02-04 5:17 ` Dan Williams
2022-02-04 5:32 ` Dan Williams
2022-02-06 8:29 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 3/7] dm: make dm aware of target's DAXDEV_RECOVERY capability Jane Chu
2022-02-04 5:34 ` Dan Williams
2022-02-06 8:27 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 4/7] dax: add dax_recovery_write to dax_op and dm target type Jane Chu
2022-02-02 13:34 ` Christoph Hellwig
2022-02-02 22:03 ` Jane Chu
2022-02-04 6:03 ` Dan Williams
2022-02-06 8:25 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 5/7] pmem: add pmem_recovery_write() dax op Jane Chu
2022-02-02 13:43 ` Christoph Hellwig
2022-02-02 22:13 ` Jane Chu
2022-02-04 6:21 ` Dan Williams
2022-02-06 8:08 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 6/7] dax: add recovery_write to dax_iomap_iter in failure path Jane Chu
2022-02-02 13:44 ` Christoph Hellwig
2022-02-02 22:18 ` Jane Chu
2022-01-28 21:31 ` [PATCH v5 7/7] pmem: fix pmem_do_write() avoid writing to 'np' page Jane Chu
2022-02-02 13:28 ` Christoph Hellwig
2022-02-02 21:31 ` Jane Chu
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=YfqFWjFcdJSwjRaU@infradead.org \
--to=hch@infradead.org \
--cc=agk@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=dm-devel@redhat.com \
--cc=ira.weiny@intel.com \
--cc=jane.chu@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=snitzer@redhat.com \
--cc=vgoyal@redhat.com \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).