All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Cc: xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH 08/12 v3] xen/arm: vpl011: Modify xenconsole to support multiple consoles
Date: Thu, 25 May 2017 11:24:01 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1705251122000.18759@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <CACtJ1JSKnpjnubv7RRyomdwhVK892KKe=55i6SWsOq2Syv2U3w@mail.gmail.com>

On Thu, 25 May 2017, Bhupinder Thakur wrote:
> Hi,
> 
> On 17 May 2017 at 05:11, Stefano Stabellini <sstabellini@kernel.org> wrote:
> > On Wed, 10 May 2017, Bhupinder Thakur wrote:
> >> Xenconsole supports only PV console currently. This patch adds support
> >> for supporting multiple consoles.
> >>
> >> This patch modifies different data structures and APIs used
> >> in xenconsole to support multiple consoles.
> >>
> >> Change summary:
> >>
> >> 1. Split the domain structure into a console structure and the
> >>    domain structure, where each console structure represents one
> >>    console.
> >>
> >> 2. Modify different APIs such as buffer_append() etc. to take
> >>    console structure as input and perform per console specific
> >>    operations.
> >>
> >> 3. Define a generic console_create_ring(), which sets up the
> >>    ring buffer and event channel for each console.
> >>
> >> 3. Modify domain_create_ring() to use console_create_ring().
> >>
> >> 4. Modifications in handle_ring_read() to read ring buffer data
> >>    from multiple consoles.
> >>
> >> 5. Add log file support for multiple consoles.
> >>
> >> Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
> >
> > There is something wrong with this patch: I cannot apply it.
> >
> > Also, it is still way to big for me to review. I cannot track all the
> > changes and figure out if they are correct.
> >
> > One option is to introduce struct console in one patch, with only one
> > struct console per domain. Then the second patch could introduce
> > multiple struct console with the helpers such as console_iter_void_arg1.
> >
> > Finally the third patch could add vuart support.
> >
> I have divided the changes into 4 patches:
> 
> patch#1: This patch introduces the console structure and modifies the
> code to use the new console structure.
> 
> patch#2: This patch modifies the functions to take console structure
> as input instead of domain structure. Also it renames the console
> specific functions to start with "console_" prefix instead of
> "domain_" prefix. For example - domain_create_tty() is renamed to
> console_create_tty().
> 
> patch#3: This patch adds the support for multiple consoles and
> introduces the iterator functions to operate on multiple consoles.
> 
> patch#4: Finally this patch adds support for a new vuart console.

Thank you, it looks better on paper


> >> -static int create_domain_log(struct domain *dom)
> >> +static int create_console_log(struct console *con)
> >>  {
> >>       char logfile[PATH_MAX];
> >>       char *namepath, *data, *s;
> >>       int fd;
> >>       unsigned int len;
> >> +     struct domain *dom = con->d;
> >>
> >>       namepath = xs_get_domain_path(xs, dom->domid);
> >>       s = realloc(namepath, strlen(namepath) + 6);
> >> @@ -314,7 +443,9 @@ static int create_domain_log(struct domain *dom)
> >>               return -1;
> >>       }
> >>
> >> -     snprintf(logfile, PATH_MAX-1, "%s/guest-%s.log", log_dir, data);
> >> +     snprintf(logfile, PATH_MAX-1, "%s%s/guest-%s.log",
> >> +                      log_dir, con->xspath, data);
> >
> > This changes the log directory, right? Are the new directories created
> > correctly by the install scripts?
> I will correct this. There should be no change in the path for PV
> console log. I think by default guest logging is disabled. How can I
> enable the logging to test it? I believe some option needs to be
> passed while spawning xenconsoled?

Yes, it looks like it's the -l option, see:

		case 'l':
		        if (!strcmp(optarg, "all")) {
			      log_hv = 1;
			      log_guest = 1;
			} else if (!strcmp(optarg, "hv")) {
			      log_hv = 1;
			} else if (!strcmp(optarg, "guest")) {
			      log_guest = 1;
			}

in main.c

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

  reply	other threads:[~2017-05-25 18:24 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 [this message]
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 ` [PATCH 06/12 v3] xen/arm: vpl011: Add a new vuart node in the xenstore Wei Liu
2017-05-12  9:32   ` 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=alpine.DEB.2.10.1705251122000.18759@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=bhupinder.thakur@linaro.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@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.