On Thu, Aug 04, 2022 at 04:25:38PM +0200, Jan Beulich wrote: > On 26.07.2022 05:23, Marek Marczykowski-Górecki wrote: > > --- a/xen/drivers/passthrough/iommu.c > > +++ b/xen/drivers/passthrough/iommu.c > > @@ -651,6 +651,51 @@ bool_t iommu_has_feature(struct domain *d, enum > > iommu_feature feature) > > return is_iommu_enabled(d) && test_bit(feature, > > dom_iommu(d)->features); > > } > > > > +#define MAX_EXTRA_RESERVED_RANGES 20 > > +struct extra_reserved_range { > > + unsigned long start; > > + unsigned long nr; > > + uint32_t sbdf; > > It's not easy to judge why this isn't pci_sbdf_t when no callers > exist at this point.
I'm following here types used in the rest of IOMMU code. Especially, this field is later passed to iommu_grdm_t func, which is: typedef int iommu_grdm_t(xen_pfn_t start, xen_ulong_t nr, u32 id, void *ctxt); ^^^^ I can probably use pci_sbdf_t here, but it will be cast to u32 later anyway... > > +}; > > +static unsigned int __initdata nr_extra_reserved_ranges; > > +static struct extra_reserved_range __initdata > > + extra_reserved_ranges[MAX_EXTRA_RESERVED_RANGES]; > > With __initdata here, ... > > > +int iommu_add_extra_reserved_device_memory(unsigned long start, > > + unsigned long nr, > > + uint32_t sbdf) > > ... this and the other function want to be __init. Ok. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
signature.asc
Description: PGP signature