[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/4] xen: make logdirty and iommu mutually exclusive
>>> On 23.04.14 at 10:16, <roger.pau@xxxxxxxxxx> wrote: > --- a/xen/arch/x86/mm/hap/hap.c > +++ b/xen/arch/x86/mm/hap/hap.c > @@ -175,6 +175,15 @@ out: > */ > static int hap_enable_log_dirty(struct domain *d, bool_t log_global) > { > + > + if ( iommu_enabled && need_iommu(d) && log_global ) need_iommu() implies iommu_enabled, and hence checking only the former ought to be sufficient. Also, why do you do this here and in shadow code rather than in paging_log_dirty_enable()? > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -292,7 +292,8 @@ static int assign_device(struct domain *d, u16 seg, u8 > bus, u8 devfn) > * enabled for this domain */ > if ( unlikely(!need_iommu(d) && > (d->arch.hvm_domain.mem_sharing_enabled || > - d->mem_event->paging.ring_page)) ) > + d->mem_event->paging.ring_page || > + paging_mode_log_dirty(d))) ) I'm afraid that would return true also for non-global log dirty mode. This patch series http://lists.xenproject.org/archives/html/xen-devel/2014-04/msg02750.html (patch 1) introduces a way to know whether global mode is enabled - maybe you should base your series on top of that one? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |