Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-25 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 23, 2016 10:19 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-23 Thread Jan Beulich
>>> On 02.09.16 at 15:15, wrote: > And that is another reason I use pause/unpause here, it can address > all the races. And this is an one-time action (Only occurs at the first > device gets assigned), do you think it is that unacceptable? Btw. please see George's very nice

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-20 Thread Wu, Feng
> -Original Message- > From: Dario Faggioli [mailto:dario.faggi...@citrix.com] > Sent: Tuesday, September 20, 2016 4:14 PM > To: Jan Beulich > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Wu, Feng > ; Tian, Kevin

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-20 Thread Dario Faggioli
On Tue, 2016-09-20 at 01:31 -0600, Jan Beulich wrote: > > > > On 20.09.16 at 01:12, wrote: > > How's possible for the solution here to be "either remove the > > ASSERT() > > _OR_ change the code"? That really makes few sense to me... :-O > > I disagree: Whether

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-20 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, September 20, 2016 3:32 PM > To: Dario Faggioli > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Wu, Feng > ; Tian, Kevin

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-20 Thread Jan Beulich
>>> On 20.09.16 at 01:12, wrote: > On Sun, 2016-09-18 at 08:37 +, Wu, Feng wrote: >> > From: Dario Faggioli [mailto:dario.faggi...@citrix.com] >> However, I found this is not true in some scenarios, such as, >> vmx_pi_switch_to() hasn't been installed or executed

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-19 Thread Wu, Feng
> -Original Message- > From: Dario Faggioli [mailto:dario.faggi...@citrix.com] > Sent: Tuesday, September 20, 2016 7:12 AM > To: Wu, Feng ; Jan Beulich > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-19 Thread Dario Faggioli
On Sun, 2016-09-18 at 08:37 +, Wu, Feng wrote: > > From: Dario Faggioli [mailto:dario.faggi...@citrix.com] > > So why this is all of the sudden becoming one? Am I completely off > > with > > my recollection (or in general :-P)? Or what am I missing about the > > issue we are trying to address

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-18 Thread Wu, Feng
Hi Dario, > -Original Message- > From: Dario Faggioli [mailto:dario.faggi...@citrix.com] > Sent: Wednesday, September 14, 2016 10:52 PM > To: Wu, Feng ; Jan Beulich > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-14 Thread Dario Faggioli
On Wed, 2016-09-14 at 02:23 +, Wu, Feng wrote: > Then I tried to implement the function like the following: > > /* This function is called when pcidevs_lock is held */ > void vmx_pi_hooks_assign(struct domain *d) > { > if ( !iommu_intpost || !has_hvm_container_domain(d) ) >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-14 Thread Jan Beulich
>>> On 14.09.16 at 04:23, wrote: >> From: Wu, Feng >> Sent: Monday, September 5, 2016 11:12 AM >> I still have trouble to fully understand this, please see the following >> scenario: >> >> 1) Set 'NDST' to the pCPU0 (which vCPU is currently running on, but >> it may changes

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-13 Thread Wu, Feng
> -Original Message- > From: Wu, Feng > Sent: Monday, September 5, 2016 11:12 AM > To: Jan Beulich > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- > de...@lists.xen.org; Wu, Feng

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-05 Thread Jan Beulich
>>> On 05.09.16 at 05:11, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, September 2, 2016 9:55 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-04 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 2, 2016 9:55 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Jan Beulich
>>> On 02.09.16 at 15:15, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, September 2, 2016 6:46 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 2, 2016 6:46 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Jan Beulich
>>> On 02.09.16 at 12:30, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, September 2, 2016 5:26 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 2, 2016 5:26 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Jan Beulich
>>> On 02.09.16 at 10:40, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, September 2, 2016 4:16 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 2, 2016 4:16 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Jan Beulich
>>> On 02.09.16 at 09:31, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, September 2, 2016 3:04 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, September 2, 2016 3:04 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-02 Thread Jan Beulich
>>> On 02.09.16 at 03:46, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Thursday, September 1, 2016 4:30 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; >>

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-01 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, September 1, 2016 4:30 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; dario.faggi...@citrix.com; > george.dun...@eu.citrix.com; Tian, Kevin ; xen- >

Re: [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-09-01 Thread Jan Beulich
>>> On 31.08.16 at 05:56, wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -219,8 +219,19 @@ void vmx_pi_hooks_assign(struct domain *d) > > ASSERT(!d->arch.hvm_domain.vmx.vcpu_block); > > +/* > + * Pausing the domain can make

[Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-08-30 Thread Feng Wu
Pausing the domain can make sure the vCPU is not running and hence calling the hooks simultaneously when deassigning the PI hooks. This makes sure that all the appropriate state of PI descriptor is actually set up for all vCPus before leaving this function. Signed-off-by: Feng Wu