hv: refine IOREQ state operation functions in hypervisor

1) add functions to set/get VHM request state.
2) modify 'complete_ioreq()' in io.c
3) update the caller code

Tracked-On: #2056
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yonghua Huang
2018-12-13 02:01:50 +08:00
committed by wenlingz
parent c89d6e6526
commit 57dfc7de05
4 changed files with 85 additions and 58 deletions

View File

@@ -305,6 +305,26 @@ void reset_vm_ioreqs(struct acrn_vm *vm);
*/
void handle_complete_ioreq(uint16_t pcpu_id);
/**
* @brief Get the state of VHM request
*
* @param vm Target VM context
* @param vhm_req_id VHM Request ID
*
* @return State of the IO Request.
*/
uint32_t get_vhm_req_state(struct acrn_vm *vm, uint16_t vhm_req_id);
/**
* @brief Set the state of VHM request
*
* @param vm Target VM context
* @param vhm_req_id VHM Request ID
* @param state State to be set
* @return None
*/
void set_vhm_req_state(struct acrn_vm *vm, uint16_t vhm_req_id, uint32_t state);
/**
* @}
*/