[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/6] VT-d: No need to set irq affinity for posted format IRTE
>>> On 31.08.16 at 05:56, <feng.wu@xxxxxxxxx> wrote: > We don't set the affinity for posted format IRTE, since the > destination of these interrupts is vCPU and the vCPU affinity > is set during vCPU scheduling. So is this based on the assumption that after initial setup the function would only ever get called for affinity changes? I'm not even sure this is the case today, but I don't think we should build in such a dependency. Assuming that the main motivation is to avoid ... > @@ -637,9 +640,12 @@ static int msi_msg_to_remap_entry( > remap_rte->address_hi = 0; > remap_rte->data = index - i; > > - memcpy(iremap_entry, &new_ire, sizeof(struct iremap_entry)); > - iommu_flush_cache_entry(iremap_entry, sizeof(struct iremap_entry)); > - iommu_flush_iec_index(iommu, 0, index); > + if ( !iremap_entry->remap.p || !iremap_entry->remap.im ) > + { > + memcpy(iremap_entry, &new_ire, sizeof(struct iremap_entry)); > + iommu_flush_cache_entry(iremap_entry, sizeof(struct iremap_entry)); > + iommu_flush_iec_index(iommu, 0, index); > + } ... the actual updating here, may I suggest that you keep the construction of new_ire and modify the if() here to check whether nothing except affinity related bits changed? That would also take care of certain (older) compiler versions likely warning about new_ire potentially being used uninitialized. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |