From: Chao Gao <chao.gao@intel.com>
To: xen-devel@lists.xen.org
Cc: Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Chao Gao <chao.gao@intel.com>
Subject: [PATCH v11 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list
Date: Wed, 29 Mar 2017 13:11:49 +0800 [thread overview]
Message-ID: <1490764315-7162-1-git-send-email-chao.gao@intel.com> (raw)
The current VT-d PI related code may operate incorrectly in the
following scenarios:
1. When VT-d PI is enabled, neen't migrate pirq which is using VT-d PI during
vCPU migration. Patch [1/6] solves this by introducing a new flag to indicate
that the pt-irq is delivered through VT-d PI.
2. msi_msg_to_remap_entry() is buggy when the live IRTE is in posted format.
It wrongly inherits the 'im' field from the live IRTE but updates all the
other fileds to remapping format. Patch [2/6] handles this.
3. [3/6] is a cleanup patch
4. When a pCPU is unplugged, and there might be vCPUs on its
list. Since the pCPU is offline, those vCPUs might not be woken
up again. [4/6] addresses it.
5. IRTE is updated through structure assigment which is unsafe in some cases.
To resolve this, Patch [5/6] provides two variants, atomic and non-atomic, to
update IRTE. And a bug is raised when we can't meet the caller's atomic
requirement.
6. We didn't change the IRTE to remapping format when pt-irq is configurated
to have multi-destination vCPUs. Patch [6/6] resolves this problem.
Chao Gao (4):
passthrough: don't migrate pirq when it is delivered through VT-d PI
VT-d: Introduce new fields in msi_desc to track binding with guest
interrupt
VT-d: introduce update_irte to update irte safely
passthrough/io: Fall back to remapping interrupt when we can't use
VT-d PI
Feng Wu (2):
VT-d: Some cleanups
VMX: Fixup PI descriptor when cpu is offline
xen/arch/x86/hvm/hvm.c | 3 +
xen/arch/x86/hvm/vmx/vmcs.c | 1 +
xen/arch/x86/hvm/vmx/vmx.c | 70 ++++++++++
xen/arch/x86/msi.c | 2 +
xen/drivers/passthrough/io.c | 71 ++--------
xen/drivers/passthrough/vtd/intremap.c | 236 +++++++++++++++------------------
xen/include/asm-x86/hvm/vmx/vmx.h | 1 +
xen/include/asm-x86/msi.h | 3 +
xen/include/xen/hvm/irq.h | 1 +
9 files changed, 204 insertions(+), 184 deletions(-)
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-03-29 5:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 5:11 Chao Gao [this message]
2017-03-29 5:11 ` [PATCH v11 1/6] passthrough: don't migrate pirq when it is delivered through VT-d PI Chao Gao
2017-03-31 5:28 ` Tian, Kevin
2017-03-30 23:10 ` Chao Gao
2017-03-31 10:27 ` Jan Beulich
2017-03-31 9:31 ` Jan Beulich
2017-03-31 2:42 ` Chao Gao
2017-03-31 10:06 ` Jan Beulich
2017-03-31 3:27 ` Chao Gao
2017-03-31 10:38 ` Jan Beulich
2017-04-05 0:20 ` Chao Gao
2017-04-05 8:03 ` Jan Beulich
2017-03-29 5:11 ` [PATCH v11 2/6] VT-d: Introduce new fields in msi_desc to track binding with guest interrupt Chao Gao
2017-03-31 5:46 ` Tian, Kevin
2017-03-30 23:01 ` Chao Gao
2017-03-31 8:11 ` Jan Beulich
2017-03-31 1:13 ` Chao Gao
2017-03-31 9:48 ` Jan Beulich
2017-03-29 5:11 ` [PATCH v11 3/6] VT-d: Some cleanups Chao Gao
2017-03-29 5:11 ` [PATCH v11 4/6] VMX: Fixup PI descriptor when cpu is offline Chao Gao
2017-03-29 5:11 ` [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely Chao Gao
2017-03-31 6:03 ` Tian, Kevin
2017-03-31 10:01 ` Jan Beulich
2017-04-04 19:12 ` Chao Gao
2017-04-05 7:40 ` Jan Beulich
2017-03-29 5:11 ` [PATCH v11 6/6] passthrough/io: Fall back to remapping interrupt when we can't use VT-d PI Chao Gao
2017-03-31 5:13 ` [PATCH v11 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list Tian, Kevin
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=1490764315-7162-1-git-send-email-chao.gao@intel.com \
--to=chao.gao@intel.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.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).