qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New "IndustryStandard" fw_cfg?


From: Gerd Hoffmann
Subject: Re: New "IndustryStandard" fw_cfg?
Date: Wed, 15 Jun 2022 09:33:37 +0200

  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]