From: Wei Liu <wei.liu2@citrix.com>
To: z00226004 <zhaoshenglong@huawei.com>
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com,
xen-devel@lists.xen.org, julien.grall@arm.com,
shannon.zhao@linaro.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH v6 15/16] libxl/arm: Initialize domain param HVM_PARAM_CALLBACK_IRQ
Date: Thu, 22 Sep 2016 15:16:51 +0100 [thread overview]
Message-ID: <20160922141651.GM16004@citrix.com> (raw)
In-Reply-To: <1474548753-12596-16-git-send-email-zhaoshenglong@huawei.com>
On Thu, Sep 22, 2016 at 08:52:32PM +0800, z00226004 wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>
>
> The guest kernel will get the event channel interrupt information via
> domain param HVM_PARAM_CALLBACK_IRQ. Initialize it here.
>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxl/libxl_arm.c | 14 ++++++++++++++
> tools/libxl/libxl_internal.h | 3 +++
> 2 files changed, 17 insertions(+)
>
> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
> index 6f0bc70..913f401 100644
> --- a/tools/libxl/libxl_arm.c
> +++ b/tools/libxl/libxl_arm.c
> @@ -900,8 +900,22 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc,
> struct xc_dom_image *dom)
> {
> int rc;
> + uint64_t val;
>
> assert(info->type == LIBXL_DOMAIN_TYPE_PV);
> +
> + /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ. */
> + val = MASK_INSR(HVM_PARAM_CALLBACK_TYPE_PPI,
> + HVM_PARAM_CALLBACK_IRQ_TYPE_MASK);
> + /* Active-low level-sensitive */
> + val |= MASK_INSR(HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_LOW_LEVEL,
> + HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_MASK);
> + val |= GUEST_EVTCHN_PPI;
> + rc = xc_hvm_param_set(dom->xch, dom->guest_domid, HVM_PARAM_CALLBACK_IRQ,
> + val);
> + if (rc)
> + return rc;
> +
> rc = libxl__prepare_dtb(gc, info, state, dom);
> if (rc) goto out;
>
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index f1ba473..cb6d9e0 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -128,6 +128,9 @@
> #define ROUNDUP(_val, _order) \
> (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1))
>
> +#define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m)))
> +#define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m))
> +
Though I would have moved this to libxl_arm.c because the only user is
there, or at least give them less cryptic names.
> #define min(X, Y) ({ \
> const typeof (X) _x = (X); \
> const typeof (Y) _y = (Y); \
> --
> 2.0.4
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-22 14:16 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 12:52 [PATCH v6 00/16] Xen ARM DomU ACPI support z00226004
2016-09-22 12:52 ` [PATCH v6 01/16] tools/libxl: Add an unified configuration option for ACPI z00226004
2016-09-22 12:52 ` [PATCH v6 02/16] libxl/arm: prepare for constructing ACPI tables z00226004
2016-09-22 14:13 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 03/16] libxl/arm: Generate static ACPI DSDT table z00226004
2016-09-22 12:52 ` [PATCH v6 04/16] libxl/arm: Estimate the size of ACPI tables z00226004
2016-09-22 14:21 ` Wei Liu
2016-09-27 15:20 ` [PATCH v7 " Shannon Zhao
2016-09-22 12:52 ` [PATCH v6 05/16] libxl/arm: Construct ACPI RSDP table z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 06/16] libxl/arm: Construct ACPI XSDT table z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 07/16] libxl/arm: Construct ACPI GTDT table z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 08/16] libxl/arm: Factor MPIDR computing codes out as a helper z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 09/16] libxl/arm: Construct ACPI MADT table z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 10/16] libxl/arm: Construct ACPI FADT table z00226004
2016-09-22 14:14 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 11/16] libxl/arm: Construct ACPI DSDT table z00226004
2016-09-22 14:15 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 12/16] libxl/arm: Factor finalise_one_memory_node as a gerneric function z00226004
2016-09-22 14:15 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 13/16] libxl/arm: Add ACPI module z00226004
2016-09-22 14:15 ` Wei Liu
2016-09-22 12:52 ` [PATCH v6 14/16] public/hvm/params.h: Add macros for HVM_PARAM_CALLBACK_TYPE_PPI z00226004
2016-09-22 14:44 ` Julien Grall
2016-09-22 15:00 ` Jan Beulich
2016-09-26 19:45 ` Shannon Zhao
2016-09-27 8:01 ` Jan Beulich
2016-09-27 15:27 ` [PATCH v7 " Shannon Zhao
2016-09-28 10:55 ` Jan Beulich
2016-09-22 12:52 ` [PATCH v6 15/16] libxl/arm: Initialize domain param HVM_PARAM_CALLBACK_IRQ z00226004
2016-09-22 14:16 ` Wei Liu [this message]
2016-09-22 12:52 ` [PATCH v6 16/16] libxl/arm: Add the size of ACPI tables to maxmem z00226004
2016-09-22 14:10 ` Wei Liu
2016-09-22 14:32 ` Wei Liu
2016-09-26 7:08 ` Shannon Zhao
2016-09-26 9:05 ` Wei Liu
2016-09-26 18:30 ` Shannon Zhao
2016-09-27 9:30 ` Wei Liu
2016-09-26 21:54 ` Shannon Zhao
2016-09-27 9:41 ` Wei Liu
2016-09-27 16:01 ` Shannon Zhao
2016-09-27 16:35 ` Wei Liu
2016-09-27 18:43 ` Shannon Zhao
2016-09-28 10:00 ` Wei Liu
2016-09-28 13:11 ` Shannon Zhao
2016-09-28 13:17 ` Wei Liu
2016-09-28 17:52 ` Julien Grall
2016-09-22 13:27 ` [PATCH v6 00/16] Xen ARM DomU ACPI support Julien Grall
2016-09-22 13:32 ` Shannon Zhao
2016-09-22 13:37 ` Julien Grall
2016-09-22 13:38 ` Shannon Zhao
2016-09-22 14:27 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160922141651.GM16004@citrix.com \
--to=wei.liu2@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=peter.huangpeng@huawei.com \
--cc=shannon.zhao@linaro.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
--cc=zhaoshenglong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).