hv/mod_irq: decouple irq number reservation from ioapic

This is done be adding irq_rsvd_bitmap as an auxiliary bitmap
besides irq_alloc_bitmap.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Liang Yi
2021-03-16 10:25:37 +08:00
committed by wenlingz
parent 038e0cae92
commit c46e3c71ac
3 changed files with 35 additions and 15 deletions

View File

@@ -126,7 +126,6 @@ void setup_pi_notification(void);
typedef void (*spurious_handler_t)(uint32_t vector);
extern spurious_handler_t spurious_handler;
uint32_t alloc_irq_num(uint32_t req_irq);
uint32_t alloc_irq_vector(uint32_t irq);
/* RFLAGS */
@@ -284,6 +283,19 @@ struct irq_desc {
* @{
*/
/**
* @brief Reserve an interrupt num
*
* Reserved interrupt num will not be available for dynamic IRQ allocations.
* This is normally used by the hypervisor for static IRQ mappings and/or
* arch specific, e.g. IOAPIC, interrupts during initialization.
*
* @param[in] req_irq irq_num to be reserved
*
* @retval >=0 on success, IRQ_INVALID on failure
*/
uint32_t reserve_irq_num(uint32_t req_irq);
/**
* @brief Request an interrupt
*