xen/arm: assign devices to boot domains
authorStefano Stabellini <sstabellini@kernel.org>
Thu, 3 Oct 2019 17:34:05 +0000 (10:34 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 4 Oct 2019 17:16:11 +0000 (10:16 -0700)
commit9ce974c47588351069dfe49bac94682689b1d492
tree65422344bcc3f543465b70fd493e92129e03e2c0
parent669ecdf8d6cd3eec09fd7b78b0f25fb929a6f2fa
xen/arm: assign devices to boot domains

Scan the user provided dtb fragment at boot. For each device node, map
memory to guests, and route interrupts and setup the iommu.

The memory region to remap is specified by the "xen,reg" property.

The iommu is setup by passing the node of the device to assign on the
host device tree. The path is specified in the device tree fragment as
the "xen,path" string property.

The interrupts are remapped based on the information from the
corresponding node on the host device tree. Call
handle_device_interrupts to remap interrupts. Interrupts related device
tree properties are copied from the device tree fragment, same as all
the other properties.

Require both xen,reg and xen,path to be present, unless
xen,force-assign-without-iommu is also set. In that case, tolerate a
missing xen,path, also tolerate iommu setup failure for the passthrough
device.

Also set add the new flag XEN_DOMCTL_CDF_iommu so that dom0less domU
can use the IOMMU if a partial dtb is specified.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain_build.c