From patchwork Wed Mar 2 22:11:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12766858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5E679C433EF for ; Wed, 2 Mar 2022 22:12:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282592.481359 (Exim 4.92) (envelope-from ) id 1nPXCe-0002Pg-Oq; Wed, 02 Mar 2022 22:12:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282592.481359; Wed, 02 Mar 2022 22:12:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPXCe-0002PY-Lw; Wed, 02 Mar 2022 22:12:12 +0000 Received: by outflank-mailman (input) for mailman id 282592; Wed, 02 Mar 2022 22:12:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPXCd-0002PM-Ni for xen-devel@lists.xenproject.org; Wed, 02 Mar 2022 22:12:11 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id cd87aa3f-9a75-11ec-8539-5f4723681683; Wed, 02 Mar 2022 23:12:10 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: cd87aa3f-9a75-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1646259130; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5eGfzPlndsyxVp6HYgFFniaJdsIB1nKCNPpAEM/imv0=; b=Qc9RMl+65nu9EfkNVKXs7N2We27q13FvofBUuEXqkJQmqgWdbqETrR5s qxPaP/rOXVFH2luXahyBzWzfelw10pQk9P540YJBSau5rkcRATwLi19DK V0aR+tuoYniszNn8CdG6vBmEG0e9CJBcneDu8TR1xKgXsoATgjFOfYckd 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65749704 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:VCx5+a+r0u8JpVNxPNI7DrUDhH6TJUtcMsCJ2f8bNWPcYEJGY0x3n 2QcXW7Qb/3fZzCke4t+PI+w/UpU7Z7Xy9ZiGVRvpXw8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ54f5fs7Rh2NQw2oDjW1/lV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnaeJTRwKYabIo9gyY0l6Ti9cL5RixIaSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFKoZtmtt0nfyCvE+TIqYa67L+cVZzHE7gcUm8fP2O ZdGNWswNEiojxtnIXxNMdEgguKRh1rRbxRSsAyJibsw7D2GpOB2+Oe0a4eEEjCQfu1Kmm6Iq 2SA+H72ajk4HtGCzTuO8lq3m/TC2yj8Xeo6BLC+s/JnnlCX7mgSEwENE0u2p+GjjUyzUM4ZL FYbkhfCtoBrqhbtFIOkGUTl/jjU5XbwRua8DcUB0QWW6fXf5z2lKVhUbGNPSs4fkPMPEGlCO kCyo/vlAjlmsbuwQH2b96uJoT7aBRX5PVPudgdfE1JbvoCLTJUby0uWE409SPLdYsjdRGmoq w1muhTSkFn6YSQj86ygtW7KjDu3znQiZl5kv16HNo5JA+4QWWJEW2BKwQWDhRqjBNzAJrVkg JTis5LEhAzpJcvQ/BFhuM1XQNmUCw+taVUwe2JHEZg77CiK8HW+Z41W6zwWDB43bpheJWG1M RSM5Fo5CHpv0J2CN/Ufj2WZUZlC8EQdPY69CqC8giRmOPCdizNrDAkxPBXNjggBYWAnkL0lO IfzTCpfJS1yNEiT9xLvH711+eZynkgWnDqPLbimn0XP+efPPxa9FOZaWGZim8hktctoVi2Oq I0BXyZLoj0CONDDjt7/qtZCfQhXdiFgXfgbaaV/L4a+H+avI0l5Y9e5/F/rU9UNc3h9/gsQw kyAZw== IronPort-HdrOrdr: A9a23:A3qI5KNZ1gn/68BcTsWjsMiBIKoaSvp037BN7TEXdfU1SL39qy nKpp8mPHDP5Ar5NEtOpTniAsm9qBHnm6KdiLN5Vd3OYOCMggqVBbAnwYz+wyDxXw3Sn9QtsJ uIqpIOa+EY22IK7/rH3A== X-IronPort-AV: E=Sophos;i="5.90,150,1643691600"; d="scan'208";a="65749704" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [PATCH] x86/cmdline: Interpret 'vpmu' as a positive boolean Date: Wed, 2 Mar 2022 22:11:57 +0000 Message-ID: <20220302221157.17246-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 This makes it behave slightly more like a regular boolean option. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu Slightly RFC, because there is no easy way of making the opposite "normal boolean" case work for no-vpmu. --- xen/arch/x86/cpu/vpmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index 4fedc7c57012..501d4f0af94e 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -66,7 +66,9 @@ static int __init cf_check parse_vpmu_params(const char *s) if ( !ss ) ss = strchr(s, '\0'); - if ( (val = parse_bool(s, ss)) >= 0 ) + if ( s == ss ) + opt_vpmu_enabled = true; + else if ( (val = parse_bool(s, ss)) >= 0 ) { opt_vpmu_enabled = val; if ( !val )