hv: PIO emulation handler is attached to I/O port number only

An I/O handler is not linked to the I/O access size, so in searching for
the registered I/O handler, don't need to check the I/O request's access
size.

In struct vm_io_handler_desc, change fields addr and len to port_start and
port_end respectively to adapt to this change.

Tracked-On: #1815
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Zide Chen
2018-11-09 14:06:01 -08:00
committed by lijinxia
parent 2c581751de
commit 8b4f395683
2 changed files with 21 additions and 30 deletions

View File

@@ -63,14 +63,14 @@ void (*io_write_fn_t)(struct acrn_vm *vm, uint16_t port, size_t size, uint32_t v
struct vm_io_handler_desc {
/**
* @brief The base address of the IO range for this description.
* @brief The base port number of the IO range for this description.
*/
uint16_t addr;
uint16_t port_start;
/**
* @brief The number of bytes covered by this description.
* @brief The last port number of the IO range for this description (non-inclusive).
*/
size_t len;
uint16_t port_end;
/**
* @brief A pointer to the "read" function.