Created attachment 330942 [details] avoid redundant context mapping Description of patch: In case DEV_TYPE_PCI in domain_context_mapping(), redundant context mapping may occur for some devices. For example, the NIC is 03:00.0, and its parent bridge is: 00:1e.0. After domain_context_mapping_one() 03:00.0 and 00:1e.0, the 'secbus' is 3 and 'bus' is 0, so will domain_context_mapping_one() 03:00.0 again -- this redundant invocation returns -EINVAL because we have created the mapping but haven't changed pdev->domain from Dom0 to a new domain at this time and eventually the XEN_DOMCTL_assign_device hypercall returns a failure. This patch detects this case and avoids the redundant invocation. Upstream Status: Accepted (CS 18964)
Process error, don't need a separate BZ per patch