All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH 06/12 v3] xen/arm: vpl011: Add a new vuart node in the xenstore
Date: Thu, 11 May 2017 12:10:11 +0100	[thread overview]
Message-ID: <20170511111011.sus25wpfarqdto6m@citrix.com> (raw)
In-Reply-To: <1494426918-32737-1-git-send-email-bhupinder.thakur@linaro.org>

On Wed, May 10, 2017 at 08:05:12PM +0530, Bhupinder Thakur wrote:
>          libxl__device_console_add(gc, domid, &console, state, &device);
> @@ -1369,14 +1377,22 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
>      }
>      case LIBXL_DOMAIN_TYPE_PV:
>      {
> -        libxl__device_console console;
> -        libxl__device device;
> +        libxl__device_console console, vuart;
> +        libxl__device device, vuart_device;
>  
>          for (i = 0; i < d_config->num_vfbs; i++) {
>              libxl__device_vfb_add(gc, domid, &d_config->vfbs[i]);
>              libxl__device_vkb_add(gc, domid, &d_config->vkbs[i]);
>          }
>  
> +        if (d_config->b_info.vuart)
> +        {
> +            init_console_info(gc, &vuart, 0);
> +            vuart.backend_domid = state->console_domid;
> +            libxl__device_vuart_add(gc, domid, &vuart, state, &vuart_device);
> +            libxl__device_console_dispose(&vuart);
> +        }
> +

This is strange. You have code snippet for both PV and HVM. Why?

>          init_console_info(gc, &console, 0);
>          console.backend_domid = state->console_domid;
>          libxl__device_console_add(gc, domid, &console, state, &device);
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index 5e96676..bb25672 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -26,6 +26,9 @@ static char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device)
>      if (device->kind == LIBXL__DEVICE_KIND_CONSOLE && device->devid == 0)
>          return GCSPRINTF("%s/console", dom_path);
>  
> +    if (device->kind == LIBXL__DEVICE_KIND_VUART)
> +        return GCSPRINTF("%s/vuart/%d", dom_path, device->devid);
> +
>      return GCSPRINTF("%s/device/%s/%d", dom_path,
>                       libxl__device_kind_to_string(device->kind),
>                       device->devid);
> @@ -151,13 +154,19 @@ retry_transaction:
>      if (rc) goto out;
>  
>      if (!libxl_only) {
> -        rc = libxl__xs_write_checked(gc, t, GCSPRINTF("%s/frontend",libxl_path),
> -                                     frontend_path);
> -        if (rc) goto out;
> +        if (fents || ro_fents)
> +        {
> +            rc = libxl__xs_write_checked(gc, t, GCSPRINTF("%s/frontend",libxl_path),
> +                                         frontend_path);
> +            if (rc) goto out;
> +        }
>  
> -        rc = libxl__xs_write_checked(gc, t, GCSPRINTF("%s/backend",libxl_path),
> -                                     backend_path);
> -        if (rc) goto out;
> +        if (bents)
> +        {
> +            rc = libxl__xs_write_checked(gc, t, GCSPRINTF("%s/backend",libxl_path),
> +                                         backend_path);
> +            if (rc) goto out;
> +        }

What is this for?

If there is no fe or be entries you skip the path creation altogether.
But why? This doesn't seem to be related to your patch.

At least explain this a bit in the commit message?

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

  parent reply	other threads:[~2017-05-11 11:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 14:35 [PATCH 06/12 v3] xen/arm: vpl011: Add a new vuart node in the xenstore Bhupinder Thakur
2017-05-10 14:35 ` [PATCH 07/12 v3] xen/arm: vpl011: Allocate a new GFN in the toolstack for vuart Bhupinder Thakur
2017-05-11 11:10   ` Wei Liu
2017-05-16 22:59   ` Stefano Stabellini
2017-05-10 14:35 ` [PATCH 08/12 v3] xen/arm: vpl011: Modify xenconsole to support multiple consoles Bhupinder Thakur
2017-05-11 11:15   ` Wei Liu
2017-05-16 23:41   ` Stefano Stabellini
2017-05-25 10:57     ` Bhupinder Thakur
2017-05-25 18:24       ` Stefano Stabellini
2017-05-10 14:35 ` [PATCH 09/12 v3] xen/arm: vpl011: Add support for vuart in xenconsole Bhupinder Thakur
2017-05-11 11:17   ` Wei Liu
2017-05-16 23:44   ` Stefano Stabellini
2017-05-22 14:37     ` Julien Grall
2017-05-10 14:35 ` [PATCH 10/12 v3] xen/arm: vpl011: Add a new vuart console type to xenconsole client Bhupinder Thakur
2017-05-11 11:17   ` Wei Liu
2017-05-16 23:02   ` Stefano Stabellini
2017-05-10 14:35 ` [PATCH 11/12 v3] xen/arm: vpl011: Add a pl011 uart DT node in the guest device tree Bhupinder Thakur
2017-05-11 11:18   ` Wei Liu
2017-05-16 23:05   ` Stefano Stabellini
2017-05-22 14:42   ` Julien Grall
2017-05-10 14:35 ` [PATCH 12/12 v3] xen/arm: vpl011: Update documentation for vuart console support Bhupinder Thakur
2017-05-11 11:19   ` Wei Liu
2017-05-16 23:10   ` Stefano Stabellini
2017-05-11 11:10 ` Wei Liu [this message]
2017-05-12  9:32   ` [PATCH 06/12 v3] xen/arm: vpl011: Add a new vuart node in the xenstore Bhupinder Thakur
2017-05-16 15:18     ` Wei Liu
2017-05-22 11:03       ` Bhupinder Thakur
2017-05-30 11:58         ` Wei Liu
2017-06-01  8:43           ` Bhupinder Thakur

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=20170511111011.sus25wpfarqdto6m@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=bhupinder.thakur@linaro.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.