hv:Replace dynamic memory with static for mmio

-- Config MAX_EMULATED_MMIO_REGIONS 16 in Kconfig
-- Add emulated mmio array and emulated mmio regions
   in vm structure
-- Remove mmio list in vm structure
-- Remove unregister_mmio_emulation_handler and
   vioapic_cleanup APIs

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Mingqiang Chi
2018-11-06 10:16:11 +08:00
committed by lijinxia
parent b5505c43a2
commit 9a009bcef2
9 changed files with 42 additions and 98 deletions

View File

@@ -523,14 +523,6 @@ vioapic_init(struct acrn_vm *vm)
vm);
}
void
vioapic_cleanup(const struct acrn_vioapic *vioapic)
{
unregister_mmio_emulation_handler(vioapic->vm,
(uint64_t)VIOAPIC_BASE,
(uint64_t)VIOAPIC_BASE + VIOAPIC_SIZE);
}
uint32_t
vioapic_pincount(const struct acrn_vm *vm)
{

View File

@@ -387,11 +387,7 @@ static int vmsix_init(struct pci_vdev *vdev)
static int vmsix_deinit(struct pci_vdev *vdev)
{
if (vdev->msix.intercepted_size != 0UL) {
unregister_mmio_emulation_handler(vdev->vpci->vm, vdev->msix.intercepted_gpa,
vdev->msix.intercepted_gpa + vdev->msix.intercepted_size);
vdev->msix.intercepted_size = 0U;
}
vdev->msix.intercepted_size = 0U;
if (vdev->msix.table_count != 0U) {
ptdev_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, vdev->msix.table_count);