acrn-hypervisor/hypervisor/include/dm
Li Fei1 4adad73cfc hv: mmio: refine mmio access handle lock granularity
Now only PCI MSI-X BAR access need dynamic register/unregister. Others don't need
unregister once it's registered. So we don't need to lock the vm level emul_mmio_lock
when we handle the MMIO access. Instead, we could use finer granularity lock in the
handler to ptotest the shared resource.

This patch fixed the dead lock issue when OVMF try to size the BAR size:
Becasue OVMF use ECAM to access the PCI configuration space, it will first hold vm
emul_mmio_lock, then calls vpci_handle_mmconfig_access. While this tries to size a
BAR which is also a MSI-X Table BAR, it will call register_mmio_emulation_handler to
register the MSI-X Table BAR MMIO access handler. This will causes the emul_mmio_lock
dead lock.

Tracked-On: #3475
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-02-24 16:17:38 +08:00
..
io_req.h hv: mmio: refine mmio access handle lock granularity 2020-02-24 16:17:38 +08:00
vacpi.h HV: rename CONFIG_MAX_PCPU_NUM to MAX_PCPU_NUM 2019-12-12 13:49:28 +08:00
vioapic.h HV: Clean vpic and vioapic logic when lapic is pt 2019-06-12 14:29:50 +08:00
vpci.h hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00
vpic.h HV:Modularize vpic code to remove usage of acrn_vm 2019-06-13 09:54:52 +08:00
vuart.h hv: rename vuart operations 2019-11-08 09:01:01 +08:00