[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] iommu/x86: introduce a generic IVMD/RMRR range validity helper



On Mon, Feb 12, 2024 at 03:34:59PM +0100, Jan Beulich wrote:
> On 07.02.2024 16:34, Roger Pau Monne wrote:
> > IVMD and RMRR ranges are functionally equivalent, and as so could use the 
> > same
> > validity checker.
> > 
> > Move the IVMD to x86 common IOMMU code and adjust the function to take a 
> > pair
> > of [start, end] mfn parameters.
> > 
> > So far only the AMD-Vi side is adjusted to use the newly introduced helper, 
> > the
> > VT-d side will be adjusted in a further change.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> with one minor remark:
> 
> > --- a/xen/drivers/passthrough/x86/iommu.c
> > +++ b/xen/drivers/passthrough/x86/iommu.c
> > @@ -792,6 +792,52 @@ static int __init cf_check adjust_irq_affinities(void)
> >  }
> >  __initcall(adjust_irq_affinities);
> >  
> > +bool __init iommu_unity_region_ok(const char *prefix, mfn_t start, mfn_t 
> > end)
> > +{
> > +    mfn_t addr;
> > +
> > +    if ( e820_all_mapped(mfn_to_maddr(start), mfn_to_maddr(end) + 
> > PAGE_SIZE,
> > +                         E820_RESERVED) )
> > +        return true;
> > +
> > +    printk(XENLOG_WARNING "%s: [%#" PRI_mfn " ,%#" PRI_mfn
> > +           "] is not (entirely) in reserved memory\n",
> 
> Would you mind if I re-flowed this to
> 
>     printk(XENLOG_WARNING
>            "%s: [%#" PRI_mfn " ,%#" PRI_mfn "] is not (entirely) in reserved 
> memory\n",
> 
> while committing?

Sure.  FWIW, when the line contains format specifiers I take that as a
point where splitting might be acceptable, since it already prevents
proper grepping.  Will try to remember to attempt to not split the
line.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.