mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
HV: modify code for intr storm detect & handling
This patch is to enhance the feature of "interrupt storm mitigation"; when interrupt storm happens on one UOS it should keep as smaller effect to SOS as possible. Add variables in PTdev entry & VM, used to record one UOS's pass-thru devices' interrupt data; add a function to collect the data. Also add a timer used to delay UOS pass-thru devices' interrupt injection if an "interrupt storm" detected by SOS. Tracked-On: #866 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Li Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -173,6 +173,7 @@ struct vm {
|
||||
|
||||
spinlock_t softirq_dev_lock;
|
||||
struct list_head softirq_dev_entry_list;
|
||||
uint64_t intr_inject_delay_delta; /* delay of intr injection */
|
||||
} __aligned(CPU_PAGE_SIZE);
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
|
@@ -48,6 +48,11 @@ static inline void initialize_timer(struct hv_timer *timer,
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool timer_expired(const struct hv_timer *timer)
|
||||
{
|
||||
return ((timer->fire_tsc == 0UL) || (rdtsc() >= timer->fire_tsc));
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't call add_timer/del_timer in the timer callback function.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user