[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 0/4] VMX: Properly handle pi descriptor and per-cpu blocking list



The current VT-d PI related code may operate incorrectly in the
following scenarios:
1. When the last assigned device is dettached from the domain, all
the PI related hooks are removed then, however, the vCPU can be
blocked, switched to another pCPU, etc, all without the aware of
PI. After the next time we attach another device to the domain,
which makes the PI realted hooks avaliable again, the status
of the pi descriptor is not true. Beside that, the blocking vcpu
may still remain in the per-cpu blocking in this case.

Solution for this case: [patch v2 1/4]
- Don't zap the PI hooks after the last assigned device is dettatched.
- Remove all the vCPU of the domain from the per-cpu blocking list,
  when the last assigned devices is dettached.

2. After the domain is destroyed, the the blocking vcpu may also
remain in the per-cpu blocking.

Solution for this case: [patch v2 2/4]
- Remove the vCPU from the per-cpu blocking list when it is going
  to be destroyed.

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.

Solution for this case: [patch v2 4/4]
- When the pCPU is unplugged, move those vCPUs to another blocking
  list of an online pCPU, as well as, set the new cpu to the 'NDST'
  field of PI descriptor.

Feng Wu (4):
  VMX: Properly handle pi when all the assigned devices are removed
  VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed
  VMX: Assign the right value to 'NDST' field in a concern case
  VMX: fixup PI descritpor when cpu is offline

 xen/arch/x86/hvm/vmx/vmcs.c        |   1 +
 xen/arch/x86/hvm/vmx/vmx.c         | 179 +++++++++++++++++++++++++++++++++----
 xen/common/schedule.c              |   8 +-
 xen/include/asm-x86/hvm/hvm.h      |   4 +-
 xen/include/asm-x86/hvm/vmx/vmcs.h |   5 +-
 xen/include/asm-x86/hvm/vmx/vmx.h  |   1 +
 6 files changed, 174 insertions(+), 24 deletions(-)

-- 
2.1.0


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.