qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Xu, Min M" <min.m.xu@intel.com>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Li, Xiaoyao" <xiaoyao.li@intel.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"Yamahata, Isaku" <isaku.yamahata@intel.com>
Subject: Re: New "IndustryStandard" fw_cfg?
Date: Wed, 15 Jun 2022 09:33:37 +0200	[thread overview]
Message-ID: <20220615073337.jq654i7ba33xttwh@sirius.home.kraxel.org> (raw)
In-Reply-To: <PH0PR11MB50643B5AEE5A399EB8AFB000C5AD9@PH0PR11MB5064.namprd11.prod.outlook.com>

  Hi,

> > There's a new UEFI feature in v2.9 of the specification (March 2021) that
> > allows for memory ranges to be classified as "unaccepted", since both TDX
> > and SEV-SNP require that the guest VM accept any host-made changes to
> > page state. We should expect newer technologies on non-x86 architectures
> > to require memory acceptance as well. Operating systems are not
> > necessarily going to support this memory type, however.

> > For Qemu, the main code I see for adding config is here, but I'm not sure
> > what y'all's preferred external configuration method is to get a value from an

Ideally no external configuration, although I suspect we need something
at least temporarily.

IMHO the long-term goal should be to make this fully automatic, by
having efi apps (which includes the linux kernel's efi stub) and
firmware negotiate this.  Problem is this most likely requires changing
the uefi specs, which will take a while.

One possible way I see is extending efi boot services with a
GetMemoryMapEx() call, with an additional flags parameter where the
caller can specify that it can handle unaccepted memory with a flag
bit.  When the guest does not set the flag (or uses the old GetMemoryMap
call) the firmware must accept all memory and return a memory map
without unaccepted memory.

> > 2. A "well-known" file path to be included in the file slots starting at 0x0020,
> > such as "etc/min_accepted_mem_size", still plumbed through like in 1.

New options should use a file path.

See also docs/specs/fw_cfg.txt in qemu source tree.

take care,
  Gerd



  parent reply	other threads:[~2022-06-15  7:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 18:08 New "IndustryStandard" fw_cfg? Dionna Amalie Glaze
     [not found] ` <PH0PR11MB50643B5AEE5A399EB8AFB000C5AD9@PH0PR11MB5064.namprd11.prod.outlook.com>
2022-06-15  7:33   ` Gerd Hoffmann [this message]
2022-06-15 19:23     ` Dionna Amalie Glaze
2022-06-15 15:19   ` Xiaoyao Li
2022-06-15 16:51     ` Tom Lendacky
2022-06-16  5:37     ` Gerd Hoffmann
2022-06-16  5:49       ` Xiaoyao Li
2022-06-16  6:00         ` Gerd Hoffmann
2022-06-16  6:33   ` Xiaoyao Li
2022-06-16  8:28     ` Gerd Hoffmann
2022-06-17  2:53       ` Xiaoyao Li
2022-06-17 19:57         ` Dionna Amalie Glaze
2022-06-20 10:42           ` Gerd Hoffmann

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=20220615073337.jq654i7ba33xttwh@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=dionnaglaze@google.com \
    --cc=erdemaktas@google.com \
    --cc=isaku.yamahata@intel.com \
    --cc=jiewen.yao@intel.com \
    --cc=min.m.xu@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoyao.li@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;
as well as URLs for NNTP newsgroup(s).