diff mbox

[v4,21/24] hvm/params: Add a new dilivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

Message ID 1456658360-16080-22-git-send-email-zhaoshenglong@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shannon Zhao Feb. 28, 2016, 11:19 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>

Add a new dilivery type:
val[63:56] == 3: val[15:8] is flag: val[7:0] is a PPI.
To the flag, bit 0 stands the interrupt mode is edge(1) or level(0) and
bit 1 stands the interrupt polarity is active low(1) or high(0).

Cc: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
v4: rebase on master
---
 xen/include/public/hvm/params.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Jan Beulich Feb. 29, 2016, 11:23 a.m. UTC | #1
>>> On 28.02.16 at 12:19, <zhaoshenglong@huawei.com> wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>
> 
> Add a new dilivery type:
> val[63:56] == 3: val[15:8] is flag: val[7:0] is a PPI.
> To the flag, bit 0 stands the interrupt mode is edge(1) or level(0) and
> bit 1 stands the interrupt polarity is active low(1) or high(0).
> 
> Cc: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> v4: rebase on master
> ---
>  xen/include/public/hvm/params.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
> index 81f9451..382a79d 100644
> --- a/xen/include/public/hvm/params.h
> +++ b/xen/include/public/hvm/params.h
> @@ -55,6 +55,15 @@
>   * if this delivery method is available.
>   */
>  
> +#define HVM_PARAM_CALLBACK_TYPE_EVENT    3
> +/*
> + * val[15:8] is flag of event-channel interrupt:
> + *  bit 0: interrupt is edge(1) or level(0) triggered
> + *  bit 1: interrupt is active low(1) or high(0)

Wouldn't it be better to name these bit 8 and bit 9 respectively,
to avoid confusion with the full value's bits 0 and 1?

Also please state explicitly that bits 16..63 need to be zero (and
make sure you check this in the code consuming the input).

Jan

> + * val[7:0] is PPI number used by event-channel.
> + * This is only used by ARM/ARM64.
> + */
> +
>  /*
>   * These are not used by Xen. They are here for convenience of HVM-guest
>   * xenbus implementations.
> -- 
> 2.0.4
Stefano Stabellini Feb. 29, 2016, 5:04 p.m. UTC | #2
On Sun, 28 Feb 2016, Shannon Zhao wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>
> 
> Add a new dilivery type:
             ^ "delivery", also in the subject line


> val[63:56] == 3: val[15:8] is flag: val[7:0] is a PPI.
> To the flag, bit 0 stands the interrupt mode is edge(1) or level(0) and
> bit 1 stands the interrupt polarity is active low(1) or high(0).
> 
> Cc: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> v4: rebase on master
> ---
>  xen/include/public/hvm/params.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
> index 81f9451..382a79d 100644
> --- a/xen/include/public/hvm/params.h
> +++ b/xen/include/public/hvm/params.h
> @@ -55,6 +55,15 @@
>   * if this delivery method is available.
>   */
>  
> +#define HVM_PARAM_CALLBACK_TYPE_EVENT    3
> +/*
> + * val[15:8] is flag of event-channel interrupt:
> + *  bit 0: interrupt is edge(1) or level(0) triggered
> + *  bit 1: interrupt is active low(1) or high(0)
> + * val[7:0] is PPI number used by event-channel.
> + * This is only used by ARM/ARM64.
> + */
> +
>  /*
>   * These are not used by Xen. They are here for convenience of HVM-guest
>   * xenbus implementations.
> -- 
> 2.0.4
> 
>
diff mbox

Patch

diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 81f9451..382a79d 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -55,6 +55,15 @@ 
  * if this delivery method is available.
  */
 
+#define HVM_PARAM_CALLBACK_TYPE_EVENT    3
+/*
+ * val[15:8] is flag of event-channel interrupt:
+ *  bit 0: interrupt is edge(1) or level(0) triggered
+ *  bit 1: interrupt is active low(1) or high(0)
+ * val[7:0] is PPI number used by event-channel.
+ * This is only used by ARM/ARM64.
+ */
+
 /*
  * These are not used by Xen. They are here for convenience of HVM-guest
  * xenbus implementations.