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:
Mingqiang Chi
2018-08-22 14:41:39 +08:00
committed by lijinxia
parent de53964c05
commit 0b54946bac
7 changed files with 48 additions and 69 deletions

View File

@@ -125,14 +125,11 @@ static void vuart_toggle_intr(struct vuart *vu)
intr_reason = vuart_intr_reason(vu);
if (intr_reason != IIR_NOPEND) {
if (vu->vm->vpic != NULL) {
vpic_assert_irq(vu->vm, COM1_IRQ);
}
vpic_assert_irq(vu->vm, COM1_IRQ);
vioapic_assert_irq(vu->vm, COM1_IRQ);
if (vu->vm->vpic != NULL) {
vpic_deassert_irq(vu->vm, COM1_IRQ);
}
vpic_deassert_irq(vu->vm, COM1_IRQ);
vioapic_deassert_irq(vu->vm, COM1_IRQ);
}