acrn-hypervisor/hypervisor/include
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
..
arch/x86 hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00
common hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00
debug hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
dm hv: mmio: refine mmio access handle lock granularity 2020-02-24 16:17:38 +08:00
hw hv: vPCI: add assign/deassign PCI device HC APIs 2020-02-24 16:17:38 +08:00
lib hv: support xsave in context switch 2019-12-02 09:31:12 +08:00
public hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00