[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 18/21] xen/arm: p2m: Clean cache PT when the IOMMU doesn't support coherent walk
>>> On 22.04.14 at 15:14, <julien.grall@xxxxxxxxxx> wrote: > +bool_t iommu_has_feature(struct domain *d, uint32_t feature) > +{ > + const struct iommu_ops *ops = domain_hvm_iommu(d)->platform_ops; > + uint32_t features = 0; > + > + if ( iommu_enabled && ops && ops->features ) > + features = ops->features(d); > + > + return !!(features & feature); > +} That's slightly strange a feature check: Passing in a bit mask allows the caller to set more than one bit, with obvious ambiguity in what this would mean. I'd suggest making this a bit position (with individual bits defined via enumeration), at once hiding from the generic caller whether eventually there might be more than 32 features defined. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |