Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C434C433E0 for ; Thu, 14 May 2020 13:03:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF35520727 for ; Thu, 14 May 2020 13:03:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF35520727 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass 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.92) (envelope-from ) id 1jZDW5-0000Nd-RM; Thu, 14 May 2020 13:03:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZDW4-0000Mu-QI for xen-devel@lists.xenproject.org; Thu, 14 May 2020 13:03:12 +0000 X-Inumbo-ID: 435a2f82-95e3-11ea-a487-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 435a2f82-95e3-11ea-a487-12813bfff9fa; Thu, 14 May 2020 13:03:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D71EAC6D; Thu, 14 May 2020 13:03:12 +0000 (UTC) Subject: Re: [PATCH v8 12/12] xen: remove XEN_SYSCTL_set_parameter support To: Juergen Gross References: <20200508153421.24525-1-jgross@suse.com> <20200508153421.24525-13-jgross@suse.com> From: Jan Beulich Message-ID: <2c962dd4-5af6-e09e-d712-18f8a92b4a92@suse.com> Date: Thu, 14 May 2020 15:03:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200508153421.24525-13-jgross@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jun Nakajima , xen-devel@lists.xenproject.org, Daniel De Graaf , Volodymyr Babchuk , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 08.05.2020 17:34, Juergen Gross wrote: Besides the changes made, wouldn't it be worthwhile to change HYPFS Kconfig help wording from "result in some features not being available" to something mentioning runtime parameter setting in particular, and perhaps also from "might" to "will"? > --- a/xen/arch/x86/hvm/vmx/vmcs.c > +++ b/xen/arch/x86/hvm/vmx/vmcs.c > @@ -71,27 +71,6 @@ static bool __read_mostly opt_ept_pml = true; > static s8 __read_mostly opt_ept_ad = -1; > int8_t __read_mostly opt_ept_exec_sp = -1; > > -#ifdef CONFIG_HYPFS > -static char opt_ept_setting[10]; > - > -static void update_ept_param(void) > -{ > - if ( opt_ept_exec_sp >= 0 ) > - snprintf(opt_ept_setting, sizeof(opt_ept_setting), "exec-sp=%d", > - opt_ept_exec_sp); > -} > - > -static void __init init_ept_param(struct param_hypfs *par) > -{ > - update_ept_param(); > - custom_runtime_set_var(par, opt_ept_setting); > -} > -#else > -static void update_ept_param(void) > -{ > -} > -#endif > - > static int __init parse_ept_param(const char *s) > { > const char *ss; > @@ -118,6 +97,22 @@ static int __init parse_ept_param(const char *s) > } > custom_param("ept", parse_ept_param); > > +#ifdef CONFIG_HYPFS > +static char opt_ept_setting[10]; > + > +static void update_ept_param(void) > +{ > + if ( opt_ept_exec_sp >= 0 ) > + snprintf(opt_ept_setting, sizeof(opt_ept_setting), "exec-sp=%d", > + opt_ept_exec_sp); > +} > + > +static void __init init_ept_param(struct param_hypfs *par) > +{ > + update_ept_param(); > + custom_runtime_set_var(par, opt_ept_setting); > +} If I'm not mistaken this is pure code movement, and solely to be able to have ... > + > static int parse_ept_param_runtime(const char *s); > custom_runtime_only_param("ept", parse_ept_param_runtime, init_ept_param); > > @@ -172,6 +167,7 @@ static int parse_ept_param_runtime(const char *s) > > return 0; > } > +#endif ... a single #ifdef region now including a few more lines. No strict need to change it, but couldn't the earlier patch have inserted the code in its final place right away? > @@ -1106,7 +1090,7 @@ struct xen_sysctl { > #define XEN_SYSCTL_get_cpu_levelling_caps 25 > #define XEN_SYSCTL_get_cpu_featureset 26 > #define XEN_SYSCTL_livepatch_op 27 > -#define XEN_SYSCTL_set_parameter 28 > +/* #define XEN_SYSCTL_set_parameter 28 */ Nit: There are now 3 too many padding spaces. Granted that's how it was done for XEN_SYSCTL_tmem_op ... In any event, as before, Acked-by: Jan Beulich Jan