hv: mmio: move EPT operation out of register_mmio_emulation_handler
register_mmio_emulation_handler should only register handler for mmio emulation. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
4f6653dc9c
commit
6f310d1ab2
|
@ -6,7 +6,6 @@
|
|||
#include <vm.h>
|
||||
#include <irq.h>
|
||||
#include <errno.h>
|
||||
#include <ept.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
#define ACRN_DBG_IOREQUEST 6U
|
||||
|
@ -695,16 +694,6 @@ void register_mmio_emulation_handler(struct acrn_vm *vm,
|
|||
mmio_node->handler_private_data = handler_private_data;
|
||||
mmio_node->range_start = start;
|
||||
mmio_node->range_end = end;
|
||||
|
||||
/*
|
||||
* SOS would map all its memory at beginning, so we
|
||||
* should unmap it. But UOS will not, so we shouldn't
|
||||
* need to unmap it.
|
||||
*/
|
||||
if (is_sos_vm(vm)) {
|
||||
ept_del_mr(vm, (uint64_t *)vm->arch_vm.nworld_eptp, start, end - start);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <vm.h>
|
||||
#include <errno.h>
|
||||
#include <irq.h>
|
||||
#include <ept.h>
|
||||
#include <assign.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
|
@ -472,6 +473,8 @@ vioapic_init(struct acrn_vm *vm)
|
|||
(uint64_t)VIOAPIC_BASE,
|
||||
(uint64_t)VIOAPIC_BASE + VIOAPIC_SIZE,
|
||||
vm);
|
||||
ept_del_mr(vm, (uint64_t *)vm->arch_vm.nworld_eptp,
|
||||
(uint64_t)VIOAPIC_BASE, (uint64_t)VIOAPIC_SIZE);
|
||||
vm->arch_vm.vioapic.ready = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue