Re: [Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-11-03 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, November 3, 2016 5:08 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- > de...@lists.xen.org > Subject: RE: [PATCH v6 2/7]

Re: [Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-11-03 Thread Jan Beulich
>>> On 03.11.16 at 08:45, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, October 28, 2016 9:19 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >> george.dun...@eu.citrix.com; Tian, Kevin ; xen- >> de...@lis

Re: [Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-11-03 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, October 28, 2016 9:19 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- > de...@lists.xen.org > Subject: Re: [PATCH v6 2/7] VM

Re: [Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-10-28 Thread Jan Beulich
>>> On 28.10.16 at 04:37, wrote: > @@ -215,11 +220,21 @@ void vmx_pi_hooks_assign(struct domain *d) > /* This function is called when pcidevs_lock is held */ > void vmx_pi_hooks_deassign(struct domain *d) > { > +struct vcpu *v; > + > if ( !iommu_intpost || !has_hvm_container_domain(d)

[Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-10-27 Thread Feng Wu
This patch handles some corner cases when the last assigned device is removed from the domain. In this case we should carefully handle pi descriptor and the per-cpu blocking list, to make sure: - all the PI descriptor are in the right state when next time a devices is assigned to the domain again.