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 v3 07/10] libxl: create: setdefault: Make libxl_physinfo info[1]
Date: Fri, 11 Oct 2019 17:55:46 +0100	[thread overview]
Message-ID: <20191011165549.21639-4-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <20191011165549.21639-1-ian.jackson@eu.citrix.com>

No functional change.  This will let us make it into a pointer without
textual change other than to the definition.

While we are here, fix some style errors (missing { }).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wl@xen.org>
---
v2: New patch in this version of the series.
---
 tools/libxl/libxl_create.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index b394312d98..9c56a914ca 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -30,10 +30,10 @@
 int libxl__domain_create_info_setdefault(libxl__gc *gc,
                                          libxl_domain_create_info *c_info)
 {
-    libxl_physinfo info;
+    libxl_physinfo info[1];
     int rc;
 
-    rc = libxl_get_physinfo(CTX, &info);
+    rc = libxl_get_physinfo(CTX, info);
     if (rc)
         return rc;
 
@@ -45,11 +45,11 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
     libxl__arch_domain_create_info_setdefault(gc, c_info);
 
     if (c_info->type != LIBXL_DOMAIN_TYPE_PV) {
-        if (info.cap_hap)
+        if (info->cap_hap) {
             libxl_defbool_setdefault(&c_info->hap, true);
-        else if (info.cap_shadow)
+        } else if (info->cap_shadow) {
             libxl_defbool_setdefault(&c_info->hap, false);
-        else {
+        } else {
             LOG(ERROR, "neither hap nor shadow paging available");
             return ERROR_INVAL;
         }
@@ -63,12 +63,12 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
     if (!c_info->ssidref)
         c_info->ssidref = SECINITSID_DOMU;
 
-    if (info.cap_hvm_directio &&
+    if (info->cap_hvm_directio &&
         (c_info->passthrough == LIBXL_PASSTHROUGH_UNKNOWN)) {
         c_info->passthrough = ((c_info->type == LIBXL_DOMAIN_TYPE_PV) ||
-                               !info.cap_iommu_hap_pt_share) ?
+                               !info->cap_iommu_hap_pt_share) ?
             LIBXL_PASSTHROUGH_SYNC_PT : LIBXL_PASSTHROUGH_SHARE_PT;
-    } else if (!info.cap_hvm_directio) {
+    } else if (!info->cap_hvm_directio) {
         c_info->passthrough = LIBXL_PASSTHROUGH_DISABLED;
     }
 
-- 
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-11 16:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 16:55 [Xen-devel] [XEN PATCH for-4.13 v3 00/10] libxl memkb & pt defaulting Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 05/10] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl Ian Jackson
2019-10-14 12:45   ` Anthony PERARD
2019-10-14 16:50   ` Anthony PERARD
2019-10-14 16:53     ` Ian Jackson
2019-10-14 17:00     ` Ian Jackson
2019-10-15 10:37       ` Anthony PERARD
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 06/10] libxl: Remove/deprecate libxl_get_required_*_memory from the API Ian Jackson
2019-10-11 16:55 ` Ian Jackson [this message]
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 08/10] libxl: create: setdefault: Move physinfo into config_setdefault Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 09/10] libxl: Move domain_create_info_setdefault earlier Ian Jackson
2019-10-14 12:53   ` Anthony PERARD
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 10/10] libxl/xl: Overhaul passthrough setting logic Ian Jackson
2019-10-14 16:05   ` Anthony PERARD
2019-10-14 16:10     ` 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=20191011165549.21639-4-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.