mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-07 03:40:27 +00:00
hv: release IOMMU irte when releasing ptirq remapping entries
IRTE is freed if ptirq entry is released from remove_msix_remapping() or remove_intx_remapping(). But if it's called from ptdev_release_all_entries(), e.g. SOS shutdown/reboot, IRTE is not freed. This patch adds a release_cb() callback function to do any architectural specific cleanup. In x86, it's used to release IRTE. On VM shutdown, vpci_cleanup() needs to remove MSI/MSI-X remapping on ptirq entries, thus it should be called before ptdev_release_all_entries(). 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>
This commit is contained in:
@@ -120,6 +120,9 @@ struct ptirq_msi_info {
|
||||
int32_t is_msix; /* 0-MSI, 1-MSIX */
|
||||
};
|
||||
|
||||
struct ptirq_remapping_info;
|
||||
typedef void (*ptirq_arch_release_fn_t)(const struct ptirq_remapping_info *entry);
|
||||
|
||||
/* entry per each allocated irq/vector
|
||||
* it represents a pass-thru device's remapping data entry which collecting
|
||||
* information related with its vm and msi/intx mapping & interaction nodes
|
||||
@@ -139,6 +142,7 @@ struct ptirq_remapping_info {
|
||||
|
||||
uint64_t intr_count;
|
||||
struct hv_timer intr_delay_timer; /* used for delay intr injection */
|
||||
ptirq_arch_release_fn_t release_cb;
|
||||
};
|
||||
|
||||
extern struct ptirq_remapping_info ptirq_entries[CONFIG_MAX_PT_IRQ_ENTRIES];
|
||||
|
Reference in New Issue
Block a user