All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v4 3/6] libxl: initialise the build info before calling prepare_config
Date: Thu, 21 Jan 2016 17:51:29 +0100	[thread overview]
Message-ID: <1453395092-88090-4-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1453395092-88090-1-git-send-email-roger.pau@citrix.com>

libxl__arch_domain_prepare_config has access to the libxl_domain_build_info
struct, so make sure it's properly initialised. Note that prepare_config is
called from within libxl__domain_make.

This is not a bug at the moment, because prepare_config doesn't access
libxl_domain_build_info yet, but this is likely going to change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v3:
 - Reword commit message to make it clear that prepare_config is called from
   domain_make, and that the fact that build_info is not initialised is not
   a bug ATM because prepare_config doesn't make use of it.
---
 tools/libxl/libxl_create.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index b669359..c7700a7 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -892,6 +892,12 @@ static void initiate_domain_create(libxl__egc *egc,
         goto error_out;
     }
 
+    ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info);
+    if (ret) {
+        LOG(ERROR, "Unable to set domain build info defaults");
+        goto error_out;
+    }
+
     ret = libxl__domain_make(gc, d_config, &domid, &state->config);
     if (ret) {
         LOG(ERROR, "cannot make domain: %d", ret);
@@ -903,12 +909,6 @@ static void initiate_domain_create(libxl__egc *egc,
     dcs->guest_domid = domid;
     dcs->dmss.dm.guest_domid = 0; /* means we haven't spawned */
 
-    ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info);
-    if (ret) {
-        LOG(ERROR, "Unable to set domain build info defaults");
-        goto error_out;
-    }
-
     if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
         (libxl_defbool_val(d_config->b_info.u.hvm.nested_hvm) &&
          libxl_defbool_val(d_config->b_info.u.hvm.altp2m))) {
-- 
1.9.5 (Apple Git-50.3)


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

  parent reply	other threads:[~2016-01-21 16:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 16:51 [PATCH v4 0/6] HVMlite: DomU fixes and a Dom0 preparatory patch Roger Pau Monne
2016-01-21 16:51 ` [PATCH v4 1/6] libelf: rewrite symtab/strtab loading for Dom0 Roger Pau Monne
2016-01-21 17:29   ` Ian Jackson
2016-01-21 17:55     ` Roger Pau Monné
2016-01-21 18:44       ` Ian Jackson
2016-01-22  8:11       ` Jan Beulich
2016-01-22  9:58         ` Roger Pau Monné
2016-01-21 16:51 ` [PATCH v4 2/6] libxl: introduce LIBXL_VGA_INTERFACE_TYPE_UNKNOWN Roger Pau Monne
2016-01-22 10:59   ` Ian Campbell
2016-01-21 16:51 ` Roger Pau Monne [this message]
2016-01-22 11:00   ` [PATCH v4 3/6] libxl: initialise the build info before calling prepare_config Ian Campbell
2016-01-21 16:51 ` [PATCH v4 4/6] x86/PV: allow PV guests to have an emulated PIT Roger Pau Monne
2016-01-22 10:48   ` Jan Beulich
2016-01-22 11:03     ` Ian Campbell
2016-01-21 16:51 ` [PATCH v4 5/6] libxl: add options to enable/disable emulated devices Roger Pau Monne
2016-01-22 17:04   ` Roger Pau Monné
2016-01-25  9:33     ` Ian Campbell
2016-01-21 16:51 ` [PATCH v4 6/6] x86/HVM: report the set of enabled emulated devices through CPUID Roger Pau Monne
2016-01-22 10:57   ` Jan Beulich
2016-01-22 12:43     ` Roger Pau Monné
2016-01-22 13:24       ` Jan Beulich
2016-01-22 14:41         ` Roger Pau Monné
2016-01-22 15:02           ` Jan Beulich
2016-01-22 15:41             ` Roger Pau Monné
2016-01-22 13:34       ` Andrew Cooper
2016-01-22 14:59         ` Roger Pau Monné
2016-01-22 15:31           ` Jan Beulich
2016-01-22 15:51             ` Roger Pau Monné
2016-01-25 11:23               ` Jan Beulich

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=1453395092-88090-4-git-send-email-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=ian.campbell@citrix.com \
    --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.