From: "Relph, Richard" <richard.relph@amd.com>
To: "Jörg Rödel" <joro@8bytes.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
coconut-svsm@lists.linux.dev, linux-coco@lists.linux.dev
Subject: Re: SVSM Development Call July 2nd, 2025
Date: Wed, 9 Jul 2025 07:20:39 -0500 [thread overview]
Message-ID: <8f73b209-f521-4770-b940-7f6dff3accd5@amd.com> (raw)
In-Reply-To: <dxk7tpe3sebmv55p2izpwe5nr5esqf7rxwtzzmjio5zmzogam4@mdtstwmhvyj2>
On 7/9/2025 7:02 AM, Jörg Rödel wrote:
> Hi Richard,
>
> On Tue, Jul 08, 2025 at 10:12:09AM -0500, Relph, Richard wrote:
>> Jon Lange should weigh in here... he's the expert on this.
>> But I believe it would need to be dynamic at run-time.
>> Using 'worst case' allocations that might have every page ending up needing
>> it's own page state entry leads to excessive memory reservations. While not
>> having enough memory leads to fatal errors. Being able start with a
>> "reasonable" amount for page state while allowing for expansion later if
>> needed is the preferred solution. At least that's what I was hearing last
>> Wednesday.
>
> I think it is reasonable to assume that the (Linux) guest will eventually use
> all available memory, and thus it makes sense to allocate the page-state
> tracking data structure(s) big enough to cover all all guest memory right from
> the start.
>
> This eliminates the need for runtime resizing of SVSM memory, which is also
> only possible on platforms/configurations that use the SVSM protocol.
A "one entry for every page" approach to the page state tracking information might be pretty large, worst case. I'd have to replay the conversation from last week, but my sense was there's a fair bit of information that might eventually want to be known about each page. Some form of compression feels appropriate, since adjacent pages will often have identical state. But, worst case, every page could have different state, especially as the information about each page grows.
But we've stretched beyond my understanding of all the kinds of information that we might want to track from SVSM. Jon and others would need to chime in. For my immediate needs (rebooting a guest from SVSM), all I need is one bit per page... and I was considering run-length encoding that since it feels to me at this point like OVMF and Linux both do SVSM validate operations on large contiguous blocks of pages.
I agree, though, that if the long-term goal of SVSM is to be able to support guest OSs that are blissfully ignorant of SNP and SVSM, we can't rely on the guest OS to cooperate and a worst-case pre-allocation would be required, absent a way to get more from the host OS.
Richard
>
> Regards,
>
> Joerg
prev parent reply other threads:[~2025-07-09 12:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 20:18 SVSM Development Call July 2nd, 2025 Jörg Rödel
2025-07-04 8:12 ` Jörg Rödel
2025-07-04 10:36 ` Gerd Hoffmann
2025-07-04 16:39 ` Jörg Rödel
2025-07-07 13:50 ` Relph, Richard
2025-07-08 14:12 ` Gerd Hoffmann
2025-07-08 15:12 ` Relph, Richard
2025-07-09 9:43 ` Gerd Hoffmann
2025-07-09 12:04 ` Relph, Richard
2025-07-10 4:32 ` [EXTERNAL] " Jon Lange
2025-07-11 13:30 ` Gerd Hoffmann
2025-07-11 17:24 ` Jon Lange
2025-07-14 10:49 ` Gerd Hoffmann
2025-07-14 16:18 ` Jon Lange
2025-07-15 15:07 ` Gerd Hoffmann
2025-07-15 17:18 ` Jon Lange
2025-07-09 12:02 ` Jörg Rödel
2025-07-09 12:20 ` Relph, Richard [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=8f73b209-f521-4770-b940-7f6dff3accd5@amd.com \
--to=richard.relph@amd.com \
--cc=coconut-svsm@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kraxel@redhat.com \
--cc=linux-coco@lists.linux.dev \
/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