>>> On 02.09.16 at 04:55, <zhaoshengl...@huawei.com> 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.

Jan


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

Reply via email to