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

Re: [Xen-devel] [PATCH v6 1/2] xen/arm: extend fdt_property_interrupts to support DomU


  • To: Viktor Mitin <viktor.mitin.19@xxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Tue, 6 Aug 2019 14:06:15 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=epam.com;dmarc=pass action=none header.from=epam.com;dkim=pass header.d=epam.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=USwkGHX8bk9yTUwN7u7lybKfUbvSszkL5rTgh4XC7Dg=; b=V6dH7QoLdwh0wnLkOWzBJp6Nkc0IHKc0bYyBXkYwHy7HiWWv6yAlbTUu84tEzatd3XHNl5UiQBrWLcHDOjOw5bhXQBYnXtaVPqmQj85c8aYLcxLt9agMKwZNnwEWBTBDM7LlPMNv0cAoCX4YsZjg8DgBND/3QAP9I5XPbcm6b+uN7xv5x2d2Y8624GNAFRRTnXkg2L7oCHTRg+aSCWL9NjiXNlc6XwbDGAnzGVwCcRtnWIr+4oetcbtZEV1K9SLq+MwbhYiEufovS5F5IejlVuosYOC7xKMP/6rsFMzCK8IIBJ5UfQgqAokzCKPXnc0t4wCM6RvHPyu9BIkOVLfPSA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eSIAsBYj3nr/kWaqq6E9/5CPn9kjV65am/Hq852p9MxIV1eQBmTIJsf0CtB+BUlSEvuP4PPSOqLPbjDpz/f4jhHqyLepduQzcMk67gWLlfSRwutehsSAoWQhQrlFxRJeHygBTSG3HwTyfpuKTTyPNJqSa5ywqHSE6viFY076iCenQrfGorI0Tl8cEsG10v9lex6WwGvLhXgeRgV4DKg6XsfSmHG66HJbVMVpsZwbe85hP8F6aqsI/s71eUSxrSkyrBZW53W6veVSdpb339Xk8FOkOLzuqf+A/vYhnXOFQAPJjDEFiloVMF6NtDIwGangiq+9U5eY8Ae8S0+94GDV4w==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Viktor Mitin <Viktor_Mitin@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 06 Aug 2019 14:06:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVS4MLBg1XCGX9gUK7fZp9T8tpiabuKTEA
  • Thread-topic: [PATCH v6 1/2] xen/arm: extend fdt_property_interrupts to support DomU

Hi Viktor,

Viktor Mitin writes:

> Extend fdt_property_interrupts to deal with other domain than the hwdom.
>
> The prototype of fdt_property_interrupts() has been modified
> to support both hwdom and domU in one function.
>
> This is a preparatory for the next patch which consolidates
> make_timer_node and make_timer_domU_node".
> Original goal is to consolidate make_timer functions.
>
> Suggested-by: Julien Grall <julien.grall@xxxxxxx>
> Signed-off-by: Viktor Mitin <viktor_mitin@xxxxxxxx>
I believe, Julien already asked you to include changes from previous
versions, so reviewers can track what really changed in the new version
of patches.

Also you need to collect R-b, A-b (and any other) tags that you already
received. But my R-b tag is missing. Which is good in this particular
case, because you have missed change request (see below).

> ---
>  xen/arch/arm/domain_build.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 4c8404155a..bc7d17dd2c 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -621,17 +621,20 @@ static void __init set_interrupt(gic_interrupt_t 
> interrupt,
>   *  "interrupts": contains the list of interrupts
>   *  "interrupt-parent": link to the GIC
>   */
> -static int __init fdt_property_interrupts(void *fdt, gic_interrupt_t *intr,
> +static int __init fdt_property_interrupts(const struct kernel_info *kinfo,
> +                                          gic_interrupt_t *intr,
>                                            unsigned num_irq)
>  {
>      int res;
> +    uint32_t phandle = is_hardware_domain(kinfo->d) ?
> +                       dt_interrupt_controller->phandle : GUEST_PHANDLE_GIC;
>
> -    res = fdt_property(fdt, "interrupts", intr, sizeof (intr[0]) * num_irq);
> +    res = fdt_property(kinfo->fdt, "interrupts",
> +                       intr, sizeof (intr[0]) * num_irq);
I have missed this, but Andrew Cooper noted that there is extra space
after "sizeof", which is not needed. Please remove it.


>      if ( res )
>          return res;
>
> -    res = fdt_property_cell(fdt, "interrupt-parent",
> -                            dt_interrupt_controller->phandle);
> +    res = fdt_property_cell(kinfo->fdt, "interrupt-parent", phandle);
>
>      return res;
>  }
> @@ -733,7 +736,7 @@ static int __init make_hypervisor_node(struct domain *d,
>       *  TODO: Handle properly the cpumask;
>       */
>      set_interrupt(intr, d->arch.evtchn_irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW);
> -    res = fdt_property_interrupts(fdt, &intr, 1);
> +    res = fdt_property_interrupts(kinfo, &intr, 1);
>      if ( res )
>          return res;
>
> @@ -960,8 +963,9 @@ static int __init make_gic_node(const struct domain *d, 
> void *fdt,
>      return res;
>  }
>
> -static int __init make_timer_node(const struct domain *d, void *fdt)
> +static int __init make_timer_node(const struct kernel_info *kinfo)
>  {
> +    void *fdt = kinfo->fdt;
>      static const struct dt_device_match timer_ids[] __initconst =
>      {
>          DT_MATCH_COMPATIBLE("arm,armv7-timer"),
> @@ -1016,7 +1020,7 @@ static int __init make_timer_node(const struct domain 
> *d, void *fdt)
>      dt_dprintk("  Virt interrupt %u\n", irq);
>      set_interrupt(intrs[2], irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW);
>
> -    res = fdt_property_interrupts(fdt, intrs, 3);
> +    res = fdt_property_interrupts(kinfo, intrs, 3);
>      if ( res )
>          return res;
>
> @@ -1377,7 +1381,7 @@ static int __init handle_node(struct domain *d, struct 
> kernel_info *kinfo,
>      if ( device_get_class(node) == DEVICE_GIC )
>          return make_gic_node(d, kinfo->fdt, node);
>      if ( dt_match_node(timer_matches, node) )
> -        return make_timer_node(d, kinfo->fdt);
> +        return make_timer_node(kinfo);
>
>      /* Skip nodes used by Xen */
>      if ( dt_device_used_by(node) == DOMID_XEN )


--
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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