mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
hv: add default handlers for PIO/MMIO access
Add the default handlers for PIO and MMIO access which returns all FFs on read and discards write. These default handlers are registered when SOS VM or pre-launched VM is created. v3 -> v4: - use single layer if in hv_emulate_pio - change the implementation of pio_default_read v2 -> v3: - use runtime vm type instead of CONFIG_PARTITION_MODE - revise the pio/mmio emulation functions - revise the pio/mmio default read functions according to MISRA C - revise the commit message v1 -> v2: - add default handlers members in struct acrn_vm and add interfaces to register default handlers for PIO and MMIO. Tracked-On: #2860 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -84,4 +84,17 @@ int32_t register_mmio_emulation_handler(struct acrn_vm *vm,
|
||||
hv_mem_io_handler_t read_write, uint64_t start,
|
||||
uint64_t end, void *handler_private_data);
|
||||
|
||||
/**
|
||||
* @brief Register port I/O default handler
|
||||
*
|
||||
* @param vm The VM to which the port I/O handlers are registered
|
||||
*/
|
||||
void register_pio_default_emulation_handler(struct acrn_vm *vm);
|
||||
|
||||
/**
|
||||
* @brief Register MMIO default handler
|
||||
*
|
||||
* @param vm The VM to which the MMIO handler is registered
|
||||
*/
|
||||
void register_mmio_default_emulation_handler(struct acrn_vm *vm);
|
||||
#endif /* IO_EMUL_H */
|
||||
|
||||
Reference in New Issue
Block a user