Those definitions are used during allocating, so let's use them during deallocation as well.
Signed-off-by: Ralf Ramsauer <[email protected]> --- hypervisor/arch/x86/svm.c | 4 ++-- hypervisor/arch/x86/vmx.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hypervisor/arch/x86/svm.c b/hypervisor/arch/x86/svm.c index f2db518d..67169e39 100644 --- a/hypervisor/arch/x86/svm.c +++ b/hypervisor/arch/x86/svm.c @@ -354,7 +354,7 @@ int vcpu_vendor_cell_init(struct cell *cell) return 0; err_free_iopm: - page_free(&mem_pool, cell->arch.svm.iopm, 3); + page_free(&mem_pool, cell->arch.svm.iopm, IOPM_PAGES); return err; } @@ -396,7 +396,7 @@ 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.svm.iopm, 3); + page_free(&mem_pool, cell->arch.svm.iopm, IOPM_PAGES); } int vcpu_init(struct per_cpu *cpu_data) diff --git a/hypervisor/arch/x86/vmx.c b/hypervisor/arch/x86/vmx.c index 0d590bbc..5b3c5b8f 100644 --- a/hypervisor/arch/x86/vmx.c +++ b/hypervisor/arch/x86/vmx.c @@ -359,7 +359,7 @@ int vcpu_vendor_cell_init(struct cell *cell) return 0; err_free_io_bitmap: - page_free(&mem_pool, cell->arch.vmx.io_bitmap, 2); + page_free(&mem_pool, cell->arch.vmx.io_bitmap, PIO_BITMAP_PAGES); return err; } @@ -394,7 +394,7 @@ 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.vmx.io_bitmap, 2); + page_free(&mem_pool, cell->arch.vmx.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-3-ralf.ramsauer%40oth-regensburg.de. For more options, visit https://groups.google.com/d/optout.
