From nobody Sat May 18 09:01:26 2024 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; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1653552807219497.95777649988895; Thu, 26 May 2022 01:13:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.337480.562076 (Exim 4.92) (envelope-from ) id 1nu8bv-000794-U9; Thu, 26 May 2022 08:12:47 +0000 Received: by outflank-mailman (output) from mailman id 337480.562076; Thu, 26 May 2022 08:12:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nu8bv-00078x-RF; Thu, 26 May 2022 08:12:47 +0000 Received: by outflank-mailman (input) for mailman id 337480; Thu, 26 May 2022 08:12:46 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nu8bu-00078r-Dr for xen-devel@lists.xenproject.org; Thu, 26 May 2022 08:12:46 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 9de4a670-dccb-11ec-837f-e5687231ffcc; Thu, 26 May 2022 10:12:45 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 45DF21474; Thu, 26 May 2022 01:12:42 -0700 (PDT) Received: from e125770.cambridge.arm.com (e125770.cambridge.arm.com [10.1.195.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A89793F70D; Thu, 26 May 2022 01:12:40 -0700 (PDT) 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" X-Inumbo-ID: 9de4a670-dccb-11ec-837f-e5687231ffcc From: Luca Fancellu To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, wei.chen@arm.com, andrew.cooper3@citrix.com, Wei Liu , Anthony PERARD , Juergen Gross Subject: [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move Date: Thu, 26 May 2022 09:12:30 +0100 Message-Id: <20220526081230.3194-1-luca.fancellu@arm.com> X-Mailer: git-send-email 2.17.1 X-ZM-MESSAGEID: 1653552808225100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit 92ea9c54fc81 ("arm/dom0less: assign dom0less guests to cpupools") introduced a way to start a domain directly on a certain cpupool, adding a "cpupool_id" member to struct xen_domctl_createdomain. This was done to be able to start dom0less guests in different pools than cpupool0, but the toolstack can benefit from it because it can now use the struct member directly instead of creating the guest in cpupool0 and then moving it to the target cpupool. Suggested-by: Andrew Cooper Signed-off-by: Luca Fancellu Acked-by: Anthony PERARD Reviewed-by: Juergen Gross --- tools/libs/light/libxl_create.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_creat= e.c index 69ec405858a8..2339f09e95a6 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -633,6 +633,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_conf= ig *d_config, .max_maptrack_frames =3D b_info->max_maptrack_frames, .grant_opts =3D XEN_DOMCTL_GRANT_version(b_info->max_grant_ver= sion), .vmtrace_size =3D ROUNDUP(b_info->vmtrace_buf_kb << 10, XC_PAG= E_SHIFT), + .cpupool_id =3D info->poolid, }; =20 if (info->type !=3D LIBXL_DOMAIN_TYPE_PV) { @@ -757,13 +758,6 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_con= fig *d_config, */ assert(libxl_domid_valid_guest(*domid)); =20 - ret =3D xc_cpupool_movedomain(ctx->xch, info->poolid, *domid); - if (ret < 0) { - LOGED(ERROR, *domid, "domain move fail"); - rc =3D ERROR_FAIL; - goto out; - } - dom_path =3D libxl__xs_get_dompath(gc, *domid); if (!dom_path) { rc =3D ERROR_FAIL; --=20 2.17.1