From patchwork Mon Oct 1 18:57:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 147929 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4263596lji; Mon, 1 Oct 2018 11:59:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Kgwgd9ibF3sbjpoL8ixceZfj3TkILofSQ+zAgn1MZd/RdAidBLmXadowUIg34OtpDR289 X-Received: by 2002:a24:aa41:: with SMTP id y1-v6mr11500855iti.91.1538420397380; Mon, 01 Oct 2018 11:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538420397; cv=none; d=google.com; s=arc-20160816; b=OWDij8Hn+abQ+DrmYYttiy3IxHCyV/GuQQPN5y2IwWUA64YmiEA8JKK+2VKfvxbbUp l3x7MhARFmK3ENiDbR1MO6Mnr16t4AjJVedhKC5IQMMJy9J1OtLseIUEHWfzZo5zWIhl xmb58/TF+0WsHExvXubgNAAIfRtGVyNLhN/35HNsRcDH3r4I2MSkk03MXhsFJ53UcpwB vaU6ecW0sEdXY3kpFjfNG1fUZCRsr5U9y6fIVyWRgTrKCyvBjjT63QLv3fqxw8q9tDyH n4AJzhZWOr5191NPhcW6+fGJszggYIj7LMMvOkAprXDkkfOJAakCBlEfWAdDSsBRwuGT g1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from; bh=BeZ1k59stP4OOEiBfTB28XIASS1Ui0DNNiIs1dqRLXs=; b=B9Q9afhqPlTwKPcBPvU6w+91eNiIXacZp1xl4Up4jLX0siu7NEuff7gtI6TApYYSJV c46iTT4Ho+pP1+1PdjN92o8qJg0aav9D8AxA2R18AjEc9MGCrsIH2TNXalcFSZZ0+Uq5 lffQyUj6n7pIyoJhv1fK8HY8jV6+eTeTnrXjhzSOPD3Xd7GJCnWvsTDzzZF3YZ12Cgvw uzre2V9uv/9g90d0SIBDhv6NoPjDapzOTVUrPc9ituO8j5/a1lpVSx1WvsZFkVL5r+DX fTVJHh915vYn+uOJYQDOevuaieY+swW7l/g68JET5eUWs5k/dkAuYjArq5Kpy5tqN/ce VnYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@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.google.com with ESMTPS id p194-v6si7989292iod.205.2018.10.01.11.59.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 11:59:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1g73Nv-0001Fb-6P; Mon, 01 Oct 2018 18:57:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1g73Nt-0001FO-U1 for xen-devel@lists.xenproject.org; Mon, 01 Oct 2018 18:57:33 +0000 X-Inumbo-ID: 04baea69-c5ac-11e8-a6a9-d7ebe60f679a Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 04baea69-c5ac-11e8-a6a9-d7ebe60f679a; Mon, 01 Oct 2018 18:58:44 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 94F2015AD; Mon, 1 Oct 2018 11:57:32 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.emea.arm.com [10.4.12.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 57E453F5B7; Mon, 1 Oct 2018 11:57:31 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 1 Oct 2018 19:57:19 +0100 Message-Id: <20181001185721.15467-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181001185721.15467-1-julien.grall@arm.com> References: <20181001185721.15467-1-julien.grall@arm.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 2/3] tools/libxl: Deprecate PV fields kernel, ramdisk, cmdline X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wei.liu2@citrix.com, Julien Grall , sstabellini@kernel.org, ian.jackson@eu.citrix.com, roger.pau@citrix.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The PV fields kernel, ramdisk, cmdline are only there for compatibility with old toolstack. Instead of manually copying them over to there new field, use the deprecated_by attribute in the IDL. Suggested-by: Roger Pau Monné Signed-off-by: Julien Grall Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- Changes in v3: - Patch added --- tools/libxl/libxl_create.c | 19 ------------------- tools/libxl/libxl_types.idl | 6 +++--- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 580320d272..fe97eebdea 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -368,25 +368,6 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, b_info->shadow_memkb = 0; if (b_info->u.pv.slack_memkb == LIBXL_MEMKB_DEFAULT) b_info->u.pv.slack_memkb = 0; - - /* For compatibility, fill in b_info->kernel|ramdisk|cmdline - * with the value in u.pv, later processing will use - * b_info->kernel|ramdisk|cmdline only. - * User with old APIs that passes u.pv.kernel|ramdisk|cmdline - * is not affected. - */ - if (!b_info->kernel && b_info->u.pv.kernel) { - b_info->kernel = b_info->u.pv.kernel; - b_info->u.pv.kernel = NULL; - } - if (!b_info->ramdisk && b_info->u.pv.ramdisk) { - b_info->ramdisk = b_info->u.pv.ramdisk; - b_info->u.pv.ramdisk = NULL; - } - if (!b_info->cmdline && b_info->u.pv.cmdline) { - b_info->cmdline = b_info->u.pv.cmdline; - b_info->u.pv.cmdline = NULL; - } break; case LIBXL_DOMAIN_TYPE_PVH: libxl_defbool_setdefault(&b_info->u.pvh.pvshim, false); diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 2cceb8c057..3b8f967651 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -588,12 +588,12 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("rdm_mem_boundary_memkb", MemKB), ("mca_caps", uint64), ])), - ("pv", Struct(None, [("kernel", string), + ("pv", Struct(None, [("kernel", string, {'deprecated_by': 'kernel'}), ("slack_memkb", MemKB), ("bootloader", string, {'deprecated_by': 'bootloader'}), ("bootloader_args", libxl_string_list, {'deprecated_by': 'bootloader_args'}), - ("cmdline", string), - ("ramdisk", string), + ("cmdline", string, {'deprecated_by': 'cmdline'}), + ("ramdisk", string, {'deprecated_by': 'ramdisk'}), ("features", string, {'const': True}), # Use host's E820 for PCI passthrough. ("e820_host", libxl_defbool),