All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <jbeulich@suse.com>
Cc: Petre Pircalabu <ppircalabu@bitdefender.com>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	KonradRzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim \(Xen.org\)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Tamas K Lengyel <tamas@tklengyel.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Alexandru Isaila <aisaila@bitdefender.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v6 08/10] remove late (on-demand) construction of IOMMU page tables
Date: Thu, 29 Aug 2019 13:44:59 +0000	[thread overview]
Message-ID: <6bc83685a50f44e2b7759dfbfc9c155d@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <7ac91f71-eac4-bf13-ff01-09fe4d9b7376@suse.com>

> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: 29 August 2019 14:39
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Julien Grall <julien.grall@arm.com>; Alexandru Isaila
> <aisaila@bitdefender.com>; Petre Pircalabu <ppircalabu@bitdefender.com>; Razvan Cojocaru
> <rcojocaru@bitdefender.com>; Andrew Cooper <Andrew.Cooper3@citrix.com>; Roger Pau Monne
> <roger.pau@citrix.com>; Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>; George Dunlap
> <George.Dunlap@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>; Stefano Stabellini
> <sstabellini@kernel.org>; KonradRzeszutek Wilk <konrad.wilk@oracle.com>; Tamas K Lengyel
> <tamas@tklengyel.com>; Tim (Xen.org) <tim@xen.org>; Wei Liu <wl@xen.org>
> Subject: Re: [PATCH v6 08/10] remove late (on-demand) construction of IOMMU page tables
> 
> On 16.08.2019 19:19, Paul Durrant wrote:
> > --- a/xen/drivers/passthrough/iommu.c
> > +++ b/xen/drivers/passthrough/iommu.c
> > @@ -146,6 +146,17 @@ static int __init parse_dom0_iommu_param(const char *s)
> >  }
> >  custom_param("dom0-iommu", parse_dom0_iommu_param);
> >
> > +static void __hwdom_init check_hwdom_reqs(struct domain *d)
> 
> This really should have const, but I realize ...
> 
> > +{
> > +    if ( iommu_hwdom_none || !paging_mode_translate(d) )
> > +        return;
> > +
> > +    arch_iommu_check_autotranslated_hwdom(d);
> 
> ... this one wants non-const (for - afaict - no reason).
> 
> > @@ -159,129 +170,44 @@ int iommu_domain_init(struct domain *d)
> >          return ret;
> >
> >      hd->platform_ops = iommu_get_ops();
> > -    return hd->platform_ops->init(d);
> > -}
> > +    ret = hd->platform_ops->init(d);
> > +    if ( ret )
> > +        return ret;
> >
> > -static void __hwdom_init check_hwdom_reqs(struct domain *d)
> > -{
> > -    if ( iommu_hwdom_none || !paging_mode_translate(d) )
> > -        return;
> > +    /*
> > +     * NB: 'relaxed' h/w domains don't need the IOMMU mappings to be kept
> > +     *     in-sync with their assigned pages because all host RAM will be
> > +     *     mapped during hwdom_init().
> > +     */
> 
> Doesn't this comment belong to ...
> 
> > +    if ( is_hardware_domain(d) )
> > +        check_hwdom_reqs(d); /* may modify iommu_hwdom_strict */
> >
> > -    arch_iommu_check_autotranslated_hwdom(d);
> > +    if ( !is_hardware_domain(d) || iommu_hwdom_strict )
> > +        hd->need_sync = !iommu_use_hap_pt(d);
> 
> ... this if()?

Yes, it's probably adrift from where it should be now.

> 
> > @@ -629,8 +552,7 @@ static void iommu_dump_p2m_table(unsigned char key)
> >      ops = iommu_get_ops();
> >      for_each_domain(d)
> >      {
> > -        if ( is_hardware_domain(d) ||
> > -             dom_iommu(d)->status < IOMMU_STATUS_initialized )
> > +        if ( !is_iommu_enabled(d) )
> >              continue;
> 
> Didn't you agree to retain the hwdom part of the condition here?
> 

Indeed I have as of today, but this was posted 2 weeks ago :-)

  Paul

> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-08-29 13:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 17:19 [Xen-devel] [PATCH v6 00/10] use stashed domain create flags Paul Durrant
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 01/10] make passthrough/pci.c:deassign_device() static Paul Durrant
2019-08-23  9:51   ` Roger Pau Monné
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 02/10] x86/hvm/domain: remove the 'hap_enabled' flag Paul Durrant
2019-08-23 10:05   ` Roger Pau Monné
2019-08-23 12:23   ` Andrew Cooper
2019-08-23 12:25     ` Andrew Cooper
2019-08-27  8:19       ` Paul Durrant
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 03/10] x86/domain: remove the 'oos_off' flag Paul Durrant
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 04/10] domain: remove the 'is_xenstore' flag Paul Durrant
2019-08-19 20:44   ` Daniel De Graaf
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 05/10] x86/domain: remove the 's3_integrity' flag Paul Durrant
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 06/10] domain: introduce XEN_DOMCTL_CDF_iommu flag Paul Durrant
2019-08-23 10:32   ` Roger Pau Monné
2019-08-29  9:00     ` Paul Durrant
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 07/10] use is_iommu_enabled() where appropriate Paul Durrant
2019-08-19 20:55   ` Daniel De Graaf
2019-08-23  3:04   ` Tian, Kevin
2019-08-23 10:55   ` Roger Pau Monné
2019-08-29  9:17     ` Paul Durrant
2019-08-29 13:29   ` Jan Beulich
2019-08-16 17:19 ` [Xen-devel] [PATCH v6 08/10] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-08-16 17:24   ` Razvan Cojocaru
2019-08-23 11:34   ` Roger Pau Monné
2019-08-29  9:23     ` Paul Durrant
2019-08-29 13:39   ` Jan Beulich
2019-08-29 13:44     ` Paul Durrant [this message]
2019-08-16 17:20 ` [Xen-devel] [PATCH v6 09/10] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-08-23 11:39   ` Roger Pau Monné
2019-08-29 13:50   ` Jan Beulich
2019-08-16 17:20 ` [Xen-devel] [PATCH v6 10/10] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-08-23 14:16   ` Roger Pau Monné
2019-08-29 15:25     ` Paul Durrant
2019-08-29 14:07   ` Jan Beulich
2019-08-29 15:27     ` Paul Durrant

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=6bc83685a50f44e2b7759dfbfc9c155d@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=aisaila@bitdefender.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=ppircalabu@bitdefender.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=tim@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.