mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 17:21:22 +00:00
ACRN-DM has reserved gvt bar regions. This patch ensures other pci devices' bar regions won't overlap with reserved bar regions. v6 -> v7: * rename some struct and func v5 -> v6: * remove outdated comment * add comments for code reading * code cleaning about gvt bar0 and bar2 size v4 -> v5: * rename adjust_bar_region and adjust_bar_region_by_gvt_bars * change adjust_bar_region_by_gvt_bars interface for code cleaning v3 -> v4: * add static struct gvt_region instead of definition or pointer array. v2 -> v3: * repalce pci_emul_alloc_bar with gvt_reserve_resource when allocate gvt bars * use register_bar to detect if gvt bars confilts with pci devices v1 -> v2: * don't limit the gvt bar type is MEM32 when deal with pci bar * add is_two_region_overlap func to detect if two regions overlap * add region array to store gvt bar0 and bar2 regions Tracked-On: projectacrn#4005 Signed-off-by: Junming Liu <junming.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Liu XinYun <xinyun.liu@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>