|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC] OVMF NVRAM Variable Retention
On 06/07/18 01:59, Ross Lagerwall wrote: On 06/06/2018 04:01 PM, aaron.young@xxxxxxxxxx wrote:Hello all,I have been tasked with the issue of UEFI NVRAM variable retention with Xen HVM/OVMF based guests and wanted to consult the experts before I undertake any significant coding effort. I am new to Xen so any help/direction would be appreciated.What I hope to gain from this RFC inquiry is the following:1. Has there been any significant past discussion regarding this issue? If so, can somebody kindly point me to these discussion(s) and/or give me an overview of the findings?2. Is there any current coding effort going on in this area?Yes! I'm working on this at the moment.
Great! I'm glad I asked before starting implementation.
3. Any suggestions or proposals on how to fix the issue including any issues or caveats that I should be aware of?Issue details:In a nutshell, if a Xen guest which has been configured to use OVMF is destroyed and re-created, the UEFI NVRAM variables are not retained. This seems to be a well-known issue to which there is no resolution. The issue seems to center around the fact that these Xen guests are not configured to use a file-backed backing store for the NVRAM variables (such as is commonly used with QEMU/KVM guests).This issue can cause OVMF OS boot option(s) to be lost preventing the ability to boot the OS after a guest is destroyed/re-created. It also has implications on secure boot (which require NVRAM variables to be retained).Some key observations:1. OVMF currently supports memory-mapped, file-backed 'pflash' devices from Qemu. i.e. Qemu can map varstore files into memory for use by OVMF via -drive parameters such as:
Yes, this is the _exact_ solution I had in mind.
I would very much like to see your patches so I can see how you did
it (which would assist me in learning the code). If you wouldn't mind,
could please send the patches to me privately? I'd greatly appreciate
it. Thanks!!
Or any other suggested approaches on how to fix this issue?However... I did not like this approach for two reasons:1) Having an emulated flash blob is difficult to manage outside of the guest (i.e. populating initial state, updating variables if needed). For XenServer, we want more flexibility.2) While Secure Boot can be enabled with this implementation, it is not sufficiently secure because the guest is able to write anything it wants to the emulated flash. KVM solved this problem with SMM mode but I don't like that solution either.So I am busy implementing:A UEFI driver frontend which implements variable services by proxying requests to a backend running in dom0 (could be part of QEMU). This ensures security because the guest cannot directly write to the variable storage and the authentication checks are done outside of guest context. It allows flexibility because the backend can store the variables in any form (e.g. an sqlite database) rather than being restricted to an emulated flash blob.So far I've got the normal variable services implemented and am busy with the authenticated variable services.Let me know if you have any questions. I hope to present this approach at the QEMU/KVM forum later this year.Hope that helps, Thank you very much for the info. Look forward to your solution! -Aaron _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |