From nobody Mon Nov 23 22:39:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17920256077521003.9625545898132; Wed, 14 Oct 2026 17:53:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1449655.1665319 (Exim 4.92) (envelope-from ) id 1xH9id-0003Gp-PU; Thu, 15 Oct 2026 00:53:15 +0000 Received: by outflank-mailman (output) from mailman id 1449655.1665319; Thu, 15 Oct 2026 00:53:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9id-0003Gi-MD; Thu, 15 Oct 2026 00:53:15 +0000 Received: by outflank-mailman (input) for mailman id 1449655; Thu, 15 Oct 2026 00:53:14 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9ic-0003F3-BC for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 00:53:14 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xH9ib-0072MM-OS for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 02:53:13 +0200 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6ad0234b-e002-0a2a0a5209dd-0a2a4507b636-42 for ; Thu, 15 Oct 2026 02:53:13 +0200 Received: from [74.104.188.4] (helo=mailhost.m5p.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6ad023f8-b4ea-0a2a45070019-4a68bc04534c-3 for ; Thu, 15 Oct 2026 02:53:13 +0200 Received: from m5p.com (mailhost.m5p.com [IPv6:fdc4:6ee8:648f:6bf6:0:0:0:f7]) by mailhost.m5p.com (8.18.1/8.17.1) with ESMTPS id 69F0r6x2092129 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 14 Oct 2026 20:53:11 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.18.1/8.15.2/Submit) id 69F0r65D092128; Wed, 14 Oct 2026 17:53:06 -0700 (PDT) (envelope-from ehem) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; none Message-ID: In-Reply-To: References: From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Anthony PERARD Date: Tue, 13 Oct 2026 20:15:00 -0700 Subject: [PATCH 1/3] tools/xl: use Make variable to retrieve xl object filename list X-Spam-Status: No, score=1.2 required=10.0 tests=DATE_IN_PAST_12_24, KHOP_HELO_FCRDNS,T_SPF_HELO_PERMERROR,T_SPF_PERMERROR autolearn=no autolearn_force=no version=4.0.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on mattapan.m5p.com. X-purgate-ID: tlsNG-ef75cf/1792025593-A48C9AE4-4BEB20D2/0/0 X-purgate-type: clean X-purgate-size: 841 X-ZM-MESSAGEID: 1792025608826158500 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Irrelevant now, but $^ potentially makes the Makefile more maintainable. Hopefully some future author finds this valuable. --- tools/xl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xl/Makefile b/tools/xl/Makefile index e4eed8be13..8fbd4ae778 100644 --- a/tools/xl/Makefile +++ b/tools/xl/Makefile @@ -34,7 +34,7 @@ $(XL_OBJS): CFLAGS +=3D -include $(XEN_ROOT)/tools/config= .h # libxl_json.h needs i all: xl =20 xl: $(XL_OBJS) - $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxenutil) $(LDLIBS_libxenlig= ht) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) $(XEN_JSON_LIBS) $(APPEND= _LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_libxenutil) $(LDLIBS_libxenlight) $(LD= LIBS_libxentoollog) $(LDLIBS_libxenstore) $(XEN_JSON_LIBS) $(APPEND_LDFLAGS) =20 .PHONY: install install: all --=20 2.47.3 From nobody Mon Nov 23 22:39:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1792025734897403.6472549879546; Wed, 14 Oct 2026 17:55:34 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1449695.1665337 (Exim 4.92) (envelope-from ) id 1xH9kg-0005IN-Bo; Thu, 15 Oct 2026 00:55:22 +0000 Received: by outflank-mailman (output) from mailman id 1449695.1665337; Thu, 15 Oct 2026 00:55:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9kg-0005IG-8L; Thu, 15 Oct 2026 00:55:22 +0000 Received: by outflank-mailman (input) for mailman id 1449695; Thu, 15 Oct 2026 00:55:20 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9ke-0005H5-Ls for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 00:55:20 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xH9kd-0072aV-Vv for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 02:55:19 +0200 Received: from [10.42.69.3] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6ad02470-bab6-0a2a0a5309dd-0a2a450399e6-6 for ; Thu, 15 Oct 2026 02:55:19 +0200 Received: from [74.104.188.4] (helo=mailhost.m5p.com) by tlsNG-33051d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6ad023fe-fae8-0a2a45030019-4a68bc04c2dc-3 for ; Thu, 15 Oct 2026 02:53:19 +0200 Received: from m5p.com (mailhost.m5p.com [IPv6:fdc4:6ee8:648f:6bf6:0:0:0:f7]) by mailhost.m5p.com (8.18.1/8.17.1) with ESMTPS id 69F0rCts092135 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 14 Oct 2026 20:53:17 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.18.1/8.15.2/Submit) id 69F0rC1i092134; Wed, 14 Oct 2026 17:53:12 -0700 (PDT) (envelope-from ehem) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; none Message-ID: In-Reply-To: References: From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Anthony PERARD Date: Tue, 13 Oct 2026 19:16:41 -0700 Subject: [PATCH 2/3] tools/xl: free loaded configuration data earlier in create_domain() X-Spam-Status: No, score=1.2 required=10.0 tests=DATE_IN_PAST_12_24, KHOP_HELO_FCRDNS,T_SPF_HELO_PERMERROR,T_SPF_PERMERROR autolearn=no autolearn_force=no version=4.0.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on mattapan.m5p.com. X-purgate-ID: tlsNG-33051d/1792025599-756834E9-5B50BEB9/0/0 X-purgate-type: clean X-purgate-size: 940 X-ZM-MESSAGEID: 1792025735504158500 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Rather than waiting for just before return, release the memory sooner. This potentially reduces process size due to be reused sooner. Also ensures it never gets into the daemon process. --- tools/xl/xl_vmcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index 93766f631b..76c2a07ee8 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -853,6 +853,8 @@ int create_domain(struct domain_create *dom_info) parse_config_data(config_source, config_data, config_len, &d_confi= g); } =20 + free(config_data); + if (!dom_info->ignore_global_affinity_masks) { libxl_domain_build_info *b_info =3D &d_config.b_info; =20 @@ -1200,8 +1202,6 @@ out: =20 libxl_domain_config_dispose(&d_config); =20 - free(config_data); - console_child_report(child_console); =20 if (deathw) --=20 2.47.3 From nobody Mon Nov 23 22:39:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 179202561756737.843835582746806; Wed, 14 Oct 2026 17:53:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1449665.1665328 (Exim 4.92) (envelope-from ) id 1xH9iq-0003uE-1U; Thu, 15 Oct 2026 00:53:28 +0000 Received: by outflank-mailman (output) from mailman id 1449665.1665328; Thu, 15 Oct 2026 00:53:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9ip-0003u5-Uh; Thu, 15 Oct 2026 00:53:27 +0000 Received: by outflank-mailman (input) for mailman id 1449665; Thu, 15 Oct 2026 00:53:26 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xH9io-0003pi-Bz for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 00:53:26 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xH9in-000UBg-Ns for xen-devel@lists.xenproject.org; Thu, 15 Oct 2026 02:53:25 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6ad0239e-8faa-0a2a0a5109dd-0a2a4502d336-42 for ; Thu, 15 Oct 2026 02:53:25 +0200 Received: from [74.104.188.4] (helo=mailhost.m5p.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6ad02404-6ca4-0a2a45020019-4a68bc04ec6b-3 for ; Thu, 15 Oct 2026 02:53:25 +0200 Received: from m5p.com (mailhost.m5p.com [IPv6:fdc4:6ee8:648f:6bf6:0:0:0:f7]) by mailhost.m5p.com (8.18.1/8.17.1) with ESMTPS id 69F0rI90092143 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 14 Oct 2026 20:53:23 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.18.1/8.15.2/Submit) id 69F0rIQu092142; Wed, 14 Oct 2026 17:53:18 -0700 (PDT) (envelope-from ehem) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; none Message-ID: <92156ced183670bbbcb2d3f9e2dca4d12f37ee7c.1792017144.git.ehem+xen@m5p.com> In-Reply-To: References: From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Anthony PERARD Date: Mon, 12 Oct 2026 18:03:49 -0700 Subject: [PATCH 3/3] tools/xl: move some logic needed only once earlier in create_domain() X-Spam-Status: No, score=0.9 required=10.0 tests=DATE_IN_PAST_24_48, KHOP_HELO_FCRDNS,T_SPF_HELO_PERMERROR,T_SPF_PERMERROR autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on mattapan.m5p.com. X-purgate-ID: tlsNG-720697/1792025605-317CA2AC-8EA945BF/0/0 X-purgate-type: clean X-purgate-size: 2519 X-ZM-MESSAGEID: 1792025619129158500 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The value of dom_info->console_autoconnect isn't going to change if a domain is rebooted. Nor does this logic need the lock to be held. As such moving this earlier makes sense. The policy domain is set once and then never changed. Similar to above simply move before the reboot start point. Signed-off-by: Elliott Mitchell --- tools/xl/xl_vmcontrol.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index 76c2a07ee8..ae7985122f 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -717,7 +717,8 @@ int create_domain(struct domain_create *dom_info) int restore_fd =3D -1; int restore_fd_to_close =3D -1; int send_back_fd =3D -1; - const libxl_asyncprogress_how *autoconnect_console_how; + const libxl_asyncprogress_how *autoconnect_console_how =3D NULL; + libxl_asyncprogress_how autoconnect_console_how_buf; int notify_pipe[2] =3D { -1, -1 }; struct save_file_header hdr; uint32_t domid_soft_reset =3D INVALID_DOMID; @@ -921,6 +922,19 @@ int create_domain(struct domain_create *dom_info) if (dryrun_only) goto out; =20 + if (dom_info->console_autoconnect) { + if (libxl_pipe(ctx, notify_pipe)) { + ret =3D ERROR_FAIL; + goto error_out; + } + autoconnect_console_how_buf.callback =3D autoconnect_console; + autoconnect_console_how_buf.for_callback =3D ¬ify_pipe[1]; + autoconnect_console_how =3D &autoconnect_console_how_buf; + } + + if (!libxl_domid_valid_guest(d_config.c_info.domid)) + d_config.c_info.domid =3D domid_policy; + start: assert(domid =3D=3D INVALID_DOMID); =20 @@ -938,22 +952,6 @@ start: } } =20 - libxl_asyncprogress_how autoconnect_console_how_buf; - if ( dom_info->console_autoconnect ) { - if (libxl_pipe(ctx, notify_pipe)) { - ret =3D ERROR_FAIL; - goto error_out; - } - autoconnect_console_how_buf.callback =3D autoconnect_console; - autoconnect_console_how_buf.for_callback =3D ¬ify_pipe[1]; - autoconnect_console_how =3D &autoconnect_console_how_buf; - }else{ - autoconnect_console_how =3D 0; - } - - if (!libxl_domid_valid_guest(d_config.c_info.domid)) - d_config.c_info.domid =3D domid_policy; - if ( restoring ) { libxl_domain_restore_params params; =20 --=20 2.47.3