acrn-hypervisor/hypervisor/common
Zide Chen aef5a4fd29 hv: free ptdev device IRQs when shutting down VM
Currently ptdev_release_all_entries() calls ptirq_release_entry() to
release ptdev IRQs, which is not sufficient because free_irq() is not
included in ptirq_release_entry().

Furthermore, function ptirq_deactivate_entry() and ptirq_release_entry()
have lots of overlaps which make the differences between them are not
clear.

This patch does:

- Adds ptirq_deactivate_entry() call in ptdev_release_all_entries() if the
  irq has not already freed.

- Remove unnecessary code from ptirq_deactivate_entry() to make it do the
  exact opposite to function ptirq_activate_entry(), except that
  entry->allocated_pirq is not reset, which is not necessary.

- Added the missing del_timer() to ptirq_release_entry() to make it almost
  opposite to ptirq_alloc_entry(); Added memset() to clear the whole entry,
  which doesn't have impacts to the functionalities but keep the data structure
  clean.

Tracked-On: #2700
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-04-22 19:56:39 +08:00
..
hv_main.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
hypercall.c hv: check vm state before creating a VM 2019-04-22 15:18:03 +08:00
ptdev.c hv: free ptdev device IRQs when shutting down VM 2019-04-22 19:56:39 +08:00
schedule.c HV: Add one delmode parameter to make_reschedule_request 2019-03-29 16:17:44 +08:00
softirq.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
stack_protector.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
static_checks.c hv: use int32_t replace int 2018-12-12 13:08:10 +08:00
trusty_hypercall.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
vm_load.c hv: replace MEM_2K with a new macro MAX_BOOTARGS_SIZE for bootargs size 2019-03-21 13:08:15 +08:00