All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Paul Durrant <pdurrant@gmail.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: [Xen-devel] [XEN PATCH for-4.13 v5 09/10] libxl: Move domain_create_info_setdefault earlier
Date: Fri, 18 Oct 2019 16:06:52 +0100	[thread overview]
Message-ID: <20191018150653.24862-10-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <20191018150653.24862-1-ian.jackson@eu.citrix.com>

We need this before we start to figure out the passthrough mode.

I have checked that nothing in libxl__domain_create_info_setdefault
nor the two implementations of ..._arch_... accesses anything else,
other than (i) the domain type (which this function is responsible for
setting and nothing before it looks at) (ii) c_info->ssidref (which is
defaulted by flask code near the top of
libxl__domain_config_setdefault and not accessed afterwards).

So no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
---
v3: New patch in this version of the series.
---
 tools/libxl/libxl_create.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 0670ef90ed..7869d54b32 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -972,6 +972,13 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
         goto error_out;
     }
 
+    ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info,
+                                               &physinfo);
+    if (ret) {
+        LOGD(ERROR, domid, "Unable to set domain create info defaults");
+        goto error_out;
+    }
+
     /* If target_memkb is smaller than max_memkb, the subsequent call
      * to libxc when building HVM domain will enable PoD mode.
      */
@@ -1011,13 +1018,6 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
         goto error_out;
     }
 
-    ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info,
-                                               &physinfo);
-    if (ret) {
-        LOGD(ERROR, domid, "Unable to set domain create info defaults");
-        goto error_out;
-    }
-
     if (d_config->b_info.shadow_memkb == LIBXL_MEMKB_DEFAULT
         && ok_to_default_memkb_in_create(gc))
         d_config->b_info.shadow_memkb =
-- 
2.11.0


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

  parent reply	other threads:[~2019-10-18 15:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 15:06 [Xen-devel] [XEN PATCH for-4.13 v5 00/10] libxl memkb & pt defaulting Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 01/10] libxl: Offer API versions 0x040700 and 0x040800 Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 02/10] xl: Pass libxl_domain_config to freemem(), instead of b_info Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 03/10] libxl: libxl__domain_config_setdefault: New function Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 04/10] libxl: libxl_domain_need_memory: Make it take a domain_config Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 05/10] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 06/10] libxl: Remove/deprecate libxl_get_required_*_memory from the API Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 07/10] libxl: create: setdefault: Make libxl_physinfo info[1] Ian Jackson
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 08/10] libxl: create: setdefault: Move physinfo into config_setdefault Ian Jackson
2019-10-18 15:06 ` Ian Jackson [this message]
2019-10-18 15:06 ` [Xen-devel] [XEN PATCH for-4.13 v5 10/10] libxl/xl: Overhaul passthrough setting logic Ian Jackson
2019-10-18 15:47   ` Julien Grall
2019-10-18 15:51     ` Ian Jackson
2019-10-18 15:53       ` Julien Grall
2019-10-18 15:56         ` Ian Jackson

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=20191018150653.24862-10-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=pdurrant@gmail.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.