[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/cmdline: Interpret 'vpmu' as a positive boolean


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 3 Mar 2022 10:48:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OLKWxR3en0CGDa1SgIFF2e0D1MifvJO0mWnZVNHeRpQ=; b=A6zm7pxmTSIla9eXbUjNdz0bpgg9vVSvfhvFXNawtIVsnvHPprv2FMMcd3qffk3cRx80GrPS1CRboXEPf2OVOAAvGw7QE4getnV8r88QJNroV+5dbu72VWImCZ3Fj2x13Yo/l72lG3x/vXRWH6WQFKw3b3aHDzbUS6KAcn+CYWG+u2pO4B1//kFiCC23AcGf/6Tu89lA7zghwtYJAVh+xvTKBo0hMQe8NmXG0JNyLnJXiSY/tSsJsuxZePCpLHeIT7Ls5qSFSr1Ueoddrbv2lSmGYB6bJdYLtbq+V2wNn2O6TUH3Gj+KAgbkfSoR2iKSDJirQeyt4znfGADJ6KZxIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZQdv7CONbkEKkHCk8iql6LBL2WLYXBpNjLeQF98Ugw171+oKk4M08HkIdwfDORMQEGJcZ9GPjQ4C9hiDzMTojkBdhh4WN7L5X62ADNsKvbRelamgGfYoy5ae0C97kGvBjs1MG0GKHwWY2Cassss+4h9U9q55isINoS6hNpnYO7N8eC+sufxdhate+vaPpv512ZnG6G6/Jk54eRPfAYOFH7OSGhK9SAYmop4o+X47F3gB6HFmbV6D5CSi925eFUzKP/hSKd7ZBWi8RIULAACeqZ4N4z7KdhkpPXINExzM7EoXnNjz34ypA+OMWRd/UV38eXbEdwk6sNqVpQBPdPylw==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 03 Mar 2022 10:48:51 +0000
  • Ironport-data: A9a23:t7tOmqtLRZR7ZejaDh1FJiwdDufnVEpeMUV32f8akzHdYApBsoF/q tZmKW+GafrbZjOjKogka47l908Fu57Qz4Q3GQFu/i5nHitH+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1jV4 ouryyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi80G5Dexs8vWiBpSWIjOL9P6b3BDDuG5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvllJyz3DAOlgapfEW6jQvvdT3Ssqh9AIFvHbD yYcQWQyN0SbOkweUrsRIKhgg7u6v0D/SGxdkGOMpvMt5Hjx3gMkhdABN/KKI4fXFK25hH2wt m/Aumj0HBweHNie0iaetGKhgPfVmiH2U55UE6e3ntZ1hHWDy2pVDwcZPXO5q/Skjk+1W/pEN lcZvCEpqMAPGFeDF4enGUfi+Tjd40BaC4E4//AGBB+l14/p8ViyNGE9f2QCNdk0vd40QxFp7 wrc9z/2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akbMzbGqoLx4r8y+Oa2EaZ4gacaid DEShdVpGQyc0XhBYmH24BK6AnERCGnUTHk2qhlltFEU33HNczW2AG4OSUTepGb0oci6+XgKo KOBK4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYLoKhjt6lbGTIskelwxGk8I14LqytR+SAgAAzewA=
  • Thread-topic: [PATCH] x86/cmdline: Interpret 'vpmu' as a positive boolean

On 03/03/2022 07:44, Jan Beulich wrote:
> On 02.03.2022 23:11, Andrew Cooper wrote:
>> This makes it behave slightly more like a regular boolean option.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
>> Slightly RFC, because there is no easy way of making the opposite "normal
>> boolean" case work for no-vpmu.
> There's nothing to do to make this work afaict: Generic command line
> handling converts "no-<option>" to "<option>=no" for custom params.

Oh - I'd forgotten that, in which case this patch actually wants to be
simply:

diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index adff2d2c77f3..2cea1da781ac 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -162,6 +162,11 @@ static int parse_params(const char *cmdline, const
struct kernel_param *start,
                     safe_strcpy(opt, "no");
                     optval = opt;
                 }
+                else if ( !*optval )
+                {
+                    safe_strcpy(opt, "1");
+                    optval = opt;
+                }
                 rctmp = param->par.func(optval);
                 break;
             case OPT_IGNORE:

to turn "option\0" into "option=1", no?

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.