mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: io: add post-work for PCICFG and WP requests
Currently no post-work is done for I/O requests of type PCICFG or WP. The impacts include: 1. ''valid'' in VHM request buffers are left as 1 even after the I/O request completes. This violates the pre-condition of acrn_insert_request_wait() but does not cause failures since a new I/O request can never happen before the previous one completes. 2. Values read from PCI configuration spaces are never passed to UOS. This patch adds the post-work for these two kinds of I/O requests. The post-work for port I/O is invoked for PCICFG since it is essentially a port I/O and the request structure is compatible. No post-work is needed for WP as it is only triggered for EPT violations on writes, while post-work is mainly for reads. v2 -> v3: * Consistently use 0/1 (not false/true) for the ''valid'' member. * Add comments to suggest when the hypervisor can see REQ_PCICFG and why dm_emulate_pio_post also works in such cases. * Rename: mark_ioreq_done -> complete_ioreq * Rename: complete_request -> emulate_io_post * Rename: hcall_notify_req_finish -> hcall_notify_ioreq_finish Signed-off-by: Junjie Mao <junjie.mao@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -103,7 +103,7 @@ int vmcall_vmexit_handler(struct vcpu *vcpu)
|
||||
case HC_NOTIFY_REQUEST_FINISH:
|
||||
/* param1: vmid
|
||||
* param2: vcpu_id */
|
||||
ret = hcall_notify_req_finish((uint16_t)param1,
|
||||
ret = hcall_notify_ioreq_finish((uint16_t)param1,
|
||||
(uint16_t)param2);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user