mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 17:46:15 +00:00
hv:Replace dynamic memory with static for port io
-- Add emulated port io index
-- Add emulated pio array in vm structure
-- Remove port list in vm structure
-- Remove free_io_emulation_resource/register_io_handler/
create_io_handler APIs
v2-->v3:
-- not add 'is_emulated', check len == 0U
-- Check if io_read/io_write handler is NULL before calling
-- Replace ENUM with MACRO for emulated pio index to avoid
MISRA-C violations
v1-->v2:
-- Remove EMUL_PIO_NUM in Kconfig, add emulated pio index
for PIC/PCI/UART/RTC/PM
Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -103,15 +103,7 @@ struct vm_arch {
|
||||
void *tmp_pg_array; /* Page array for tmp guest paging struct */
|
||||
struct acrn_vioapic vioapic; /* Virtual IOAPIC base address */
|
||||
struct acrn_vpic vpic; /* Virtual PIC */
|
||||
/**
|
||||
* A link to the IO handler of this VM.
|
||||
* We only register io handle to this link
|
||||
* when create VM on sequences and ungister it when
|
||||
* destory VM. So there no need lock to prevent preempt.
|
||||
* Besides, there only a few io handlers now, we don't
|
||||
* need binary search temporary.
|
||||
*/
|
||||
struct vm_io_handler *io_handler;
|
||||
struct vm_io_handler_desc emul_pio[EMUL_PIO_IDX_MAX];
|
||||
|
||||
/* reference to virtual platform to come here (as needed) */
|
||||
} __aligned(CPU_PAGE_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user