From: Dave Hansen <dave.hansen@intel.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: akpm@linux-foundation.org, Baoquan He <bhe@redhat.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
kexec@lists.infradead.org, Yan Zhao <yan.y.zhao@intel.com>,
linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev,
x86@kernel.org, rick.p.edgecombe@intel.com, security@kernel.org
Subject: Re: [PATCH v2 0/1] Accept unaccepted kexec segments' destination addresses
Date: Tue, 4 Mar 2025 11:16:42 -0800 [thread overview]
Message-ID: <99cc1c36-ba3d-40c7-a5bd-d13655fba171@intel.com> (raw)
In-Reply-To: <87o6ygskb8.fsf@email.froward.int.ebiederm.org>
On 3/4/25 10:49, Eric W. Biederman wrote:
> How goes the work to fix this horrifically slow firmware interface?
The firmware interface isn't actually all that slow.
The fundamental requirement is that confidential computing environments
need to be handed memory in a known-benign state. For AMD SEV
historically, that's meant doing things like flushing the caches so that
old cache evictions don't write to new data. For SGX, it's meant having
the CPU zero pages (in microcode) before adding them to an enclave.
For TDX, it's meant ensuring that TDX protections are in place, like the
memory integrity and "TD bit". But, those can't actually be set until
the page has been assigned to a TD since the integrity data is dependent
on the per-TD encryption key. But, the "memory integrity and TD bit" are
stored waaaaaaaay out in DRAM because they're pretty large structures
and aren't practical to store inside the CPU.
Even when the firmware isn't in play, it's still expensive to "convert"
pages back and forth to protected or not. See __prep_encrypted_page in
the MKTME series[1], for example. It was quite slow, requiring memset()s
and cache flushing, even though there was no firmware in sight. That's
exactly what the firmware is doing when you ask it to accept memory.
In other words, the process of ensuring that memory is sanitized before
going into a confidential computing environment is slow, not the
firmware interface.
I think what you're effectively asking for is either making DRAM faster,
or some other architecture that doesn't rely on going all the way out to
DRAM to sanitize a page.
1.
https://lore.kernel.org/lkml/20190731150813.26289-8-kirill.shutemov@linux.intel.com/t/
next prev parent reply other threads:[~2025-03-04 19:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 9:49 [PATCH v2 0/1] Accept unaccepted kexec segments' destination addresses Yan Zhao
2024-12-13 9:54 ` [PATCH v2 1/1] kexec_core: " Yan Zhao
2025-02-13 15:50 ` Dave Hansen
2025-02-14 13:37 ` Kirill A. Shutemov
2025-02-19 23:16 ` Dave Hansen
2025-01-13 10:01 ` [PATCH v2 0/1] " Kirill A. Shutemov
2025-01-13 11:12 ` Baoquan He
2025-01-13 14:59 ` Eric W. Biederman
2025-01-14 3:26 ` Baoquan He
2025-01-14 7:04 ` Yan Zhao
2025-01-14 10:08 ` Kirill A. Shutemov
2025-02-13 15:55 ` Dave Hansen
2025-02-14 13:46 ` Kirill A. Shutemov
2025-02-14 16:20 ` Dave Hansen
2025-03-04 8:41 ` Kirill A. Shutemov
2025-03-04 18:49 ` Eric W. Biederman
2025-03-04 19:16 ` Dave Hansen [this message]
2025-03-12 20:33 ` Dave Hansen
2025-02-19 23:03 ` Jianxiong Gao
2025-02-20 2:27 ` Ashish Kalra
2025-03-04 23:43 ` Andrew Morton
2025-03-04 23:53 ` Andrew Morton
2025-03-04 23:54 ` Andrew Morton
2025-03-13 12:06 ` Kirill A. Shutemov
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=99cc1c36-ba3d-40c7-a5bd-d13655fba171@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=security@kernel.org \
--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