io_emul: reshuffle io emulation path

This is the following patch after removing pending_pre_work, it make sure
all io emulation is done on its own cpu.

For hv emulated request, it follows the steps:
	hv_emulate_pio->emulate_pio_complete
	hv_emulate_mmio->emulate_mmio_complete

For dm emulated request, it follows the steps:
	acrn_insert_request->dm_emulate_io_complete
while in acrn_insert_request, it could trigger scheduling out then resume by
hcall_notify_ioreq_finish, or busy wait for ioreq completion if polling mode
is enabled.

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-22 11:35:15 +08:00
committed by wenlingz
parent fb41ea5cfb
commit 15030f6f2c
6 changed files with 34 additions and 112 deletions

View File

@@ -17,10 +17,6 @@
* @{
*/
/* The return value of emulate_io() indicating the I/O request is delivered to
* VHM but not finished yet. */
#define IOREQ_PENDING 1
/**
* @brief Internal representation of a I/O request.
*/
@@ -177,7 +173,7 @@ struct mem_io_node {
*
* @pre vcpu != NULL && io_req != NULL
*/
int32_t acrn_insert_request_wait(struct acrn_vcpu *vcpu, const struct io_request *io_req);
int32_t acrn_insert_request(struct acrn_vcpu *vcpu, const struct io_request *io_req);
/**
* @brief Reset all IO requests status of the VM