xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <George.Dunlap@eu.citrix.com>
To: "Xu, Quan" <quan.xu@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Feng Wu <feng.wu@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v8 02/11] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping
Date: Mon, 13 Jun 2016 17:36:57 +0100	[thread overview]
Message-ID: <CAFLBxZb9u_Q_GbfSazPDTRMTGmYDGX0VUKNiqs7PqnhJBiYzeg@mail.gmail.com> (raw)
In-Reply-To: <1465831038-43005-3-git-send-email-quan.xu@intel.com>

On Mon, Jun 13, 2016 at 4:17 PM, Xu, Quan <quan.xu@intel.com> wrote:
> From: Quan Xu <quan.xu@intel.com>
>
> When IOMMU mapping is failed, we issue a best effort rollback, stopping
> IOMMU mapping, unmapping the previous IOMMU maps and then reporting the
> error up to the call trees. When rollback is not feasible (in early
> initialization phase or trade-off of complexity) for the hardware domain,
> we do things on a best effort basis, only throwing out an error message.
>
> IOMMU unmapping should perhaps continue despite an error, in an attempt
> to do best effort cleanup.
>
> Signed-off-by: Quan Xu <quan.xu@intel.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Acked-by: Kevin Tian <kevin.tian@intel.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

Phew!

One comment...

> +                        while ( i-- )
> +                            /*
> +                             * IOMMU unmapping should perhaps continue despite an
> +                             * error in an attempt to do best effort cleanup, and
> +                             * consume the error as __must_check annotation.
> +                             */
> +                            if ( iommu_unmap_page(p2m->domain, gfn + i) )
> +                                continue;

I'd take out the "perhaps", (since there's no 'perhaps' about it) but
other than that I think this comment is fine.

It sounds like Jan had something more along the following in mind:

/* If statement to satisfy __must_check */

Either one works.  The shorter one is sufficient, but the longer one
isn't too much I don't think.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-06-13 16:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 15:17 [PATCH v8 00/11] Check VT-d Device-TLB flush error Xu, Quan
2016-06-13 15:17 ` [PATCH v8 01/11] IOMMU: handle IOMMU mapping and unmapping failures Xu, Quan
2016-06-13 15:17 ` [PATCH v8 02/11] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping Xu, Quan
2016-06-13 15:36   ` Jan Beulich
2016-06-13 16:36   ` George Dunlap [this message]
2016-06-15  1:54     ` Xu, Quan
2016-06-15  7:44       ` Jan Beulich
2016-06-15  8:15         ` Xu, Quan
2016-06-15  8:22           ` Tian, Kevin
2016-06-15  8:35             ` Xu, Quan
2016-06-15  8:42               ` Jan Beulich
2016-06-15  8:53                 ` Xu, Quan
2016-06-13 15:17 ` [PATCH v8 03/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU unmapping (top level ones) Xu, Quan
2016-06-13 15:17 ` [PATCH v8 04/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU mapping " Xu, Quan
2016-06-15  8:26   ` Xu, Quan
2016-06-16  9:19   ` Julien Grall
2016-06-13 15:17 ` [PATCH v8 05/11] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} " Xu, Quan
2016-06-13 15:17 ` [PATCH v8 06/11] propagate IOMMU Device-TLB flush error up to EPT update " Xu, Quan
2016-06-13 16:37   ` George Dunlap
2016-06-13 15:17 ` [PATCH v8 07/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending " Xu, Quan
2016-06-13 15:17 ` [PATCH v8 08/11] IOMMU: propagate IOMMU Device-TLB flush error (leaf ones) Xu, Quan
2016-06-16  9:25   ` Julien Grall
2016-06-13 15:17 ` [PATCH v8 09/11] vt-d: fix the IOMMU flush issue Xu, Quan
2016-06-13 15:52   ` Jan Beulich
2016-06-14  8:10     ` Xu, Quan
2016-06-14  8:26       ` Jan Beulich
2016-06-14  9:04         ` Xu, Quan
2016-06-15  1:42           ` Tian, Kevin
2016-06-13 15:17 ` [PATCH v8 10/11] vt-d: propagate the IOMMU Device-TLB flush error up to ME phantom functions Xu, Quan
2016-06-13 15:17 ` [PATCH v8 11/11] vt-d: add __must_check annotation to IOMMU flush pointers and handlers Xu, Quan

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=CAFLBxZb9u_Q_GbfSazPDTRMTGmYDGX0VUKNiqs7PqnhJBiYzeg@mail.gmail.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=quan.xu@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.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).