hv:Replace vioapic pointer with instance in structure vm

-- rename struct vioapic --> struct acrn_vioapic
-- update 'vioapic' field in 'struct arch_vm' from pointer
   to instance
-- change vm_ioapic(vm) to inline, and move it to vm.h
-- change vioapic_init to void type

Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Mingqiang Chi
2018-08-22 17:09:41 +08:00
committed by lijinxia
parent 29dbd1084d
commit 4e8798e018
5 changed files with 48 additions and 60 deletions

View File

@@ -98,7 +98,7 @@ struct vm_arch {
void *tmp_pg_array; /* Page array for tmp guest paging struct */
void *iobitmap[2];/* IO bitmap page array base address for this VM */
void *msr_bitmap; /* MSR bitmap page base address for this VM */
void *virt_ioapic; /* Virtual IOAPIC base address */
struct acrn_vioapic vioapic; /* Virtual IOAPIC base address */
struct acrn_vpic vpic; /* Virtual PIC */
/**
* A link to the IO handler of this VM.
@@ -255,6 +255,12 @@ vm_pic(struct vm *vm)
return (struct acrn_vpic *)&(vm->arch_vm.vpic);
}
static inline struct acrn_vioapic *
vm_ioapic(struct vm *vm)
{
return (struct acrn_vioapic *)&(vm->arch_vm.vioapic);
}
int shutdown_vm(struct vm *vm);
void pause_vm(struct vm *vm);
void resume_vm(struct vm *vm);