All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Cooper, Andrew" <andrew.cooper3@citrix.com>,
	Paul Durrant <paul@xen.org>
Subject: RE: [PATCH 15/17] IOMMU: page table dumping adjustments
Date: Thu, 16 Sep 2021 07:33:57 +0000	[thread overview]
Message-ID: <BN9PR11MB5433F917721197AE7109C3798CDC9@BN9PR11MB5433.namprd11.prod.outlook.com> (raw)
In-Reply-To: <666ce0fd-5bc1-f12c-4a13-93bf441a4ce4@suse.com>

> From: Jan Beulich <jbeulich@suse.com>
> Sent: Tuesday, August 24, 2021 10:29 PM
> 
> On 24.08.2021 16:26, Jan Beulich wrote:
> > For one none of the three IOMMU implementations on Arm specify a
> dumping
> > hook. Generalize VT-d's "don't dump shared page tables" to cover for
> > this.
> >
> > Further in the past I was told that on Arm in principle there could be
> > multiple different IOMMUs, and hence different domains' platform_ops
> > pointers could differ. Use each domain's ops for calling the dump hook.
> > (In the long run all uses of iommu_get_ops() would likely need to
> > disappear for this reason.)
> >
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Should have Cc-ed Kevin on this one as well; now added.
> 
> Jan

Reviewed-by: Kevin Tian <kevin.tian@intel.com>

> 
> > --- a/xen/drivers/passthrough/iommu.c
> > +++ b/xen/drivers/passthrough/iommu.c
> > @@ -640,12 +640,9 @@ bool_t iommu_has_feature(struct domain *
> >  static void iommu_dump_page_tables(unsigned char key)
> >  {
> >      struct domain *d;
> > -    const struct iommu_ops *ops;
> >
> >      ASSERT(iommu_enabled);
> >
> > -    ops = iommu_get_ops();
> > -
> >      rcu_read_lock(&domlist_read_lock);
> >
> >      for_each_domain(d)
> > @@ -653,7 +650,13 @@ static void iommu_dump_page_tables(unsig
> >          if ( is_hardware_domain(d) || !is_iommu_enabled(d) )
> >              continue;
> >
> > -        ops->dump_page_tables(d);
> > +        if ( iommu_use_hap_pt(d) )
> > +        {
> > +            printk("%pd sharing page tables\n", d);
> > +            continue;
> > +        }
> > +
> > +        dom_iommu(d)->platform_ops->dump_page_tables(d);
> >      }
> >
> >      rcu_read_unlock(&domlist_read_lock);
> > --- a/xen/drivers/passthrough/vtd/iommu.c
> > +++ b/xen/drivers/passthrough/vtd/iommu.c
> > @@ -2835,12 +2835,6 @@ static void vtd_dump_page_tables(struct
> >  {
> >      const struct domain_iommu *hd = dom_iommu(d);
> >
> > -    if ( iommu_use_hap_pt(d) )
> > -    {
> > -        printk(VTDPREFIX " %pd sharing EPT table\n", d);
> > -        return;
> > -    }
> > -
> >      printk(VTDPREFIX" %pd table has %d levels\n", d,
> >             agaw_to_level(hd->arch.vtd.agaw));
> >      vtd_dump_page_table_level(hd->arch.vtd.pgd_maddr,
> >
> >


  reply	other threads:[~2021-09-16  7:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 14:13 [PATCH 00/17] IOMMU: superpage support when not sharing pagetables Jan Beulich
2021-08-24 14:15 ` [PATCH 01/17] AMD/IOMMU: avoid recording each level's MFN when walking page table Jan Beulich
2021-08-25 13:29   ` Andrew Cooper
2021-08-24 14:15 ` [PATCH 02/17] AMD/IOMMU: have callers specify the target level for page table walks Jan Beulich
2021-08-24 14:16 ` [PATCH 03/17] VT-d: " Jan Beulich
2021-08-24 14:17 ` [PATCH 04/17] IOMMU: have vendor code announce supported page sizes Jan Beulich
2021-09-16  7:38   ` Tian, Kevin
2021-08-24 14:18 ` [PATCH 05/17] IOMMU: add order parameter to ->{,un}map_page() hooks Jan Beulich
2021-09-16  7:41   ` Tian, Kevin
2021-08-24 14:19 ` [PATCH 06/17] IOMMU: have iommu_{,un}map() split requests into largest possible chunks Jan Beulich
2021-08-24 14:21 ` [PATCH 07/17] IOMMU/x86: restrict IO-APIC mappings for PV Dom0 Jan Beulich
2021-08-26 11:57   ` Andrew Cooper
2021-08-26 12:55     ` Jan Beulich
2021-09-07 17:13       ` Andrew Cooper
2021-09-08  9:44         ` Jan Beulich
2021-08-24 14:21 ` [PATCH 08/17] IOMMU/x86: perform PV Dom0 mappings in batches Jan Beulich
2021-08-24 14:22 ` [PATCH 09/17] IOMMU/x86: support freeing of pagetables Jan Beulich
2021-08-24 14:22 ` [PATCH 10/17] AMD/IOMMU: drop stray TLB flush Jan Beulich
2021-08-24 14:23 ` [PATCH 11/17] AMD/IOMMU: walk trees upon page fault Jan Beulich
2021-08-24 14:24 ` [PATCH 12/17] AMD/IOMMU: return old PTE from {set,clear}_iommu_pte_present() Jan Beulich
2021-08-24 14:25 ` [PATCH 13/17] AMD/IOMMU: allow use of superpage mappings Jan Beulich
2021-08-24 14:25 ` [PATCH 14/17] VT-d: " Jan Beulich
2021-08-24 14:26 ` [PATCH 15/17] IOMMU: page table dumping adjustments Jan Beulich
2021-08-24 14:28   ` Jan Beulich
2021-09-16  7:33     ` Tian, Kevin [this message]
2021-08-24 14:27 ` [PATCH 16/17] VT-d: show permissions during page table walks Jan Beulich
2021-09-16  7:36   ` Tian, Kevin
2021-08-24 14:27 ` [PATCH 17/17] IOMMU/x86: drop pointless NULL checks Jan Beulich
2021-08-26 12:05   ` Andrew Cooper
2021-08-26 12:36     ` Jan Beulich
2021-09-15 12:42   ` Ping: " Jan Beulich
2021-09-16  7:47     ` Tian, Kevin
2021-09-16  8:24       ` Jan Beulich
2021-09-16  7:29   ` Tian, Kevin
2021-08-25 12:06 ` [PATCH 00/17] IOMMU: superpage support when not sharing pagetables Jan Beulich

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=BN9PR11MB5433F917721197AE7109C3798CDC9@BN9PR11MB5433.namprd11.prod.outlook.com \
    --to=kevin.tian@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=paul@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.