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

Re: [Xen-devel] [PATCH v5 14/16] public/hvm/params.h: Add macros for HVM_PARAM_CALLBACK_TYPE_PPI



>>> On 02.09.16 at 09:23, <zhaoshenglong@xxxxxxxxxx> wrote:

> 
> On 2016/9/2 14:18, Jan Beulich wrote:
>>>>> On 02.09.16 at 04:55, <zhaoshenglong@xxxxxxxxxx> wrote:
>>> --- a/xen/include/public/hvm/params.h
>>> +++ b/xen/include/public/hvm/params.h
>>> @@ -30,6 +30,7 @@
>>>   */
>>>  
>>>  #define HVM_PARAM_CALLBACK_IRQ 0
>>> +#define HVM_PARAM_CALLBACK_IRQ_TYPE_SHIFT     56
>> 
>> This covering the top 8 bits, just the shift value might indeed be
>> enough.
>> 
>>> @@ -66,6 +67,8 @@
>>>   * This is only used by ARM/ARM64 and masking/eoi the interrupt associated 
>>> to
>>>   * the notification is handled by the interrupt controller.
>>>   */
>>> +#define HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_SHIFT     8
>>> +#define HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_LOW_LEVEL 2
>> 
>> Here, however, I don't see how the shift value alone can be of
>> use when wanting to extract the relevant bits. I think this (and
>> for consistency also the other) value should be specified as a
>> mask, with users expected to have mechanisms like our
>> MASK_EXTR() / MASK_INSR() available.
>> 
> Ok, will add the mask. Thanks.

And just to avoid any misunderstanding (and another extra round
trip): I mean there to be _only_ a mask definition, without any
shift values (as those can be derived).

Jan


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

 


Rackspace

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