xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>
Cc: 'Stefano Stabellini' <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.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>,
	'xen-devel' <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make page table population preemptible"...
Date: Thu, 2 Aug 2018 08:04:49 +0000	[thread overview]
Message-ID: <3d83229e473b4430969e1dbde9ef7125@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <74e395deae9549c3a05fccb1241c35ae@AMSPEX02CL03.citrite.net>

> -----Original Message-----
> From: Paul Durrant
> Sent: 02 August 2018 09:03
> To: 'Jan Beulich' <JBeulich@suse.com>
> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; Wei Liu <wei.liu2@citrix.com>; George
> Dunlap <George.Dunlap@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>;
> Stefano Stabellini <sstabellini@kernel.org>; xen-devel <xen-
> devel@lists.xenproject.org>; Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com>; Tim (Xen.org) <tim@xen.org>
> Subject: RE: [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make
> page table population preemptible"...
> 
> > -----Original Message-----
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: 02 August 2018 08:20
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
> > <Andrew.Cooper3@citrix.com>; Wei Liu <wei.liu2@citrix.com>; George
> > Dunlap <George.Dunlap@citrix.com>; Ian Jackson
> <Ian.Jackson@citrix.com>;
> > Stefano Stabellini <sstabellini@kernel.org>; xen-devel <xen-
> > devel@lists.xenproject.org>; Konrad Rzeszutek Wilk
> > <konrad.wilk@oracle.com>; Tim (Xen.org) <tim@xen.org>
> > Subject: Re: [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make
> > page table population preemptible"...
> >
> > >>> On 01.08.18 at 15:40, <paul.durrant@citrix.com> wrote:
> > > ...to simplify the implementation and turn need_iommu back into a
> > boolean.
> > >
> > > As noted in [1] the tri-state nature of need_iommu after commit
> 3e06b989
> > is
> > > confusing, as is the implementation of pre-emption using relmem_list.
> > >
> > > This patch instead uses a simple count of pages already populated stored
> in
> > > the x86 variant of struct arch_iommu and skips over that number of
> pages
> > > if arch_iommu_populate_page_table() is re-invoked after pre-emption.
> >
> > Well, yes, I would have used that model in said commit if it was reliable,
> > but it isn't: What if the list of pages changed between two (re-)invocations?
> 
> Is that really going to happen? This is the result of a domctl, which is a tools-
> only hypercall right?

Oh, I see what you mean... the guest could do something like a decrease_reservation... I was overlooking that setting up the iommu is happening while the guest is live. Would it be reasonable to domain_pause() for safety then?

  Paul

> 
> > Furthermore, with huge enough a guest even the skipping of the already
> > processed several million pages may exhaust the time acceptable between
> > preemption points.
> 
> Ok, I'll keep a pointer into the page list instead.
> 
>   Paul
> 
> >
> > Jan
> >


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

  reply	other threads:[~2018-08-02  8:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 13:40 [PATCH v4 00/15] paravirtual IOMMU interface Paul Durrant
2018-08-01 13:40 ` [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make page table population preemptible" Paul Durrant
2018-08-01 16:15   ` Roger Pau Monné
2018-08-02 10:26     ` Paul Durrant
2018-08-02  7:19   ` Jan Beulich
2018-08-02  8:02     ` Paul Durrant
2018-08-02  8:04       ` Paul Durrant [this message]
2018-08-02  8:18         ` Jan Beulich
2018-08-02  8:49           ` Paul Durrant
2018-08-02 10:01             ` Jan Beulich
2018-08-01 13:40 ` [PATCH v4 02/15] iommu: introduce the concept of BFN Paul Durrant
2018-08-01 13:40 ` [PATCH v4 03/15] iommu: make use of type-safe BFN and MFN in exported functions Paul Durrant
2018-08-01 13:40 ` [PATCH v4 04/15] iommu: push use of type-safe BFN and MFN into iommu_ops Paul Durrant
2018-08-01 13:40 ` [PATCH v4 05/15] iommu: don't domain_crash() inside iommu_map/unmap_page() Paul Durrant
2018-08-01 13:40 ` [PATCH v4 06/15] public / x86: introduce __HYPERCALL_iommu_op Paul Durrant
2018-08-01 13:40 ` [PATCH v4 07/15] iommu: track reserved ranges using a rangeset Paul Durrant
2018-08-01 13:40 ` [PATCH v4 08/15] x86: add iommu_op to query reserved ranges Paul Durrant
2018-08-01 13:40 ` [PATCH v4 09/15] vtd: add lookup_page method to iommu_ops Paul Durrant
2018-08-01 13:40 ` [PATCH v4 10/15] mm / iommu: include need_iommu() test in iommu_use_hap_pt() Paul Durrant
2018-08-01 13:40 ` [PATCH v4 11/15] mm / iommu: split need_iommu() into has_iommu_pt() and sync_iommu_pt() Paul Durrant
2018-08-01 13:40 ` [PATCH v4 12/15] x86: add iommu_op to enable modification of IOMMU mappings Paul Durrant
2018-08-01 13:40 ` [PATCH v4 13/15] memory: add get_paged_gfn() as a wrapper Paul Durrant
2018-08-01 13:40 ` [PATCH v4 14/15] x86: add iommu_ops to modify and flush IOMMU mappings Paul Durrant
2018-08-01 13:40 ` [PATCH v4 15/15] x86: extend the map and unmap iommu_ops to support grant references 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=3d83229e473b4430969e1dbde9ef7125@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).