mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
HV: bug fix in operating softirq
Current code is missing to handle the following race condition: Before: sti | V handle softirq with a while loop | <----- if a new softirq generated at this point, V it will be missed to be handled. cli | V return with unclear softirq bitmap After: again: sti | V handle softirq with a while loop | V cli | V check if a new softirq generated, if yes, jump back to above again lable point, and do a while loop again. | V return with clear softirq bitmap Signed-off-by: Zheng, Gen <gen.zheng@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -32,9 +32,7 @@ void vcpu_thread(struct vcpu *vcpu)
|
||||
|
||||
do {
|
||||
/* handling pending softirq */
|
||||
CPU_IRQ_ENABLE();
|
||||
exec_softirq();
|
||||
CPU_IRQ_DISABLE();
|
||||
|
||||
/* Check and process pending requests(including interrupt) */
|
||||
ret = acrn_handle_pending_request(vcpu);
|
||||
|
Reference in New Issue
Block a user