xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list
@ 2017-03-15  5:11 Chao Gao
  2017-03-15  5:11 ` [PATCH v10 1/6] VT-d: Introduce new fields in msi_desc to track binding with guest interrupt Chao Gao
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Chao Gao @ 2017-03-15  5:11 UTC (permalink / raw)
  To: xen-devel
  Cc: Kevin Tian, Jun Nakajima, George Dunlap, Andrew Cooper,
	Dario Faggioli, Jan Beulich, Chao Gao

The current VT-d PI related code may operate incorrectly in the 
following scenarios: 
1. When IRTE is in posted mode, we don't need to set the irq 
affinity for it, since the destination of these interrupts is 
vCPU and the vCPU affinity is set during vCPU scheduling. Patch 
[1/6] handles this. In order to make the logic clearer, it also
extracts the common part from pi_update_irte() and
msi_msg_to_rte_entry() which two functions update irte to make
the logic clearer.

2. [2/6] is a cleanup patch 

3. 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. [3/6] addresses it. 

4. IRTE is updated through structure assigment or memcpy() which is
unsafe. To resolve this, Patch [4/6] use cmpxchg16b() if supported or
two 64-bit write operations to update irte.

5. When VT-d PI is enabled, neen't migrate pirq which is using VT-d PI during
vCPU migration. Patch [5/6] solves this by introducing a new flag to indicate
that the pt-irq is delivered through VT-d PI.

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):
  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: don't migrate pirq when it is delivered through VT-d PI
  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                     |   1 +
 xen/drivers/passthrough/io.c           |  22 ++--
 xen/drivers/passthrough/vtd/intremap.c | 196 ++++++++++++---------------------
 xen/include/asm-x86/hvm/vmx/vmx.h      |   1 +
 xen/include/asm-x86/msi.h              |   2 +
 xen/include/xen/hvm/irq.h              |   1 +
 9 files changed, 161 insertions(+), 136 deletions(-)

-- 
1.8.3.1


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

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-03-24  8:44 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15  5:11 [PATCH v10 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list Chao Gao
2017-03-15  5:11 ` [PATCH v10 1/6] VT-d: Introduce new fields in msi_desc to track binding with guest interrupt Chao Gao
2017-03-15 16:41   ` Jan Beulich
2017-03-15 21:21     ` Chao Gao
2017-03-16 10:24       ` Jan Beulich
2017-03-22  5:59   ` Tian, Kevin
2017-03-22  0:18     ` Chao Gao
2017-03-22  8:32       ` Tian, Kevin
2017-03-15  5:11 ` [PATCH v10 2/6] VT-d: Some cleanups Chao Gao
2017-03-15  5:11 ` [PATCH v10 3/6] VMX: Fixup PI descriptor when cpu is offline Chao Gao
2017-03-15  5:11 ` [PATCH v10 4/6] VT-d: introduce update_irte to update irte safely Chao Gao
2017-03-15 16:48   ` Jan Beulich
2017-03-15 22:39     ` Chao Gao
2017-03-16 10:29       ` Jan Beulich
2017-03-17  1:52         ` Chao Gao
2017-03-17  9:08           ` Jan Beulich
2017-03-22  6:26         ` Tian, Kevin
2017-03-24  8:44         ` Tian, Kevin
2017-03-15  5:11 ` [PATCH v10 5/6] passthrough/io: don't migrate pirq when it is delivered through VT-d PI Chao Gao
2017-03-17 10:43   ` Jan Beulich
2017-03-20  1:59     ` Chao Gao
2017-03-20  9:18       ` Jan Beulich
2017-03-20  2:38         ` Chao Gao
2017-03-20 10:26           ` Jan Beulich
2017-03-20  5:22             ` Chao Gao
2017-03-20 12:50               ` Jan Beulich
2017-03-20  6:11                 ` Chao Gao
2017-03-15  5:11 ` [PATCH v10 6/6] passthrough/io: Fall back to remapping interrupt when we can't use " Chao Gao
2017-03-17 10:48   ` Jan Beulich
2017-03-22  6:34   ` Tian, Kevin

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).