From: Quan Xu <quan.xu@intel.com>
To: jbeulich@suse.com, kevin.tian@intel.com
Cc: feng.wu@intel.com, eddie.dong@intel.com,
george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
tim@xen.org, xen-devel@lists.xen.org, jun.nakajima@intel.com,
Quan Xu <quan.xu@intel.com>,
keir@xen.org
Subject: [PATCH v3 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
Date: Sat, 12 Dec 2015 21:21:47 +0800 [thread overview]
Message-ID: <1449926508-72058-2-git-send-email-quan.xu@intel.com> (raw)
In-Reply-To: <1449926508-72058-1-git-send-email-quan.xu@intel.com>
Signed-off-by: Quan Xu <quan.xu@intel.com>
---
xen/drivers/passthrough/vtd/qinval.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c
index b81b0bd..990baf2 100644
--- a/xen/drivers/passthrough/vtd/qinval.c
+++ b/xen/drivers/passthrough/vtd/qinval.c
@@ -28,6 +28,11 @@
#include "vtd.h"
#include "extern.h"
+static int __read_mostly iommu_qi_timeout_ms = 1;
+integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms);
+
+#define IOMMU_QI_TIMEOUT (iommu_qi_timeout_ms * MILLISECS(1))
+
static void print_qi_regs(struct iommu *iommu)
{
u64 val;
@@ -167,10 +172,12 @@ static int queue_invalidate_wait(struct iommu *iommu,
start_time = NOW();
while ( poll_slot != QINVAL_STAT_DONE )
{
- if ( NOW() > (start_time + DMAR_OPERATION_TIMEOUT) )
+ if ( NOW() > (start_time + IOMMU_QI_TIMEOUT) )
{
print_qi_regs(iommu);
- panic("queue invalidate wait descriptor was not executed");
+ dprintk(XENLOG_WARNING VTDPREFIX,
+ "Queue invalidate wait descriptor was timeout.\n");
+ return -ETIMEDOUT;
}
cpu_relax();
}
--
1.8.1.2
next prev parent reply other threads:[~2015-12-12 13:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-12 13:21 [PATCH v3 0/2] VT-d flush issue Quan Xu
2015-12-12 13:21 ` Quan Xu [this message]
2015-12-14 9:14 ` [PATCH v3 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed Jan Beulich
2015-12-15 8:35 ` Xu, Quan
2015-12-15 9:18 ` Jan Beulich
2015-12-15 10:10 ` Xu, Quan
2015-12-12 13:21 ` [PATCH v3 2/2] VT-d: Fix vt-d flush timeout issue Quan Xu
2015-12-14 9:28 ` Jan Beulich
2015-12-15 8:15 ` Xu, Quan
2015-12-15 9:16 ` Jan Beulich
2015-12-15 10:24 ` Xu, Quan
2015-12-15 12:32 ` Jan Beulich
2015-12-15 13:01 ` Xu, Quan
2015-12-15 13:26 ` Jan Beulich
2015-12-15 10:58 ` Xu, Quan
2015-12-15 12:23 ` Xu, Quan
2015-12-15 12:29 ` Jan Beulich
2015-12-15 13:31 ` Xu, Quan
[not found] ` <5670271402000078000BFA35@prv-mh.provo.novell.com>
2015-12-15 14:49 ` Xu, Quan
2015-12-16 3:51 ` Xu, Quan
2015-12-16 8:08 ` Jan Beulich
2015-12-17 11:43 ` Xu, Quan
2015-12-17 12:10 ` Jan Beulich
2015-12-17 12:55 ` Xu, Quan
2015-12-19 14:01 ` [PATCH v3 0/2] VT-d flush issue 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=1449926508-72058-2-git-send-email-quan.xu@intel.com \
--to=quan.xu@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=eddie.dong@intel.com \
--cc=feng.wu@intel.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@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 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).