mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: mmio: add a lock to protect mmio_node access
After adding PCI BAR remap support, mmio_node may unregister when there's others access it. This patch add a lock to protect mmio_node access. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -123,8 +123,9 @@ struct acrn_vm {
|
||||
struct acrn_vuart vuart[MAX_VUART_NUM_PER_VM]; /* Virtual UART */
|
||||
enum vpic_wire_mode wire_mode;
|
||||
struct iommu_domain *iommu; /* iommu domain of this VM */
|
||||
spinlock_t vm_lock; /* Spin-lock used to protect VM modifications */
|
||||
spinlock_t vm_lock; /* Spin-lock used to protect vlapic_state modifications for a VM */
|
||||
|
||||
spinlock_t emul_mmio_lock; /* Used to protect emulation mmio_node concurrent access for a VM */
|
||||
uint16_t max_emul_mmio_regions; /* max index of the emulated mmio_region */
|
||||
struct mem_io_node emul_mmio[CONFIG_MAX_EMULATED_MMIO_REGIONS];
|
||||
|
||||
|
Reference in New Issue
Block a user