All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Juergen Gross <jgross@suse.com>
Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com,
	George.Dunlap@eu.citrix.com, ian.jackson@eu.citrix.com,
	cyliu@suse.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 3/3] libxl: add domain config parameter to force start of qemu
Date: Mon, 28 Mar 2016 10:50:00 -0400	[thread overview]
Message-ID: <20160328145000.GC17944@char.us.oracle.com> (raw)
In-Reply-To: <1458631763-16644-4-git-send-email-jgross@suse.com>

On Tue, Mar 22, 2016 at 08:29:23AM +0100, Juergen Gross wrote:
> Today the device model (qemu) is started for a pv domain only in case
> a device requiring qemu is specified in the domain configuration
> (qdisk, vfb, channel). If there is no such device the device model
> isn't started and hence it is possible to add such a device to the
> domain later.
> 
> Add a domain configuration parameter to specify the device model is
> to be started in any case. This will enable adding devices with a
> qemu based backend later.

.. s/devices/PV devices/

As surely PV guests can't use emulated devices. Or could they? That
would be quite interesting in a not kind of fun way.

> 
> While the optimal solution would be to start the device model
> automatically when needed this would require some major rework of
> libxl at multiple places.

But you are not using this now (late start of QEMU), so why this patch?

> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  docs/man/xl.cfg.pod.5       | 6 ++++++
>  tools/libxl/libxl_create.c  | 1 +
>  tools/libxl/libxl_dm.c      | 5 +++++
>  tools/libxl/libxl_types.idl | 1 +
>  tools/libxl/xl_cmdimpl.c    | 3 +++
>  5 files changed, 16 insertions(+)
> 
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index a4cc1b3..a3611a6 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -1956,6 +1956,12 @@ xen-qemudepriv-domid$domid or xen-qemudepriv-shared or root.
>  Please note that running QEMU as non-root causes migration and PCI
>  passthrough not to work properly.
>  
> +=item B<device_model_always=BOOLEAN>
> +
> +If true, start the device model for paravirtualized domains even if this isn't
> +required according to the configured devices. This allows to add such devices
> +later when the domain is already running.
> +
>  =back
>  
>  =head2 Keymaps
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 0e2b0a0..52a0a2f 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -73,6 +73,7 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
>          return ERROR_INVAL;
>      }
>  
> +    libxl_defbool_setdefault(&b_info->device_model_always, false);
>      libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
>  
>      if (libxl_defbool_val(b_info->device_model_stubdomain) &&
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index 361e584..767959d 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -2115,6 +2115,11 @@ int libxl__need_xenpv_qemu(libxl__gc *gc, libxl_domain_config *d_config)
>      if (libxl__get_domid(gc, &domid))
>          goto out;
>  
> +    if (libxl_defbool_val(d_config->b_info.device_model_always)) {
> +        ret = 1;
> +        goto out;
> +    }
> +
>      if (d_config->num_vfbs > 0) {
>          ret = 1;
>          goto out;
> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index 304aa11..8ff9050 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -451,6 +451,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
>      ("device_model_ssidref", uint32),
>      ("device_model_ssid_label", string),
>      ("device_model_user", string),
> +    ("device_model_always", libxl_defbool),
>  
>      # extra parameters pass directly to qemu, NULL terminated
>      ("extra",            libxl_string_list),
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index a3610fc..0fdca73 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2269,6 +2269,9 @@ skip_usbdev:
>      }
>  
>      /* parse device model arguments, this works for pv, hvm and stubdom */
> +    xlu_cfg_get_defbool (config, "device_model_always",
> +                         &b_info->device_model_always, 0);
> +
>      if (!xlu_cfg_get_string (config, "device_model", &buf, 0)) {
>          fprintf(stderr,
>                  "WARNING: ignoring device_model directive.\n"
> -- 
> 2.6.2
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

  reply	other threads:[~2016-03-28 14:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22  7:29 [PATCH v2 0/3] libxl: add support for qemu base pvusb backend Juergen Gross
2016-03-22  7:29 ` [PATCH v2 1/3] libxl: make libxl__need_xenpv_qemu() operate on domain config Juergen Gross
2016-03-22  7:29 ` [PATCH v2 2/3] libxl: add new pvusb backend "qusb" provided by qemu Juergen Gross
2016-03-28 14:55   ` Konrad Rzeszutek Wilk
2016-03-29  4:53     ` Juergen Gross
2016-03-29 14:24       ` Konrad Rzeszutek Wilk
2016-03-29 14:28         ` Juergen Gross
2016-03-22  7:29 ` [PATCH v2 3/3] libxl: add domain config parameter to force start of qemu Juergen Gross
2016-03-28 14:50   ` Konrad Rzeszutek Wilk [this message]
2016-03-29  4:44     ` Juergen Gross
2016-03-29 14:27       ` Konrad Rzeszutek Wilk
2016-03-29 14:32         ` Juergen Gross
2016-03-22 15:31 ` [PATCH v2 0/3] libxl: add support for qemu base pvusb backend Juergen Gross

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=20160328145000.GC17944@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=cyliu@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@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.