Re: [Xen-devel] [PATCH v3] VT-d PI: track the vcpu number in pi blocking list

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 07:16,  wrote:
> On Fri, Jun 16, 2017 at 08:34:20AM -0600, Jan Beulich wrote:
> On 24.05.17 at 08:56,  wrote:
>>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>>> @@ -82,6 +82,7 @@ static int vmx_vmfunc_intercept(struct cpu_user_regs 
>>> *regs);
>>>  struct vmx_pi_blocking_vcpu {
>>>  struct list_head list;
>>>  spinlock_t   lock;
>>> +uint32_t counter;
>>
>>Is there any reason for this to be fixed width? Other than that the
> 
> I will use 'int' instead of 'uint32_t'.

Can the counter go negative? I don't think so, in which case you
really want to use "unsigned int".

Jan


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


Re: [Xen-devel] [PATCH v3] VT-d PI: track the vcpu number in pi blocking list

2017-06-21 Thread Chao Gao
On Fri, Jun 16, 2017 at 08:34:20AM -0600, Jan Beulich wrote:
 On 24.05.17 at 08:56,  wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -82,6 +82,7 @@ static int vmx_vmfunc_intercept(struct cpu_user_regs 
>> *regs);
>>  struct vmx_pi_blocking_vcpu {
>>  struct list_head list;
>>  spinlock_t   lock;
>> +uint32_t counter;
>
>Is there any reason for this to be fixed width? Other than that the

I will use 'int' instead of 'uint32_t'.

>non-tracing parts look fine, but I really wonder whether the
>introduction of the counter and the tracing wouldn't better be split.

Will split them apart.

Thanks
chao

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


Re: [Xen-devel] [PATCH v3] VT-d PI: track the vcpu number in pi blocking list

2017-06-16 Thread Jan Beulich
>>> On 24.05.17 at 08:56,  wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -82,6 +82,7 @@ static int vmx_vmfunc_intercept(struct cpu_user_regs *regs);
>  struct vmx_pi_blocking_vcpu {
>  struct list_head list;
>  spinlock_t   lock;
> +uint32_t counter;

Is there any reason for this to be fixed width? Other than that the
non-tracing parts look fine, but I really wonder whether the
introduction of the counter and the tracing wouldn't better be split.

Jan


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