[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 08/10] remove late (on-demand) construction of IOMMU page tables
On 16.08.2019 19:19, Paul Durrant wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -146,6 +146,17 @@ static int __init parse_dom0_iommu_param(const char *s) > } > custom_param("dom0-iommu", parse_dom0_iommu_param); > > +static void __hwdom_init check_hwdom_reqs(struct domain *d) This really should have const, but I realize ... > +{ > + if ( iommu_hwdom_none || !paging_mode_translate(d) ) > + return; > + > + arch_iommu_check_autotranslated_hwdom(d); ... this one wants non-const (for - afaict - no reason). > @@ -159,129 +170,44 @@ int iommu_domain_init(struct domain *d) > return ret; > > hd->platform_ops = iommu_get_ops(); > - return hd->platform_ops->init(d); > -} > + ret = hd->platform_ops->init(d); > + if ( ret ) > + return ret; > > -static void __hwdom_init check_hwdom_reqs(struct domain *d) > -{ > - if ( iommu_hwdom_none || !paging_mode_translate(d) ) > - return; > + /* > + * NB: 'relaxed' h/w domains don't need the IOMMU mappings to be kept > + * in-sync with their assigned pages because all host RAM will be > + * mapped during hwdom_init(). > + */ Doesn't this comment belong to ... > + if ( is_hardware_domain(d) ) > + check_hwdom_reqs(d); /* may modify iommu_hwdom_strict */ > > - arch_iommu_check_autotranslated_hwdom(d); > + if ( !is_hardware_domain(d) || iommu_hwdom_strict ) > + hd->need_sync = !iommu_use_hap_pt(d); ... this if()? > @@ -629,8 +552,7 @@ static void iommu_dump_p2m_table(unsigned char key) > ops = iommu_get_ops(); > for_each_domain(d) > { > - if ( is_hardware_domain(d) || > - dom_iommu(d)->status < IOMMU_STATUS_initialized ) > + if ( !is_iommu_enabled(d) ) > continue; Didn't you agree to retain the hwdom part of the condition here? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |