public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ashish Kalra <Ashish.Kalra@amd.com>
Cc: dave.hansen@linux.intel.com, luto@kernel.org, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com,
	thomas.lendacky@amd.com, linux-kernel@vger.kernel.org,
	peterz@infradead.org
Subject: Re: [PATCH] x86/mm: fix pg_level_to_pfn for 5-level paging mode.
Date: Sat, 14 Oct 2023 10:47:49 +0200	[thread overview]
Message-ID: <ZSpVtZhks7Wm5Upc@gmail.com> (raw)
In-Reply-To: <20231013191703.422085-1-Ashish.Kalra@amd.com>


* Ashish Kalra <Ashish.Kalra@amd.com> wrote:

> From: Ashish Kalra <ashish.kalra@amd.com>
> 
> Add support for 5-level paging in pg_level_to_pfn().
> 
> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
> ---
>  arch/x86/mm/mem_encrypt_amd.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/x86/mm/mem_encrypt_amd.c b/arch/x86/mm/mem_encrypt_amd.c
> index 6faea41e99b6..45914568596a 100644
> --- a/arch/x86/mm/mem_encrypt_amd.c
> +++ b/arch/x86/mm/mem_encrypt_amd.c
> @@ -267,6 +267,10 @@ static unsigned long pg_level_to_pfn(int level, pte_t *kpte, pgprot_t *ret_prot)
>  		pfn = pud_pfn(*(pud_t *)kpte);
>  		prot = pud_pgprot(*(pud_t *)kpte);
>  		break;
> +	case PG_LEVEL_512G:
> +		pfn = p4d_pfn(*(p4d_t *)kpte);
> +		prot = p4d_pgprot(*(p4d_t *)kpte);
> +		break;

Mind explaining what happens if we don't have this fix, how you found it, 
which users are expected to be affected by it, whether that's the full 
known extent of 5-level paging support deficiencies in mem_encrypt_amd.c, 
etc?

In addition to such patches being much easier on the eyes, it also helps 
maintainers prioritize patches.

Thanks,

	Ingo

  reply	other threads:[~2023-10-14  8:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 19:17 [PATCH] x86/mm: fix pg_level_to_pfn for 5-level paging mode Ashish Kalra
2023-10-14  8:47 ` Ingo Molnar [this message]
2023-10-16 18:32   ` Kalra, Ashish
2023-10-18 12:38     ` Ingo Molnar

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=ZSpVtZhks7Wm5Upc@gmail.com \
    --to=mingo@kernel.org \
    --cc=Ashish.Kalra@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.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