> From: Peter Xu
> Sent: Tuesday, March 24, 2020 5:15 AM
> To: Liu, Yi L
> Subject: Re: [PATCH v1 06/22] hw/pci: introduce
> pci_device_set/unset_iommu_context()
>
> On Sun, Mar 22, 2020 at 05:36:03AM -0700, Liu Yi L wrote:
>
> [...]
>
> > +AddressS
On Sun, Mar 22, 2020 at 05:36:03AM -0700, Liu Yi L wrote:
[...]
> +AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
> +{
> +PCIBus *bus;
> +uint8_t devfn;
> +
> +pci_device_get_iommu_bus_devfn(dev, , );
> +if (bus && bus->iommu_ops &&
> +
This patch adds pci_device_set/unset_iommu_context() to set/unset
host_iommu_context for a given device. New callback is added in
PCIIOMMUOps. As such, vIOMMU could make use of host IOMMU capability.
e.g setup nested translation.
Cc: Kevin Tian
Cc: Jacob Pan
Cc: Peter Xu
Cc: Eric Auger
Cc: Yi