io_emul: remove pending_pre_work

Now we do not need pending_pre_work anymore, as we can make sure IO request
VCPU resume from where it paused.

Now only three fixed points will try to do schedule:
- vcpu_thread: before vm entry, will check reschedule flag and to it if needed
- default_idle: loop check reschedule flag to see if need switch out
- io request: if IO REQ need DM's handle, it will schedule out

Tracked-On: #2394
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
Jason Chen CJ
2019-01-21 14:08:39 +08:00
committed by wenlingz
parent 4fc54f952e
commit fb41ea5cfb
5 changed files with 3 additions and 43 deletions

View File

@@ -146,18 +146,7 @@ void emulate_io_post(struct acrn_vcpu *vcpu)
} else {
switch (vcpu->req.type) {
case REQ_MMIO:
/*
* In IO completion polling mode, the post work of IO emulation will
* be running on its own pcpu, then we can do MMIO post work directly;
* While in notification mode, the post work of IO emulation will be
* running on SOS pcpu, then we need request_vcpu_pre_work and let
* its own pcpu get scheduled and finish the MMIO post work.
*/
if (!vcpu->vm->sw.is_completion_polling) {
request_vcpu_pre_work(vcpu, ACRN_VCPU_MMIO_COMPLETE);
} else {
dm_emulate_mmio_post(vcpu);
}
dm_emulate_mmio_post(vcpu);
break;
case REQ_PORTIO: