mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: vcpu: wait and signal vcpu event support
Introduce two kinds of events for each vcpu, VCPU_EVENT_IOREQ: for vcpu waiting for IO request completion VCPU_EVENT_VIRTUAL_INTERRUPT: for vcpu waiting for virtual interrupts events vcpu can wait for such events, and resume to run when the event get signalled. This patch also change IO request waiting/notifying to this way. Tracked-On: #4329 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -553,12 +553,10 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid, uint16_t vcpu_id)
|
||||
__func__, vcpu_id, target_vm->vm_id);
|
||||
} else {
|
||||
vcpu = vcpu_from_vid(target_vm, vcpu_id);
|
||||
if (vcpu->state == VCPU_PAUSED) {
|
||||
if (!vcpu->vm->sw.is_completion_polling) {
|
||||
resume_vcpu(vcpu);
|
||||
}
|
||||
ret = 0;
|
||||
if (!vcpu->vm->sw.is_completion_polling) {
|
||||
signal_event(&vcpu->events[VCPU_EVENT_IOREQ]);
|
||||
}
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user