HV:refine 'apic_page' & 'pir_desc' in 'struct acrn_vlapic'

- update 'apic_page' field in 'struct acrn_vlapic',
   from pointer type to 'struct lapic_regs' type.

 - delete 'pir' and update 'pir_desc' to 'vlapic_pir_desc'
   type.

 - fix potential memory leak in 'vlapic_create()'
   should free allocated memory in case of registering
   mmio handler failure.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang
2018-08-20 18:25:48 +08:00
committed by lijinxia
parent 17ef5076a4
commit e0d40feaa8
4 changed files with 68 additions and 77 deletions

View File

@@ -233,6 +233,10 @@ static void deallocate_mem(struct mem_pool *pool, void *ptr)
}
}
/*
* The return address will be CPU_PAGE_SIZE aligned if 'num_bytes' is greater
* than CPU_PAGE_SIZE.
*/
void *malloc(unsigned int num_bytes)
{
void *memory = NULL;