mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv: vtd: add an API to reserve continuous irtes
dmar_reserve_irte is added to reserve N coutinuous IRTEs. N could be 1, 2, 4, 8, 16, or 32. The reserved IRTEs will not be freed. Tracked-On:#4831 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -671,6 +671,21 @@ void resume_iommu(void);
|
||||
*/
|
||||
int32_t init_iommu(void);
|
||||
|
||||
/**
|
||||
* @brief Reserve num continuous IRTEs.
|
||||
*
|
||||
* @param[in] intr_src filled with type of interrupt source and the source
|
||||
* @param[in] num number of IRTEs to reserve
|
||||
* @param[out] start_id stard index of reserved IRTEs, caller should check the value is INVALID_IRTE_ID or not.
|
||||
*
|
||||
* @retval 0 on success, caller should check whether the returned start index is valid or not.
|
||||
* @retval -EINVAL if corresponding DMAR is not preset.
|
||||
*
|
||||
* @pre num can only be 2, 4, 8, 16 or 32
|
||||
*
|
||||
*/
|
||||
int32_t dmar_reserve_irte(const struct intr_source *intr_src, uint16_t num, uint16_t *start_id);
|
||||
|
||||
/**
|
||||
* @brief Assign RTE for Interrupt Remapping Table.
|
||||
*
|
||||
|
Reference in New Issue
Block a user