mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 20:29:40 +00:00
hv:Replace vpic pointer with instance in structure vm
-- update 'vpic' field in 'struct vm' from pointer to instance, and move it from 'struct vm' to 'struct arch_vm' -- replace MACRO with inline function for vm_pic, and move it to vm.h -- changed vpic_init to void type -- removed vpic_cleanup -- move struct acrn_vpic/i8259_reg_state from vpic.c to vpic.h 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:
@@ -201,7 +201,7 @@ int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm)
|
||||
/* Create virtual uart */
|
||||
vm->vuart = vuart_init(vm);
|
||||
}
|
||||
vm->vpic = vpic_init(vm);
|
||||
vpic_init(vm);
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
/* Create virtual uart */
|
||||
@@ -240,10 +240,6 @@ err:
|
||||
vioapic_cleanup(vm->arch_vm.virt_ioapic);
|
||||
}
|
||||
|
||||
if (vm->vpic != NULL) {
|
||||
vpic_cleanup(vm);
|
||||
}
|
||||
|
||||
if (vm->arch_vm.m2p != NULL) {
|
||||
free(vm->arch_vm.m2p);
|
||||
}
|
||||
@@ -314,9 +310,6 @@ int shutdown_vm(struct vm *vm)
|
||||
free_vm_id(vm);
|
||||
#endif
|
||||
|
||||
if (vm->vpic != NULL) {
|
||||
vpic_cleanup(vm);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
vpci_cleanup(vm);
|
||||
|
@@ -156,7 +156,7 @@ static int vcpu_do_pending_extint(struct vcpu *vcpu)
|
||||
/* check if there is valid interrupt from vPIC, if yes just inject it */
|
||||
/* PIC only connect with primary CPU */
|
||||
primary = get_primary_vcpu(vm);
|
||||
if ((vm->vpic != NULL) && vcpu == primary) {
|
||||
if (vcpu == primary) {
|
||||
|
||||
vpic_pending_intr(vcpu->vm, &vector);
|
||||
if (vector <= NR_MAX_VECTOR) {
|
||||
|
Reference in New Issue
Block a user