Suppose the current vcpu is 0, the other vcpus (1, 2, 3) may wait on the
"get_split_lock", the current vcpu need clear the ACRN_REQUEST_SPLIT_LOCK
explicitly here after finishing the emulation. Otherwise, it make cause
dead lock. for example:
1. Once vcpu 0 "put_split_lock", let's say vcpu 1 will "get_split_lock".
2. vcpu 1 call "vcpu_make_request" to pause vcpu 0, 2, 3.
3. vcpu 1's VCPU_EVENT_SPLIT_LOCK is still not cleared because
the vcpu 0 called "vcpu_make_request" ever.
4. All vcpus will wait for VCPU_EVENT_SPLIT_LOCK in acrn_handle_pending_request.
We should avoid this dead lock case.
Please note: this patch is only for release 2.5 test.
Tracked-On: #6051
Signed-off-by: Jie Deng <jie.deng@intel.com>
On the original WaaG, split-lock was rarely triggered by WaaG kernel.
We didn't find any problems when removing this patch. So this patch
was discarded in the final patch set merge.
Now, the latest Windows graphic driver will trigger lots of
split-lock very frequently. The test team reports this patch will
affect the stability.
Add this patch back to improve stability by using a dedicate lock.
Please note: This patch is only for release 2.5 test.
Tracked-On: #6051
Signed-off-by: Jie Deng <jie.deng@intel.com>
Instead of "#include <x86/foo.h>", use "#include <asm/foo.h>".
In other words, we are adopting the same practice in Linux kernel.
Tracked-On: #5920
Signed-off-by: Liang Yi <yi.liang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Requires explicit arch path name in the include directive.
The config scripts was also updated to reflect this change.
Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
A new x86/guest/virq.h head file now contains all guest
related interrupt handling API.
Tracked-On: #5825
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
When "signal_event" is called, "wait_event" will actually not block.
So it is ok to remove this line.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
This patch move the split-lock logic into dedicated file
to reduce LOC. This may make the logic more clear.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>