mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kalra, Ashish" <ashish.kalra@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: bp@kernel.org, thomas.lendacky@amd.com,
	linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	michael.roth@amd.com, x86@kernel.org
Subject: Re: [PATCH] x86/sev: Apply RMP table fixups for kexec.
Date: Tue, 2 Apr 2024 16:31:30 -0500	[thread overview]
Message-ID: <f1802e68-88b2-43f9-8344-d2a513e206a1@amd.com> (raw)
In-Reply-To: <20240402212009.GEZgx2iZC_Plx-ajKW@fat_crate.local>


On 4/2/2024 4:20 PM, Borislav Petkov wrote:
> On Tue, Apr 02, 2024 at 04:00:03PM -0500, Kalra, Ashish wrote:
>> The main issue with doing that in snp_rmptable_init() is that there is no
>> e820 API interfaces available to update the e820_table_kexec and
>> e820_table_firmware and e820_table_firmware has already been exposed to
>> sysfs.
> And?
>
> You can't change it later? Tried?
The main issue is there is no API interface available to do that, i will 
need to add new API interfaces to update the e820_table_kexec and 
e820_table_firmware and then will that be acceptable for a use case 
which can be handled via a platform specific quirk ?
>> The e820 API only exports e820__range_update() which *only* fixes
>> e820_table.
>>
>> The important point to note here is that in most cases BIOS would have
>> reserved RMP table start and end aligned to 2M boundary and setup the e820
>> table which the BIOS passes to the kernel as such,
> So what was this "RMP table start and end physical range may not be
> aligned to 2MB" in your commit message?
> /me is completely confused now.
>
> Or does "most cases" mean that there can be cases where the RMP table
> placement in the BIOS is not 2M aligned and then the kexec kernel could
> try to allocate from within that chunk and there's RMP faults?

Yes exactly, that's what the above comment means.

  That's why the above commit message says "may".

>
> And you want to allocate those chunks up to the 2M boundary
> unconditionally, regardless of SNP enablement?

My point is that we always keep the RMP table memory reserved regardless 
of SNP enablement, so these are simply fixups/adjustments on top of that 
reservation.

Thanks, Ashish

> Now look at your original commit message and tell me how much of what
> came out on this thread, was in it?
>
> Not a lot, I'd say...
>

  reply	other threads:[~2024-04-02 21:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 18:47 Ashish Kalra
2024-03-13 10:58 ` Aithal, Srikanth
2024-04-02 14:45 ` bp
2024-04-02 15:54   ` Tom Lendacky
2024-04-02 16:34     ` bp
2024-04-02 17:06       ` Kalra, Ashish
2024-04-02 17:11         ` Kalra, Ashish
2024-04-02 17:45           ` Borislav Petkov
2024-04-02 18:41             ` Kalra, Ashish
2024-04-02 18:50               ` Borislav Petkov
2024-04-02 19:33                 ` Kalra, Ashish
2024-04-02 20:21                   ` Borislav Petkov
2024-04-02 21:00                     ` Kalra, Ashish
2024-04-02 21:17                       ` Kalra, Ashish
2024-04-02 21:20                       ` Borislav Petkov
2024-04-02 21:31                         ` Kalra, Ashish [this message]
2024-04-02 21:40                           ` Borislav Petkov
2024-04-02 22:09 ` Tom Lendacky
2024-04-02 22:31   ` Kalra, Ashish
2024-04-02 22:42     ` Michael Roth
2024-04-03 21:08       ` Kalra, Ashish
2024-04-04  8:17         ` Jeremi Piotrowski
2024-04-04 18:07           ` Kalra, Ashish

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=f1802e68-88b2-43f9-8344-d2a513e206a1@amd.com \
    --to=ashish.kalra@amd.com \
    --cc=bp@alien8.de \
    --cc=bp@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --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

all inboxes | Powered by JetHome®