Skip to contentSkip to conversation

OVMF NvVars in flash, on KVM [was: OvmfPkg/NvVarsFileLib: handle the inital file not found]

Qemu-devel Laszlo Ersek 1 participant 1 message Jul 10, 2013 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFe8ug-yUmnuT0JNUikOKwoC5e7VUma_UdtRP-uXktdB1CNJXg@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFe8ug8kWiPQU6u+m-FvAVyKBgEes=BssfUwwjd-Mf_N6YfhkA@mail.gmail.com

#5 lore raw

I'm derailing this preexistent edk2-devel thread for public benefit :)

Quoted 37 lines · Jordan Justen
Quoted 8 lines · Laszlo Ersek
Quoted 6 lines · Jordan Justen

We could consider yanking all these hacks out, and just forcing people to use QEMU with flash support when that eventually gets finished.

But, some people like the idea that the 'disk image' can decide the boot order, so I'm not sure what the eventual solution will be.

Quoted 6 lines

I think we should keep (improving) the on-disk NvVars stuff until the flash support is complete.

BTW could you please summarize the status on that? I believe KVM and qemu already have the necessary commits (could you identify them perhaps?)

Yes, it is currently supported on QEMU master. For non-KVM, it should work since QEMU 1.2. For KVM, it should work as of the next QEMU release (1.6) whenever that happens.

But, recently someone noted a regression with this support, so I need to investigate this.

Quoted 2 lines

and that you have a WIP series for OVMF -- what needs to be done there?

2 things I know of:
* Clean up or perhaps just push fwd my ovmf-nvvars branch
https://github.com/jljusten/edk2/tree/ovmf-nvvars
* Push fwd a fix for a boot issue with X64 page tables residing in the 'ROM/flash' memory with the newer KVM read-only memory support. (The same support that makes flash possible on KVM causes OVMF to not boot for me.) I have a fix for this.

From a more recent discussion,

Quoted 10 lines · Gleb Natapov
Quoted 3 lines · Laszlo Ersek

I'm still very confused about the interplay between emulated flash and KVM. If anyone can post a summary, I'd be grateful.

If you want to run code from emulated flash you need RO memory support in KVM. It is possible to implement flash without RO memory, but you will not be able to put UEFI code into it. I do not know where requirement that UEFI and non-volatile variables should be on the same flash is coming from. Can we put UEFI into a ROM and provide separate flash to store non-volatile variables?

I have no idea what to answer, but I desperately want this to work :) Currently I can't spend much time on it (and of course I'm not prodding anyone to do it for me), I'd just like to understand the status.

So, what *exact* upstream Linux commit adds RO memory support to KVM (on x86_64)?

How would a single *hardware* flash device store both (compressed) UEFI code and (rewriteable) non-volatile variables?

What else do flash + KVM depend on? Can you guys please talk to each other directly and let me just listen in? :)

Thanks!
Laszlo