mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Michael Roth <michael.roth@amd.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	Nikunj A Dadhania <nikunj@amd.com>,
	Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Subject: Re: [PATCH v5 5/8] x86/sev: Map only the RMP table entries instead of the full RMP range
Date: Mon, 4 Nov 2024 09:03:38 -0600	[thread overview]
Message-ID: <1e0d8039-5721-7172-877f-e3b0bbf216d2@amd.com> (raw)
In-Reply-To: <20241104062845.GPZyhpnWueB-jCEl2H@fat_crate.local>

On 11/4/24 00:28, Borislav Petkov wrote:
> On Mon, Oct 28, 2024 at 02:32:40PM -0500, Tom Lendacky wrote:
>> @@ -224,7 +246,14 @@ static int __init snp_rmptable_init(void)
>>  	if (val & MSR_AMD64_SYSCFG_SNP_EN)
>>  		goto skip_enable;
>>  
>> -	memset(rmptable_start, 0, probed_rmp_size);
>> +	/* Zero out the RMP bookkeeping area */
>> +	if (!init_rmptable_bookkeeping()) {
> 
> So let's call it what it is then:
> 
> diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c
> index 5871c924c0b2..8145a7b14fa2 100644
> --- a/arch/x86/virt/svm/sev.c
> +++ b/arch/x86/virt/svm/sev.c
> @@ -173,7 +173,7 @@ void __init snp_fixup_e820_tables(void)
>  	__snp_fixup_e820_tables(probed_rmp_base + probed_rmp_size);
>  }
>  
> -static bool __init init_rmptable_bookkeeping(void)
> +static bool __init clear_rmptable_bookkeeping(void)

Sure.

Thanks,
Tom

>  {
>  	void *bk;
>  
> @@ -246,8 +246,7 @@ static int __init snp_rmptable_init(void)
>  	if (val & MSR_AMD64_SYSCFG_SNP_EN)
>  		goto skip_enable;
>  
> -	/* Zero out the RMP bookkeeping area */
> -	if (!init_rmptable_bookkeeping()) {
> +	if (!clear_rmptable_bookkeeping()) {
>  		memunmap(rmptable_start);
>  		goto nosnp;
>  	}
> 
> 

  reply	other threads:[~2024-11-04 15:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 19:32 [PATCH v5 0/8] Provide support for RMPREAD and a segmented RMP Tom Lendacky
2024-10-28 19:32 ` [PATCH v5 1/8] x86/sev: Prepare for using the RMPREAD instruction to access the RMP Tom Lendacky
2024-10-28 19:32 ` [PATCH v5 2/8] x86/sev: Add support for the RMPREAD instruction Tom Lendacky
2024-11-12 18:40   ` Borislav Petkov
2024-10-28 19:32 ` [PATCH v5 3/8] x86/sev: Require the RMPREAD instruction after Zen4 Tom Lendacky
2024-10-28 19:32 ` [PATCH v5 4/8] x86/sev: Move the SNP probe routine out of the way Tom Lendacky
2024-10-28 19:32 ` [PATCH v5 5/8] x86/sev: Map only the RMP table entries instead of the full RMP range Tom Lendacky
2024-11-04  6:28   ` Borislav Petkov
2024-11-04 15:03     ` Tom Lendacky [this message]
2024-10-28 19:32 ` [PATCH v5 6/8] x86/sev: Treat the contiguous RMP table as a single RMP segment Tom Lendacky
2024-11-04 10:33   ` Borislav Petkov
2024-11-04 16:03     ` Tom Lendacky
2024-11-04 17:05       ` Borislav Petkov
2024-11-04 17:15         ` Tom Lendacky
2024-11-08 17:23       ` Borislav Petkov
2024-10-28 19:32 ` [PATCH v5 7/8] x86/sev: Add full support for a segmented RMP table Tom Lendacky
2024-10-28 19:32 ` [PATCH v5 8/8] x86/sev/docs: Document the SNP Reverse Map Table (RMP) Tom Lendacky

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=1e0d8039-5721-7172-877f-e3b0bbf216d2@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=Neeraj.Upadhyay@amd.com \
    --cc=ashish.kalra@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=nikunj@amd.com \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®