> From: Chen, Tiejun
> Sent: Friday, June 12, 2015 2:31 PM
>
> >> @@ -1899,7 +1900,8 @@ static int intel_iommu_add_device(u8 devfn, struct
> >> pci_dev
> >> *pdev)
> >> PCI_BUS(bdf) == pdev->bus &&
> >> PCI_DEVFN2(bdf) == devfn )
> >> {
> >> - ret = rmrr_identity_mapping(pdev->domain, 1, rmrr);
> >> + ret = rmrr_identity_mapping(pdev->domain, 1, rmrr,
> >> + XEN_DOMCTL_DEV_RDM_RELAXED);
> >
> > Why did you hardcode relax policy here? Shouldn't the policy come
> > from hypercall flag?
>
> I just saw we have one path to use intel_iommu_add_device(),
>
> pci_add_device()
> |
> + if ( !pdev->domain )
> {
> pdev->domain = hardware_domain;
> ret = iommu_add_device(pdev);
> |
> + hd->platform_ops->add_device()
> |
> + intel_iommu_add_device()
>
> So I think intel_iommu_add_device() is used to add a device to
> hardware_domain. And in our case hardware_domain should be special as I
> explained above.
Then please add a clear comment in such case.
Thanks
Kevin
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel