Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Gupta, Pankaj" <pankaj.gupta@amd.com>
To: Ard Biesheuvel <ardb@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	Dave Hansen <dave.hansen@intel.com>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Kiryl Shutsemau (Meta)" <kas@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-efi@vger.kernel.org, Pankaj.gupta.linux@gmail.com
Subject: Re: [PATCH RFC 0/3] x86/e820: Ignore memmap= and mem= in confidential guests
Date: Tue, 24 Nov 2026 18:27:55 +0100	[thread overview]
Message-ID: <f059498b-1e65-48cb-bc40-62323e161a14@amd.com> (raw)
In-Reply-To: <c0e82936-9436-45e4-a8b6-07bdaa9680df@app.fastmail.com>

>>>>>> In a confidential guest (SEV-SNP, TDX) the EFI stub builds the unaccepted
>>>>>> memory bitmap before the command line is parsed. memmap= and mem= edit
>>>>>> e820_table only afterwards.
>>>>> memmap= and mem= are debugging tools, right?
>>>> I wish they were 🙂
>>>> But AFAIU they are used to carve out "pmem" or PFN-mapped memory.
>>> I've used them that way for development, but production pmem systems
>>> always had persistent memory in their BIOS-provided memory maps.
>>>
>>> How are folks depending on these in production in confidential guests?
>> They shouldn't but you can't guarantee that.
>>
>> But I don't mind letting them crash if they do :)
>>
> I'm fine with either approach (i.e. disallowing it or doing nothing
> at all), as long as we don't pretend that this is something that is
> expected to work.

Yes, it is confusing for a user who expects it to work.  I hit this
myself and spent time finding the cause: a memmap= hole consistently
crashes a confidential guest (SEV-SNP) early in boot.

I tried to fix it [1], but a bitmap unit cannot be half accepted when the
hole is not 2 MiB aligned.  Also, a TDX guest does accept such holes.

So we are left with the following options:

  - disallow the memmap= options with a clear warning, as this series
    does,
  - add similar handling for TDX, so that holes are not accepted there
    either, as done for SEV-SNP in [1]; memmap= holes that are not
    2 MiB aligned would still be unhandled, or
  - only print a warning and leave the options applied, in which case
    memmap= holes still crash SEV-SNP guests.

Which of these do you prefer, or is there a better way to handle it?

[1] 
https://lore.kernel.org/all/20261113105554.199912-1-pankaj.gupta@amd.com/

Thanks,

Pankaj



      parent reply	other threads:[~2026-11-24 17:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 13:32 [PATCH RFC 0/3] x86/e820: Ignore memmap= and mem= in confidential guests Pankaj Gupta
2026-11-24 13:32 ` [PATCH RFC 1/3] x86/e820: Ignore memmap= " Pankaj Gupta
2026-11-24 13:32 ` [PATCH RFC 2/3] x86/e820: Allow memmap= in a kdump kernel " Pankaj Gupta
2026-11-24 13:32 ` [PATCH RFC 3/3] x86/e820: Ignore mem= " Pankaj Gupta
2026-11-24 15:09 ` [PATCH RFC 0/3] x86/e820: Ignore memmap= and " Dave Hansen
2026-11-24 15:56   ` Mike Rapoport
2026-11-24 15:58     ` Dave Hansen
2026-11-24 16:14       ` Mike Rapoport
2026-11-24 16:26         ` Ard Biesheuvel
2026-11-24 16:32           ` Dave Hansen
2026-11-24 17:27           ` Gupta, Pankaj [this message]

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=f059498b-1e65-48cb-bc40-62323e161a14@amd.com \
    --to=pankaj.gupta@amd.com \
    --cc=Pankaj.gupta.linux@gmail.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kas@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=rppt@kernel.org \
    --cc=tglx@kernel.org \
    --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