]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: Stop leaking PIO bitmaps on cell destruction
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 28 Jun 2015 17:28:27 +0000 (19:28 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 28 Jun 2015 17:35:25 +0000 (19:35 +0200)
Regression of 982f25c88f: We need to release the pages allocated as PIO
bitmap by vcpu_vendor_cell_init on cell destruction.

CC: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/svm.c
hypervisor/arch/x86/vmx.c

index 57d7eb45bff0e430eb8b930d24ccf21a31685279..8c50481b01aec7ce1f74f098057547b068129e11 100644 (file)
@@ -354,6 +354,7 @@ void vcpu_vendor_cell_exit(struct cell *cell)
        paging_destroy(&cell->svm.npt_structs, XAPIC_BASE, PAGE_SIZE,
                       PAGING_NON_COHERENT);
        page_free(&mem_pool, cell->svm.npt_structs.root_table, 1);
+       page_free(&mem_pool, cell->svm.iopm, 3);
 }
 
 int vcpu_init(struct per_cpu *cpu_data)
index ed75467ab03bae4964de3fd1c263e8e315417cba..e4797c8101b35c4c61f8b08c941ca330d14a1546 100644 (file)
@@ -375,6 +375,7 @@ void vcpu_vendor_cell_exit(struct cell *cell)
        paging_destroy(&cell->vmx.ept_structs, XAPIC_BASE, PAGE_SIZE,
                       PAGING_NON_COHERENT);
        page_free(&mem_pool, cell->vmx.ept_structs.root_table, 1);
+       page_free(&mem_pool, cell->vmx.io_bitmap, 2);
 }
 
 void vcpu_tlb_flush(void)