VT-d: don't pass bridge devices to domain_context_mapping_one()
authorJan Beulich <jbeulich@suse.com>
Wed, 22 Jan 2020 15:39:58 +0000 (16:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 22 Jan 2020 15:39:58 +0000 (16:39 +0100)
commita4d457fd59f4ebfb524aec82cb6a3030087914ca
tree2818600ef9f94b5fc60e7ca203b85a8b184fe2be
parent5500d265a2a8fa63d60c08beb549de8ec82ff7a5
VT-d: don't pass bridge devices to domain_context_mapping_one()

When passed a non-NULL pdev, the function does an owner check when it
finds an already existing context mapping. Bridges, however, don't get
passed through to guests, and hence their owner is always going to be
Dom0, leading to the assigment of all but one of the function of multi-
function PCI devices behind bridges to fail.

Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c