All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Feng Wu <feng.wu@intel.com>, Quan Xu <quan.xu@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	"'keir@xen.org'" <keir@xen.org>,
	"'george.dunlap@eu.citrix.com'" <george.dunlap@eu.citrix.com>,
	"'andrew.cooper3@citrix.com'" <andrew.cooper3@citrix.com>,
	"'tim@xen.org'" <tim@xen.org>,
	"'xen-devel@lists.xen.org'" <xen-devel@lists.xen.org>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH v3 0/2] VT-d flush issue
Date: Tue, 22 Dec 2015 01:01:01 -0700	[thread overview]
Message-ID: <5679114D02000078000C219D@prv-mh.provo.novell.com> (raw)
In-Reply-To: <E959C4978C3B6342920538CF579893F00AF068DB@SHSMSX104.ccr.corp.intel.com>

>>> On 22.12.15 at 08:40, <feng.wu@intel.com> wrote:
> Maybe, there are still some misunderstanding about your expectation.
> Let me summarize it here.
> 
> After Quan's patch-set, there are two types of error code:
> - -EOPNOTSUPP
> Now we only support and use software way to synchronize the invalidation,
> if someone calls queue_invalidate_wait() and passes sw with 0, then
> -EOPNOTSUPP is returned (Though this cannot happen in real world, since 
> queue_invalidate_wait() is called only in one place and 1 is passed in to 'sw').
> So I am not sure what should we do for this return value, if we really get
> that return value, it means the flush is not actually executed, so the iommu
> state is incorrect, the data is inconsistent. Do you think what should we do
> for this case?

Since seeing this error would be a software bug, BUG() or ASSERT()
are fine to handle this specific case, if need be.

> - -ETIMEDOUT
> For this case, Quan has elaborate a lot, IIUIC, the main gap between you
> and Quan is you think the error code should be propagated to the up caller,
> while in Quan's implementation, he deals with this error in 
> invalidate_timeout()
> and device_tlb_invalidate_timeout(), hence no need to propagated it to
> up called, since the handling policy will crash the domain, so we don't think
> propagated error code is needed. Even we propagate it, the up caller still
> doesn't need to do anything for it.

"Handling" an error by e.g. domain_crash() doesn't mean you don't
need to also modify (or at the very least inspect) callers: They may
continue doing things _assuming_ success. Of course you don't
need to domain_crash() at all layers. But errors from lower layers
should, at least in most ordinary cases, lead to higher layers bailing
instead of continuing.

Jan

  reply	other threads:[~2015-12-22  8:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20 13:57 [PATCH v3 0/2] VT-d flush issue Xu, Quan
2015-12-20 15:51 ` Andrew Cooper
2015-12-21 11:46 ` Jan Beulich
2015-12-21 12:28   ` Xu, Quan
2015-12-21 12:50     ` Jan Beulich
2015-12-21 13:08       ` Xu, Quan
2015-12-21 13:22         ` Jan Beulich
2015-12-21 13:35           ` Xu, Quan
2015-12-21 14:08           ` Xu, Quan
2015-12-21 14:16             ` Jan Beulich
2015-12-21 14:31               ` Xu, Quan
2015-12-21 14:52                 ` Jan Beulich
2015-12-21 15:15                   ` Xu, Quan
2015-12-22  7:40           ` Wu, Feng
2015-12-22  8:01             ` Jan Beulich [this message]
2015-12-22  8:10               ` Wu, Feng
2015-12-22  8:20                 ` Jan Beulich
2015-12-22  8:10               ` Xu, Quan
2015-12-22  8:27                 ` Jan Beulich
2015-12-22  8:43                   ` Xu, Quan
2015-12-22  9:08                     ` Jan Beulich
2015-12-22  9:18                       ` Xu, Quan
2015-12-22 10:26                       ` Xu, Quan
2015-12-23  6:21                         ` Tian, Kevin
2015-12-21 12:44   ` Xu, Quan
  -- strict thread matches above, loose matches on Subject: below --
2015-12-12 13:21 Quan Xu
2015-12-19 14:01 ` 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=5679114D02000078000C219D@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=quan.xu@intel.com \
    --cc=tim@xen.org \
    --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 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.