All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	Paul Durrant <paul@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 1/2] iommu/x86: introduce a generic IVMD/RMRR range validity helper
Date: Tue, 13 Feb 2024 09:11:04 +0100	[thread overview]
Message-ID: <ZcskGNrX7y3aFWes@macbook> (raw)
In-Reply-To: <ee4b4d25-e6db-4265-adc4-4080784495cf@suse.com>

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@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 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.


  reply	other threads:[~2024-02-13  8:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 15:34 [PATCH v2 0/2] iommu/x86: unify RMRR/IVMD range checks Roger Pau Monne
2024-02-07 15:34 ` [PATCH v2 1/2] iommu/x86: introduce a generic IVMD/RMRR range validity helper Roger Pau Monne
2024-02-12 14:34   ` Jan Beulich
2024-02-13  8:11     ` Roger Pau Monné [this message]
2024-02-07 15:34 ` [PATCH v2 2/2] iommu/vt-d: switch to common RMRR checker Roger Pau Monne
2024-02-12 14:38   ` Jan Beulich
2024-02-13 22:37     ` [regression] " Andrew Cooper
2024-02-14  7:45       ` Jan Beulich
2024-02-14  8:45         ` Roger Pau Monné
2024-02-14  9:00           ` Andrew Cooper
2024-02-14  9:24             ` Roger Pau Monné
2024-02-14  9:01           ` Jan Beulich
2024-02-14  9:15             ` Roger Pau Monné
2024-02-14 10:11           ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZcskGNrX7y3aFWes@macbook \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.