dm: allow High BIOS to be modifiable by the guest
In order to support OVMF NV storage writeback, the High BIOS region in the guest will behave as RAM and can be modified by OVMF itself. Give the guest write permission to this page. Tracked-On: #3413 Signed-off-by: Peter Fang <peter.fang@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
parent
12955fa80f
commit
c787aaa328
|
@ -773,9 +773,14 @@ int hugetlb_setup_memory(struct vmctx *ctx)
|
|||
|
||||
/* map ept for biosmem */
|
||||
if (ctx->biosmem > 0) {
|
||||
/*
|
||||
* The High BIOS region can behave as RAM and be
|
||||
* modified by the boot firmware itself (e.g. OVMF
|
||||
* NV data storage region).
|
||||
*/
|
||||
if (vm_map_memseg_vma(ctx, ctx->biosmem, 4 * GB - ctx->biosmem,
|
||||
(uint64_t)(ctx->baseaddr + 4 * GB - ctx->biosmem),
|
||||
PROT_READ | PROT_EXEC) < 0)
|
||||
PROT_ALL) < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue