mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 06:29:19 +00:00
HV: MMIODEV: delete memory resource before add it to pre-launched VM
If mmio resource is included in ACPI DATA e820 entry, it is will be mapped to RAM first. Then pre-launched VM can't map mmio resource GPA to its MMIO HPA. Tracked-On: #6320 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
parent
48c070c88e
commit
2e5aa8be99
@ -304,6 +304,10 @@ static void prepare_prelaunched_vm_memmap(struct acrn_vm *vm, const struct acrn_
|
||||
|
||||
for (i = 0U; i < MAX_MMIO_DEV_NUM; i++) {
|
||||
for (j = 0; j < MMIODEV_RES_NUM; j++) {
|
||||
/* If mmio resource is included in ACPI DATA e820 entry, it is already mapped to RAM
|
||||
* delete this potential mapping first
|
||||
*/
|
||||
(void)deassign_mmio_dev(vm, &vm_config->mmiodevs[i].mmiores[j]);
|
||||
(void)assign_mmio_dev(vm, &vm_config->mmiodevs[i].mmiores[j]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user