acrn-hypervisor/hypervisor/dm/vpci
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
..
pci_pt.c hv: mmio: refine mmio access handle lock granularity 2020-02-24 16:17:38 +08:00
vdev.c vPCI: split passthrough PCI device from DM to HV 2020-02-24 16:17:38 +08:00
vhostbridge.c hv:remove some unnecessary includes 2019-10-15 14:40:39 +08:00
vmsi.c hv: vmsi: refine write_vmsi_cfg implementation 2019-12-05 16:43:22 +08:00
vmsix.c hv: vpci: restrict SOS access assigned PCI device 2020-02-24 16:17:38 +08:00
vpci.c hv: mmio: refine mmio access handle lock granularity 2020-02-24 16:17:38 +08:00
vpci_priv.h hv: vpci: an assign PT device should support FLR or PM reset 2019-12-30 13:43:07 +08:00