From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Rick Edgecombe" <rick.p.edgecombe@intel.com>,
"Kiryl Shutsemau (Meta)" <kas@kernel.org>,
"Zhao, Yan Y" <yan.y.zhao@intel.com>
Cc: "linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"Borislav Petkov" <bp@alien8.de>
Subject: Re: [PATCH 0/3] Move memory acceptance x86 arch code into EFI stub
Date: Fri, 18 Sep 2026 01:19:59 +0200 [thread overview]
Message-ID: <0fce97e4-3c3d-4b25-aa50-b88a003fd033@app.fastmail.com> (raw)
In-Reply-To: <27b267cdaed0c46146de4af2db8362b61e0b08a3.camel@intel.com>
On Thu, 17 Sep 2026, at 20:29, Edgecombe, Rick P wrote:
> +Yan
>
> On Thu, 2026-09-17 at 14:32 +0100, Kiryl Shutsemau wrote:
>> > I guess the caller could care about TDX_PAGE_ALREADY_ACCEPTED errors. But
>> > SNP
>> > doesn't do anything for this case. It seems like part of the problem is that
>> > we
>> > are passing errors back that the caller can't feasibly handle.
>>
>> Maybe. I don't understand SNP model and why they don't care about errors
>> here.
>>
>> Do you have a proposal here?
>
> Yan pointed out that future TDX modules will not take an S-EPT entry lock on
> accepting a NP S-EPT entry. However, I think this won't prevent guest caused
> busys on re-accept attempts?
>
>
> Here is a strawman proposal. Please consider critically.
>
> TDX_PAGE_ALREADY_ACCEPTED: Zero memory that was re-accepted and treat it as a
> success.
>
> TDX_OPERAND_BUSY host contention: Loop and blame the host for any infinite
> loops. It can be not unlike if the host zap's the EPT and the guest gets stuck
> on infinite EPT violations. Except that the host does not get any notification
> of the trouble it is causing... Some sort of TDX arch change to notify the host
> of heavy guest-host contention could be worked on in the background?
>
> TDX_OPERAND_BUSY guest contention: RW lock around accept. Normally take the lock
> for read, and a single fallback attempt takes the lock for write.
>
> Then I think all errors accept() would want to return to the callers are
> handled.
>
> The only thing I'm not sure about is TDX_PAGE_ALREADY_ACCEPTED. Some callers may
> want a warning on that case. I think a warning is more in line with what we have
> done in similar situations, rather than panic. But a warming would throw off the
> EFI stub callers apparently.
The memory acceptance occurs after ExitBootServices(), and so there is little the
EFI stub can do at this point except maybe set a variable with an error message
and reset the system. If that is better than a panic(), this is something we can
consider.
However, I'd like to avoid going off into the weeds here with something that was
intended to simply move some logic from one place to the other. The current code
prints an error to the UART I/O port (rather than the PV console TDX uses when
running in the decompressor) and then loops forever. Is that something we could
retain for this series, and then continue the above discussion in the context of
a separate series based on top of that?
next prev parent reply other threads:[~2026-09-17 23:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 18:37 Ard Biesheuvel
2026-09-14 18:37 ` [PATCH 1/3] x86/tdx: Share tdx_panic() with the " Ard Biesheuvel
2026-09-15 0:02 ` Borislav Petkov
2026-09-15 3:11 ` Borislav Petkov
2026-09-16 7:05 ` Ard Biesheuvel
2026-09-14 18:37 ` [PATCH 2/3] x86/boot: Move unaccepted memory handling out of the decompressor Ard Biesheuvel
2026-09-14 18:37 ` [PATCH 3/3] x86/boot: Drop unused implementation of panic() Ard Biesheuvel
2026-09-14 23:26 ` [PATCH 0/3] Move memory acceptance x86 arch code into EFI stub Borislav Petkov
2026-09-16 18:16 ` Edgecombe, Rick P
2026-09-17 13:32 ` Kiryl Shutsemau
2026-09-17 18:29 ` Edgecombe, Rick P
2026-09-17 23:19 ` Ard Biesheuvel [this message]
2026-09-17 23:52 ` Edgecombe, Rick P
2026-09-18 2:12 ` Yan Zhao
2026-09-18 5:28 ` Yan Zhao
2026-09-18 10:45 ` Kiryl Shutsemau
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=0fce97e4-3c3d-4b25-aa50-b88a003fd033@app.fastmail.com \
--to=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=kas@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=x86@kernel.org \
--cc=yan.y.zhao@intel.com \
/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®