Same as before - we can now do this in vcpu.c.
Signed-off-by: Ralf Ramsauer <[email protected]>
---
hypervisor/arch/x86/svm.c | 1 -
hypervisor/arch/x86/vcpu.c | 3 +++
hypervisor/arch/x86/vmx.c | 1 -
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hypervisor/arch/x86/svm.c b/hypervisor/arch/x86/svm.c
index e1000447..74abe652 100644
--- a/hypervisor/arch/x86/svm.c
+++ b/hypervisor/arch/x86/svm.c
@@ -381,7 +381,6 @@ void vcpu_vendor_cell_exit(struct cell *cell)
{
paging_destroy(&cell->arch.svm.npt_iommu_structs, XAPIC_BASE,
PAGE_SIZE, PAGING_NON_COHERENT);
- page_free(&mem_pool, cell->arch.io_bitmap, IOPM_PAGES);
}
int vcpu_init(struct per_cpu *cpu_data)
diff --git a/hypervisor/arch/x86/vcpu.c b/hypervisor/arch/x86/vcpu.c
index cf8ff04c..81ff8772 100644
--- a/hypervisor/arch/x86/vcpu.c
+++ b/hypervisor/arch/x86/vcpu.c
@@ -159,6 +159,9 @@ void vcpu_cell_exit(struct cell *cell)
b++, pio_bitmap++, root_pio_bitmap++, pio_bitmap_size--)
*b &= *pio_bitmap | *root_pio_bitmap;
+ page_free(&mem_pool, cell->arch.io_bitmap,
+ vcpu_vendor_get_io_bitmap_pages());
+
vcpu_vendor_cell_exit(cell);
}
diff --git a/hypervisor/arch/x86/vmx.c b/hypervisor/arch/x86/vmx.c
index 2f46b7e9..c4b7dbb6 100644
--- a/hypervisor/arch/x86/vmx.c
+++ b/hypervisor/arch/x86/vmx.c
@@ -378,7 +378,6 @@ void vcpu_vendor_cell_exit(struct cell *cell)
{
paging_destroy(&cell->arch.vmx.ept_structs, XAPIC_BASE, PAGE_SIZE,
PAGING_NON_COHERENT);
- page_free(&mem_pool, cell->arch.io_bitmap, PIO_BITMAP_PAGES);
}
void vcpu_tlb_flush(void)
--
2.22.0
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/20190713181037.4358-7-ralf.ramsauer%40oth-regensburg.de.
For more options, visit https://groups.google.com/d/optout.