From nobody Fri Mar 29 09:59:07 2024 Delivered-To: importer@patchew.org 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; 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=1557416595; cv=none; d=zoho.com; s=zohoarc; b=PwKYHzi+S9BxpGUc6xuchQxb9niOxcTTvqXeggNdoiQ3pUedbCFSbJ/GmgUTeogVgwkbYOLZP49bVRSld6a2i4UkBw2OWYE6aEirJyXpDfiefy+n29n9txp+bx3CWjAiQEkB0GuAbae4m6ZQvrVMfdb4dT54frB8wnUP/oQQrRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557416595; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+kix+VtBK3ASowDjQWxRe3G3lP4R2Qh/x6K5eWOz1Bs=; b=FnyYNEfZw6WiF+jkuqO9ycz2mTygbFXhTVfiGNNeu0ZtGvaBlen28uPq7a/kOrW17USlAx0Val9rytkpJAmEOb+C3ebqwu0xNL8TeSXEIMd1IpvVGF4AHoG2Veki6tOCN47Blkwcq+sr9HMGzu8wmRKzY8xRGstxoCcc25OvMoY= 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 1557416595160547.9502472502844; Thu, 9 May 2019 08:43:15 -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 1hOlB4-0007ep-Qo; Thu, 09 May 2019 15:41:46 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hOlB3-0007eS-OF for xen-devel@lists.xenproject.org; Thu, 09 May 2019 15:41:45 +0000 Received: from smtp.nue.novell.com (unknown [195.135.221.5]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id f2696504-7270-11e9-8980-bc764e045a96; Thu, 09 May 2019 15:41:45 +0000 (UTC) Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Thu, 09 May 2019 17:41:43 +0200 Received: from linux-nq5u.suse.de (nwb-a10-snat.microfocus.com [10.120.13.202]) by emea4-mta.ukb.novell.com with ESMTP (NOT encrypted); Thu, 09 May 2019 16:41:34 +0100 X-Inumbo-ID: f2696504-7270-11e9-8980-bc764e045a96 From: Vasilis Liaskovitis To: xen-devel@lists.xenproject.org Date: Thu, 9 May 2019 17:41:28 +0200 Message-Id: <20190509154128.9196-5-vliaskovitis@suse.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190509154128.9196-1-vliaskovitis@suse.com> References: <20190509154128.9196-1-vliaskovitis@suse.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 4/4] xl: add new xl command get-parameters 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: jgross@suse.com, sstabellini@kernel.org, wei.liu2@citrix.com, vliaskovitis@suse.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com, dgdegra@tycho.nsa.gov Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Add a new xl command "get-parameters" to get hypervisor runtime parameters. Examples: xl get-parameters "gnttab_max_frames gnttab_max_maptrack_frames" gnttab_max_frames gnttab_max_maptrack_frames : 64 1024 xl set-parameters gnttab_max_frames=3D128 xl get-parameters gnttab_max_frames gnttab_max_frames : 128 xl get-parameters "gnttab_max_frames gnttab_max_maptrack_frames" gnttab_max_frames gnttab_max_maptrack_frames : 128 1024 Signed-off-by: Vasilis Liaskovitis --- docs/man/xl.1.pod.in | 5 +++++ tools/xl/xl.h | 1 + tools/xl/xl_cmdtable.c | 5 +++++ tools/xl/xl_misc.c | 25 +++++++++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index 4310fcd818..a1fff4d382 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -827,6 +827,11 @@ Send debug I to Xen. It is the same as pressing = the Xen Set hypervisor parameters as specified in I. This allows for some boot parameters of the hypervisor to be modified in the running systems. =20 +=3Ditem B I + +Get hypervisor parameters as specified in I. This allows for some +boot parameters of the hypervisor to be read in the running systems. + =3Ditem B [I] =20 Reads the Xen message buffer, similar to dmesg on a Linux system. The diff --git a/tools/xl/xl.h b/tools/xl/xl.h index cf4202bc89..af3843e5b0 100644 --- a/tools/xl/xl.h +++ b/tools/xl/xl.h @@ -219,6 +219,7 @@ int main_psr_mba_set(int argc, char **argv); int main_psr_mba_show(int argc, char **argv); #endif int main_qemu_monitor_command(int argc, char **argv); +int main_get_parameters(int argc, char **argv); =20 void help(const char *command); =20 diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c index 89716badcb..a18481619b 100644 --- a/tools/xl/xl_cmdtable.c +++ b/tools/xl/xl_cmdtable.c @@ -662,6 +662,11 @@ struct cmd_spec cmd_table[] =3D { "Issue a qemu monitor command to the device model of a domain", " ", }, + { "get-parameters", + &main_get_parameters, 0, 1, + "Get hypervisor parameters", + "", + }, }; =20 int cmdtable_len =3D sizeof(cmd_table)/sizeof(struct cmd_spec); diff --git a/tools/xl/xl_misc.c b/tools/xl/xl_misc.c index dcf940a6d4..811f231b78 100644 --- a/tools/xl/xl_misc.c +++ b/tools/xl/xl_misc.c @@ -364,6 +364,31 @@ int main_config_update(int argc, char **argv) return 0; } =20 +int main_get_parameters(int argc, char **argv) +{ + int opt, ret; + char *params; + char values[1023]; + + SWITCH_FOREACH_OPT(opt, "", NULL, "get-parameters", 1) { + /* No options */ + } + + params =3D argv[optind]; + + if (!params) { + fprintf(stderr, "no parameter specified\n"); + return EXIT_FAILURE; + } + else if ((ret =3D libxl_get_parameters(ctx, params, values))) { + fprintf(stderr, "cannot get parameters: %s : %d\n", params, ret); + fprintf(stderr, "Use \"xl dmesg\" to look for possible reason.\n"); + return EXIT_FAILURE; + } + fprintf(stderr, "%s : %s\n", params, values); + + return EXIT_SUCCESS; +} /* * Local variables: * mode: C --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel