From nobody Tue Nov 11 09:01:50 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1565016626; cv=none; d=zoho.com; s=zohoarc; b=jrlV4eKk4xCFmR0YkFikabnj3FZYyagnrOpbGqoUEjMoJH8na1UVKP2XGvJN++gkZsJLyCvADo2gN/VPxBq7O68NBZry0Z+D/dl/e5rCfRodL/jUtR+fPsY5oUvbULpFWI4+6h7fpbSBedPtG/AvRHZJ7ME04m/DNuiencu71Vs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565016626; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=OsuwEvORSD4VtdzT5m+Nb11DkIM6aImWpDloolFx55o=; b=UgDtas/ydPnYwhEQ7cSqnIFZZzmy8sssFjwoEeAnDkP05zte2R8mqvp8R4Wq4X3SE6Eot0WjDblzKjMXae+lezj0p3keTT89gegalnD39Rbo3GVQ+En5RLGIfT3ZLKUgLDkR+sJ3C7vnLbUKax0DLghFCEGx3jHh4xSJyIdFOQ4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) 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 156501662623170.40694540149241; Mon, 5 Aug 2019 07:50:26 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hueIW-0002hI-0q; Mon, 05 Aug 2019 14:49:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hueIU-0002h9-Er for xen-devel@lists.xenproject.org; Mon, 05 Aug 2019 14:49:14 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 30a9498f-b790-11e9-8980-bc764e045a96; Mon, 05 Aug 2019 14:49:13 +0000 (UTC) X-Inumbo-ID: 30a9498f-b790-11e9-8980-bc764e045a96 Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: xM+VGtOjSMzgyRP0EzrooL/V1q4hGZT+qmT97VIgxI36QcHo+4SCPXbxkjZOMbwytIK2znrK4n 1Py3aSmTPsZKLWX5U7KAg9TisJiluxPmgn/3XQU0NfP06DdX+dTd72MXyYHPA+tkatwY580rgA brwyr1qI0K82yyIJsEqrM/sBb8lnIwMpvRyol867mjepyo5hil9lbIpJRP6PFqWIT3rsbxXSKb j8VPVo1t7AFcFFpzpLwi3T6WwlUhivtN8InBSMEaAwRlFUZRq9Uc5wFS0wvFQcBcioCHY2Gmwp WRg= X-SBRS: 2.7 X-MesageID: 3994298 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,350,1559534400"; d="scan'208";a="3994298" From: Andrew Cooper To: Xen-devel Date: Mon, 5 Aug 2019 15:49:10 +0100 Message-ID: <20190805144910.20223-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] tools/xl: Make extra= usable in combination with 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: Anthony PERARD , Andrew Cooper , Wei Liu , Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" c/s 986aea7fbe "xl.cfg: add 'cmdline' in config file" introduced cmdline=3D= and make extra=3D and root=3D unusable if cmdline=3D was present. For the vm.cfg file itself, this makes sense. However, for development purposes it is very convenient to have a cmdline=3D in the cfg file, and sp= ecify extra=3D on the `xl create` command line. While updating the manpage, correct the entry for cmdline=3D. There is nev= er any appending which goes on with this option, but after this change extra= =3D may be appended to cmdline=3D. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD --- CC: Ian Jackson CC: Wei Liu CC: Anthony PERARD In particular, this is useful for testing Xen as a PVH guest, where switchi= ng between a PV and PVH dom0 involves adding "dom0=3Dpvh dom0-iommu=3Dnone" to command line. Now, given a single build of Xen under test, two tests can be run with just # xl create shim.cfg ramdisk=3D\"test-pv64-example\" and # xl create shim.cfg ramdisk=3D\"test-hvm64-example\" extra=3D\"dom0=3Dpvh= \ dom0-iommu=3Dnone\" without needing to edit shim.cfg inbetween. --- docs/man/xl.cfg.5.pod.in | 14 ++++++++++---- tools/xl/xl_parse.c | 12 ++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index c99d40307e..ca34f3c623 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -431,18 +431,24 @@ Load the specified file as the ramdisk. =20 =3Ditem B =20 -Append B to the kernel command line. (Note: the meaning of -this is guest specific). It can replace B -along with B and is preferred. When B is set, -B and B will be ignored. +Use B as the kernel command line. (Note: the meaning of this is gu= est +specific). + +When this option is specified, B will be ignored. =20 =3Ditem B =20 +This option is deprecated and its use is discouraged. It will be ignored = if +B is specified. + Append B to the kernel command line (Note: the meaning of t= his is guest specific). =20 =3Ditem B =20 +This option is deprecated and its use in configuration files is discourage= d. +It may however be useful to use on the command line for B. + Append B to the kernel command line. (Note: the meaning of this is guest specific). =20 diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index e105bda2bb..2cad5c6e08 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -287,10 +287,14 @@ static char *parse_cmdline(XLU_Config *config) xlu_cfg_get_string (config, "extra", &extra, 0); =20 if (buf) { - cmdline =3D strdup(buf); - if (root || extra) - fprintf(stderr, "Warning: ignoring root=3D and extra=3D " - "in favour of cmdline=3D\n"); + if (root) + fprintf(stderr, "Warning: ignoring root=3D in favour of cmdlin= e=3D\n"); + + if (extra) { + xasprintf(&cmdline, "%s %s", buf, extra); + } else { + cmdline =3D strdup(buf); + } } else { if (root && extra) { xasprintf(&cmdline, "root=3D%s %s", root, extra); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel