OVMF (or uefi for virtual machines) has 2 parts that must be present on a host: - a firmware image and - so called non-volatile store (nvram). Since the firmware will be the same between all machines on the host, a scope of this bug is the nvram. We need a way to save the nvram files to shared storage and make them available to a VM's OS during it's runtime, preserving any modifications done to the file. The nvram is 128 kib file containing multiple headers, metadata and ~90 kib of rw space for the OS. Each VM with OVMF enabled requires exactly one nvram linked to it.
( Small correction: the room that is directly usable for non-volatile variables is actually 56KB. Quoting the OVMF whitepaper: Description Compression type Size ------------------------------ ---------------------- ------- Non-volatile data storage open-coded binary data 128 KB Variable store 56 KB Event log 4 KB Working block 4 KB Spare area 64 KB Other than this, the description seems correct. Thanks. )
I also recommend to inquire the libvirt developers (esp. Michal Privoznik) about whether, and how, libvirtd instantiates the nvram file for a brand new VM, from the varstore *template* that accompanies the firmware binary.
(In reply to Laszlo Ersek from comment #2) > I also recommend to inquire the libvirt developers (esp. Michal Privoznik) > about whether, and how, libvirtd instantiates the nvram file for a brand new > VM, from the varstore *template* that accompanies the firmware binary. Libvirt does nothing more than equivalent of 'dd if=template of=domain_specific'. It's done in C completely rather than spawning dd process though.
To my understanding this feature was removed from the 4.1 list, since q38 will not be supported in 4.1. Moving out.
(In reply to Yaniv Lavi from comment #6) > To my understanding this feature was removed from the 4.1 list, since q35 > will not be supported in 4.1. Moving out. Same for 4.2, so deferring it.
The size of the varstore file has changed due to fixing bug 1443351; the new size is 528KB. For details, please refer to the commit message on <https://github.com/tianocore/edk2/commit/b24fca05751f> ("OvmfPkg: introduce 4MB flash image (mainly) for Windows HCK", 2017-04-29): Description Compression type Size [KB] ------------------------- ----------------- ---------------------- Non-volatile data storage open-coded binary 128 -> 528 ( +400) data Variable store 56 -> 256 ( +200) Event log 4 -> 4 ( +0) Working block 4 -> 4 ( +0) Spare area 64 -> 264 ( +200)
I understand it was determined this is not needed for q35 support. Can this be closed then?
(In reply to Yaniv Lavi from comment #9) > I understand it was determined this is not needed for q35 support. Can this > be closed then? It is not needed for q35 with Seabios. It is needed for q35 with UEFI and Secure Boot
This bug didn't get any attention for a while, we didn't have the capacity to make any progress. If you deeply care about it or want to work on it please assign/target accordingly
ok, closing. Please reopen if still relevant/you want to work on it.