All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] x86/mm/sme: Fix definition of PMD_FLAGS_DEC_WP
Date: Tue, 10 Nov 2020 17:31:06 -0600	[thread overview]
Message-ID: <13073a85-24c1-6efa-578b-54218d21f49d@amd.com> (raw)
In-Reply-To: <20201109214218.GA582504@rani.riverdale.lan>

On 11/9/20 3:42 PM, Arvind Sankar wrote:
> On Mon, Nov 09, 2020 at 02:41:48PM -0600, Tom Lendacky wrote:
>> On 11/9/20 11:35 AM, Arvind Sankar wrote:
>>> The PAT bit is in different locations for 4k and 2M/1G page table
>>> entries.
>>>
>>> Add a definition for _PAGE_LARGE_CACHE_MASK to represent the three
>>> caching bits (PWT, PCD, PAT), similar to _PAGE_CACHE_MASK for 4k pages,
>>> and use it in the definition of PMD_FLAGS_DEC_WP to get the correct PAT
>>> index for write-protected pages.
>>>
>>> Remove a duplication definition of _PAGE_PAT_LARGE.
>>>
>>> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
>>
>> Fixes: tag?
> 
> It's been broken since it was added in
> 
>   6ebcb060713f ("x86/mm: Add support to encrypt the kernel in-place")
> 
> but the code has been restructured since then. I think it should be
> backportable to 4.19.x if you want, except for that "duplication
> definition"[sic] I removed, which was only added in v5.6. Do I need to
> split that out into a separate patch?

For backporting it would probably be best if the patches were split. For
the PMD flags, I think you can target the original release and the stable
maintainers are pretty good about finding the right file. If not, they'll
ping you.

Thanks,
Tom

> 
>>
>> Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
>>
>>> ---
>>>  arch/x86/include/asm/pgtable_types.h | 3 +--
>>>  arch/x86/mm/mem_encrypt_identity.c   | 4 ++--
>>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>>

  reply	other threads:[~2020-11-10 23:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08 16:37 Definition of PMD_FLAGS_DEC_WP in arch/x86/mm/mem_encrypt_identity.c Arvind Sankar
2020-11-09 14:28 ` Tom Lendacky
2020-11-09 17:35   ` [PATCH] x86/mm/sme: Fix definition of PMD_FLAGS_DEC_WP Arvind Sankar
2020-11-09 20:41     ` Tom Lendacky
2020-11-09 21:42       ` Arvind Sankar
2020-11-10 23:31         ` Tom Lendacky [this message]
2020-11-11 16:09           ` [PATCH 1/2] " Arvind Sankar
2020-11-11 16:09             ` [PATCH 2/2] x86/mm: Remove duplicate definition of _PAGE_PAT_LARGE Arvind Sankar
2021-01-05 21:28               ` Arvind Sankar
2021-01-05 22:17                 ` Dave Hansen
2021-01-08 21:12               ` [tip: x86/cleanups] " tip-bot2 for Arvind Sankar
2020-12-10 11:44             ` [tip: x86/urgent] x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP tip-bot2 for Arvind Sankar

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=13073a85-24c1-6efa-578b-54218d21f49d@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=nivedita@alum.mit.edu \
    --cc=peterz@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.