mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 20:29:40 +00:00
DM: ovmf NV storage writeback support
To support modification of OVMF NV storage, add an option "w" for --ovmf to write the changed OVMF NV data section back to the OVMF image from guest memory before deinit operations. This will enable persistent EFI variables. Only option "w" is supported, dm will exit if passing invalid option. It expects OVMF NV storage writeback with option "w" when power off or reboot the UOS, poweroff, cold and warm reboot in EFI shell and when dm recieves SIGINT and SIGHUP. Tracked-On: #3413 Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Reviewed-by:Eddie Dong <eddie.dong@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -516,6 +516,12 @@ vrtc_fail:
|
||||
static void
|
||||
vm_deinit_vdevs(struct vmctx *ctx)
|
||||
{
|
||||
/*
|
||||
* Write ovmf NV storage back to the original file from guest
|
||||
* memory before deinit operations.
|
||||
*/
|
||||
acrn_writeback_ovmf_nvstorage(ctx);
|
||||
|
||||
deinit_pci(ctx);
|
||||
monitor_close();
|
||||
|
||||
@@ -535,6 +541,12 @@ vm_deinit_vdevs(struct vmctx *ctx)
|
||||
static void
|
||||
vm_reset_vdevs(struct vmctx *ctx)
|
||||
{
|
||||
/*
|
||||
* Write ovmf NV storage back to the original file from guest
|
||||
* memory before deinit operations.
|
||||
*/
|
||||
acrn_writeback_ovmf_nvstorage(ctx);
|
||||
|
||||
/*
|
||||
* The current virtual devices doesn't define virtual
|
||||
* device reset function. So we call vdev deinit/init
|
||||
|
Reference in New Issue
Block a user