All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [RFC 5/6] libxl: Handle Linux stubdomain specifique QEMU option.
Date: Mon, 22 Apr 2013 14:37:42 +0100	[thread overview]
Message-ID: <51753D26.2020504@citrix.com> (raw)
In-Reply-To: <1366363902.19111.78.camel@zakaz.uk.xensource.com>

On 19/04/13 10:31, Ian Campbell wrote:
> On Wed, 2013-04-17 at 20:09 +0100, Anthony PERARD wrote:
>> @@ -372,14 +375,17 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>>                        "-xen-domid",
>>                        libxl__sprintf(gc, "%d", guest_domid), NULL);
>>  
>> -    flexarray_append(dm_args, "-chardev");
>> -    flexarray_append(dm_args,
>> -                     libxl__sprintf(gc, "socket,id=libxl-cmd,"
>> -                                    "path=%s/qmp-libxl-%d,server,nowait",
>> -                                    libxl__run_dir_path(), guest_domid));
>> +    /* There is currently no way to access the QMP socket in the stubdom */
> 
> This rules out a bunch of interesting/useful functionality doesn't it?

Yes, it does. Anything that it's hotplug (even cd-rom). So I'll have to
find a way to the socket from dom0.

>> +    if (!libxl_defbool_val(b_info->device_model_stubdomain)) {
>> +        flexarray_append(dm_args, "-chardev");
>> +        flexarray_append(dm_args,
>> +                         libxl__sprintf(gc, "socket,id=libxl-cmd,"
>> +                                        "path=%s/qmp-libxl-%d,server,nowait",
>> +                                        libxl__run_dir_path(), guest_domid));
>>  
>> -    flexarray_append(dm_args, "-mon");
>> -    flexarray_append(dm_args, "chardev=libxl-cmd,mode=control");
>> +        flexarray_append(dm_args, "-mon");
>> +        flexarray_append(dm_args, "chardev=libxl-cmd,mode=control");
>> +    }
>>  
>>      if (b_info->type == LIBXL_DOMAIN_TYPE_PV) {
>>          flexarray_append(dm_args, "-xen-attach");
> 
>> @@ -733,7 +748,7 @@ static int libxl__vfb_and_vkb_from_hvm_guest_config(libxl__gc *gc,
>>  
>>  static int libxl__write_stub_dmargs(libxl__gc *gc,
>>                                      int dm_domid, int guest_domid,
>> -                                    char **args)
>> +                                    char **args, bool linux_stubdom)
>>  {
>>      libxl_ctx *ctx = libxl__gc_owner(gc);
>>      int i;
>> @@ -761,10 +776,28 @@ static int libxl__write_stub_dmargs(libxl__gc *gc,
>>      i = 1;
>>      dmargs[0] = '\0';
>>      while (args[i] != NULL) {
>> -        if (strcmp(args[i], "-sdl") && strcmp(args[i], "-M") && strcmp(args[i], "xenfv")) {
>> -            strcat(dmargs, " ");
>> -            strcat(dmargs, args[i]);
>> +        if (!linux_stubdom) {
>> +            if (!(strcmp(args[i], "-sdl") && strcmp(args[i], "-M") && strcmp(args[i], "xenfv"))) {
>> +                i++;
>> +                continue;
>> +            }
>> +        } else {
>> +            if (!strcmp(args[i], "-sdl")) {
>> +                i++;
>> +                continue;
>> +            }
>> +            if (!strcmp(args[i], "-incoming")
>> +                || !strcmp(args[i], "-vnc")
>> +                || !strcmp(args[i], "-vga")) {
>> +                i += 2;
>> +                continue;
>> +            }
>> +            if (!strcmp(args[i], "-serial")) {
>> +                args[i+1] = "/dev/hvc1";
>> +            }
> 
> Is this all temporary until the various features are supported?

Yes. Well, a better way to handle that would be to alter the domain
build_config were all the options the user wants are present.

-- 
Anthony PERARD

  reply	other threads:[~2013-04-22 13:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 19:09 [RFC 0/6] RFC Linux based stub-domain Anthony PERARD
2013-04-17 19:09 ` [RFC 1/6] linux-stubdomain: Compile QEMU Anthony PERARD
2013-04-17 19:09 ` [RFC 2/6] linux-stubdomain: Compile Linux Anthony PERARD
2013-04-19 10:33   ` Stefano Stabellini
2013-04-22 13:46     ` Anthony PERARD
2013-04-22 13:59       ` Daniel De Graaf
2013-04-22 14:09       ` Samuel Thibault
2013-04-17 19:09 ` [RFC 3/6] linux-stubdomain: Build a disk image Anthony PERARD
2013-04-19  9:26   ` Ian Campbell
2013-04-19 11:58     ` Anthony PERARD
2013-04-19 12:08       ` Ian Campbell
2013-04-19 13:53         ` Samuel Thibault
2013-04-17 19:09 ` [RFC 4/6] libxl: Add "stubdomain_version" to domain_build_info Anthony PERARD
2013-04-19  9:29   ` Ian Campbell
2013-04-22 13:31     ` Anthony PERARD
2013-04-22 14:36       ` Ian Campbell
2013-04-17 19:09 ` [RFC 5/6] libxl: Handle Linux stubdomain specifique QEMU option Anthony PERARD
2013-04-19  9:31   ` Ian Campbell
2013-04-22 13:37     ` Anthony PERARD [this message]
2013-04-17 19:09 ` [RFC 6/6] libxl: Build the domain with a Linux based stubdomain Anthony PERARD
2013-04-19  9:17 ` [RFC 0/6] RFC Linux based stub-domain Ian Campbell
2013-04-19 11:11   ` Anthony PERARD
2013-04-19 12:04 ` David Vrabel

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=51753D26.2020504@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xen.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.