Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7161730rwr; Tue, 2 May 2023 10:15:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CIUvI/SZQqEojTQFtHXKojcrybJ2yuFVl7fVOvQv6vkkHpYZG096WS8VfndYiN+t5wDFT X-Received: by 2002:a05:6a20:5495:b0:ec:7cc:2da6 with SMTP id i21-20020a056a20549500b000ec07cc2da6mr21508187pzk.56.1683047751658; Tue, 02 May 2023 10:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683047751; cv=none; d=google.com; s=arc-20160816; b=b9ec1Db15D8g01JEE9cfYi8Up4k/lB5Oa2H8DYSk+1vAUjrDheNR9OCi03qJ6ktahl Xl33GbqTtqFCTL3lhPkUC6fuFj/M1Ad6FNIEFm3NOovEhvyf0DGolazg+r85Cfm9U/4Y tno4iIhr0/fxw5Edlceyl+HNV+RLuuVJWOy/F4iqNs9/txYDn6SpHVBCbUpF6Z/m4E+b Gcz12v7OYXpjYn5jbPoRYEhwIj0Tn4QY8VLysNHAxmK5WtUG7L0TigmypHGnj4FE53+9 OPqiac4oa2T0rFhlmMz6pDVWeTFbOj9B5CsfXRgV/WbW8G2+IX9zuC2UftsIJCA530sR cFhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=LQpsXa7PF6SfkNDRVYWe/pXw7LrZqwM+ndclXY8TsRA=; b=TQgzYeeR1Caoclx24XDK1HnlqfAPAOYCK3jcYDhu0lOLfNlRxDUo+rSbdtUDFGqmWv X4gefaoMSyGz3HdZ5saotIXg4/OHmLqZtUC9Z7hKjxGI32aLuwWm6I61DQ9tl7/5n7gY wJ6HlFCANylpCvyiIau/P4eFG81INMRiYMiu9F2IZVC0COjEhqRig3FtbuDturN9tsAs MC1pGz51t8REbxabGS/UOGy7ROXlm+NRgArFqKhO8gVJrcOv8q9DQX8CoGmIYG4mVOkw ztvdxp1ZEWR6bwGgMDA/uDuoo9HPtTMKXYzJiizeNtgpC/ZaEiPdMCuUqEXILvZgjtp8 pTgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=C43MRsCe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a17090acb8100b0024df18639fasi6552535pju.154.2023.05.02.10.15.35; Tue, 02 May 2023 10:15:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=C43MRsCe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231808AbjEBRMm (ORCPT + 99 others); Tue, 2 May 2023 13:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233832AbjEBRMk (ORCPT ); Tue, 2 May 2023 13:12:40 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB776F5 for ; Tue, 2 May 2023 10:12:36 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id 41be03b00d2f7-518d6f87a47so1816738a12.3 for ; Tue, 02 May 2023 10:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683047556; x=1685639556; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=LQpsXa7PF6SfkNDRVYWe/pXw7LrZqwM+ndclXY8TsRA=; b=C43MRsCeJjlHRny0ujP2/WrWk7SuBq+T0iec7sTyuUJCtuy2gOVBMk6xF+njks3r8b iaHC8zvlhYdXVfFEIlS64AfFZlAUKc6V/+XV73g1rO1YWbs/QjNlnR8c8rbd9OZwbsav ucmm0mYAIA7SDeYN87XmItw5hU1/H8cwITnbs9dhYLmJvTRVsHacVPu4GfjyC0sriUS3 Zmg0KEofgoQYlmUEer4zXwgoOD8bgHAGREE+tAkj2GsCjbCFvNxxyWSj1kYhtCl/kBhW mrH8bwK5YOTLcXEfFBmIjwOCnYPUI9AtmywcgEtYj7PQ79gI0bzLCRNxRbMZosi3SgXQ rO/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683047556; x=1685639556; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LQpsXa7PF6SfkNDRVYWe/pXw7LrZqwM+ndclXY8TsRA=; b=jWMOGNlff4lPBTRPrI2AsGeVlsCA+OMhxIw3TlTa0zqb0wQUSPszIiE9N39e2QBG5t P/pUjD2hbSynjapcBoEItDiBPIb3K4B0mLDqy+PANxhi4avYjWVj8U/aV7kj1QZkIITh 1aNxMiwxNd2YJhg6lpSstDHobrxDbhPhQM31iGjbvaOzk7xkVZnAiBnNyi7TEML4PRAJ uzueGXBVp23Zr+1D6BuM3zxUuUlzHHnjQxstlJoOwOfIOCGhuNhssoH4aMe9Q81GeIaf 6X8UuWKI6rT5WuFw3dGbAYBCS+4V+fJxIt+G2mDCnnlMKjBEJxskkVuTu8z9sdLDKAy+ BdoA== X-Gm-Message-State: AC+VfDwnNTQbKFYu7kOBkkhd8q1ZKKflxOos8zWQV1hBUPiIFT+uY39t nwUTYKJ0K86kiIpDwkq7bvkEBSK/BkU= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a63:8741:0:b0:513:e029:d172 with SMTP id i62-20020a638741000000b00513e029d172mr4555521pge.12.1683047556207; Tue, 02 May 2023 10:12:36 -0700 (PDT) Date: Tue, 2 May 2023 10:12:34 -0700 In-Reply-To: <20230502112502.14859-1-yanjiewtw@gmail.com> Mime-Version: 1.0 References: <20230502112502.14859-1-yanjiewtw@gmail.com> Message-ID: Subject: Re: [PATCH] docs: clarify KVM related kernel parameters' descriptions From: Sean Christopherson To: Yan-Jie Wang Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Paolo Bonzini , Randy Dunlap , Andre Przywara , Avi Kivity , Ching-Chun Huang , trivial@kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 02, 2023, Yan-Jie Wang wrote: > The descriptions of certain KVM related kernel parameters can be > ambiguous and confusing. They state 'Disable ...,' which implies that > setting them to 1 would disable the associated features or options, > when in fact the opposite is true. > > This commit addresses this issue by revising the descriptions of these > parameters to make their intended behavior clear. Less wrong perhaps, but IMO the actual behavior is still not captured, and from a certain perspective the existing "Disable" verbiage better reflects how/when most users would actually want to explicitly set a param. Rather than commit one way or the other, what about reworking the descriptions using this as a template? E.g. state that the param controls something, state the default and use that to communicate that 1==enabled, and then, when appropriate, clarify that KVM disables (or in some cases ignores) params if hardware doesn't support the related feature(s). kvm-intel.ept= [KVM,Intel] Control KVM's use of Extended Page Tables, a.k.a. Two-Dimensional Page Tables. Default is 1 (enabled). Disabled by KVM if hardware lacks support for EPT. > > Signed-off-by: Yan-Jie Wang > --- > Documentation/admin-guide/kernel-parameters.txt | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 9e5bab29685f..cc5abb3d54b9 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -2552,10 +2552,10 @@ > on the ratio, such that a page is zapped after 1 hour on average. > > kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM. Eh, I don't see any reason to have this one say "allow" instead of "enable/disable". > - Default is 1 (enabled) > + Default is 1 (allow) > > - kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU) > - for all guests. > + kvm-amd.npt= [KVM,AMD] Enable nested paging (virtualized MMU) > + for all guests on capable AMD chips. > Default is 1 (enabled) if in 64-bit or 32-bit PAE mode. > > kvm-arm.mode= > @@ -2602,12 +2602,12 @@ > Format: > Default: 5 > > - kvm-intel.ept= [KVM,Intel] Disable extended page tables > + kvm-intel.ept= [KVM,Intel] Enable extended page tables > (virtualized MMU) support on capable Intel chips. > Default is 1 (enabled) > > kvm-intel.emulate_invalid_guest_state= > - [KVM,Intel] Disable emulation of invalid guest state. > + [KVM,Intel] Enable emulation of invalid guest state. > Ignored if kvm-intel.enable_unrestricted_guest=1, as > guest state is never invalid for unrestricted guests. > This param doesn't apply to nested guests (L2), as KVM > @@ -2615,7 +2615,7 @@ > Default is 1 (enabled) > > kvm-intel.flexpriority= > - [KVM,Intel] Disable FlexPriority feature (TPR shadow). > + [KVM,Intel] Enable FlexPriority feature (TPR shadow). > Default is 1 (enabled) > > kvm-intel.nested= > @@ -2623,7 +2623,7 @@ > Default is 0 (disabled) Heh, kvm-intel.nested has been enabled by default for quite some time. Can you fix that up too? > > kvm-intel.unrestricted_guest= > - [KVM,Intel] Disable unrestricted guest feature > + [KVM,Intel] Enable unrestricted guest feature > (virtualized real and unpaged mode) on capable > Intel chips. Default is 1 (enabled) > > @@ -2639,7 +2639,7 @@ > > Default is cond (do L1 cache flush in specific instances) > > - kvm-intel.vpid= [KVM,Intel] Disable Virtual Processor Identification > + kvm-intel.vpid= [KVM,Intel] Enable Virtual Processor Identification > feature (tagged TLBs) on capable Intel chips. > Default is 1 (enabled) > > > base-commit: 865fdb08197e657c59e74a35fa32362b12397f58 > -- > 2.34.1 >