mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
HV: Clean vpic and vioapic logic when lapic is pt
When the lapic is passthru, vpic and vioapic cannot be used anymore. In current code, user can still inject vpic interrupt to Guest OS, this is not allowed. This patch remove the vpic and vioapic initiate functions during creating VM with lapic passthru. But the APIs in vpic and vioapic are called in many places, for these APIs, follow the below principles: 1. For the APIs which will access uninitiated variables, and may case hypervisor hang, add @pre to make sure user should call them after vpic or vioapic is initiated. 2. For the APIs which only return some static value, do noting with them. 3. For the APIs which user will called to inject interrupt, such as vioapic_set_irqline_lock or vpic_set_irqline, add condition in these APIs to make sure it only inject interrupt when vpic or vioapic is initiated. This change is to make sure the vuart or hypercall need not to care whether lapic is passthru or the vpic and vioapic is initiated or not. Tracked-On: #3227 Signed-off-by: Conghui Chen <conghui.chen@intel.com>
This commit is contained in:
@@ -53,6 +53,7 @@ struct acrn_vioapic {
|
||||
struct acrn_vm *vm;
|
||||
spinlock_t mtx;
|
||||
uint32_t id;
|
||||
bool ready;
|
||||
uint32_t ioregsel;
|
||||
union ioapic_rte rtbl[REDIR_ENTRIES_HW];
|
||||
/* pin_state status bitmap: 1 - high, 0 - low */
|
||||
|
Reference in New Issue
Block a user