Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp436842rwr; Wed, 3 May 2023 00:24:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6duR0bJfZh4BORBlXChslrNMufAIc07N6TrMVvNe2DILQRk1eqskmb0Af59RYLjLodR/z/ X-Received: by 2002:a17:90a:d48:b0:24d:eb30:daa6 with SMTP id 8-20020a17090a0d4800b0024deb30daa6mr10603572pju.40.1683098650089; Wed, 03 May 2023 00:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098650; cv=none; d=google.com; s=arc-20160816; b=AkSEsMTgnQ03hrYUfE/k2mg4oNVzzOlwrr9EuVxAlUU/qOWhPVplJKUOevPaLLuFfr 1PDxwVRqGyWKeeFHfMlEMynvcAdJNKziXxR0rmSyxN1xRQRmJi0HYebPHS7ZR9RmytFG itMdqLciqvy+dEPdEoXrpL4NbWiDmK5WzswZfUdH0C/PqP+zqtyRpJuuPJZKKONC+D0/ mv+NqpeW6n3d5lOL1q9hzoVro9w62XMJO4l3jqpvpow0MN6Yv6UvF6ga9/yIrY/+UT59 7MNdMOtCMCc56BAwAbKY0LgL6OrkwKg1VKk0o2U1de1+s7LY0x6n5tpWZJO64VrvbDkd kqGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nlNv/F2pCSwWbexWZ5JR+V38LaHDUWBt53s7CUexmGA=; b=IePSvJWsrPuVLFsTn99wSIr0wQMNsbeFg0RWS3S1pRt31+VeKC66S94tyMXK7/iCtt mu3yqarFwRiaJCf2v6PH8Uvst1jzRRbM1tTq6fpKvMPwePtbX+zd1dsuYAASt6ae6uku GmXd+KjjItrQPZee+hNsGSastaB+b6ixdmSDUwiGfLxfnR8yhpVCyMhFF+n8t+BnCJoy Q+hU3jif0e9RHr+lDqlN7SANJ5TQLa10Zfh+ekAXGooH217xkbmupUen7/7BGzUDTBxQ lzqU7zVfkjLdSx6Kvu2HMrepUQ2zWC2iDZRWAo4qLxTFySrwnqVEuSnpSN4wl3NKqC+T uhgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ovKuIJlC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a17090a588800b002473e16b67esi12752595pji.48.2023.05.03.00.23.55; Wed, 03 May 2023 00:24:10 -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=@gmail.com header.s=20221208 header.b=ovKuIJlC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbjECHQH (ORCPT + 99 others); Wed, 3 May 2023 03:16:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbjECHQF (ORCPT ); Wed, 3 May 2023 03:16:05 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B54035B0; Wed, 3 May 2023 00:16:02 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1928860f63eso984941fac.0; Wed, 03 May 2023 00:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683098161; x=1685690161; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nlNv/F2pCSwWbexWZ5JR+V38LaHDUWBt53s7CUexmGA=; b=ovKuIJlCtQLxpA1qPNder/rFAq3YErdm0kDt3aYHjNYsKAaO1onRL+QOyIWR6UuBzZ 0/qng6/4ZsCXc2btT/2t3T//F9EK4ebxBNCoVbfYFq06+vwVZVjtIuRt6ciVc1YyK7oK lfChm+YSlHIsGL+T67udLNJhKsb+6u9rrrZP6k2xAWb9DRxRWRceUzUyKNiAGOhomV5p GFnXnq00I+FNCrPcKfF4nwyyNO/eN7puqGTNogJu7QE6/SdJJSgCQoEcf1RBu8yA8Snm IFEONcKddHEFUpovi2YGJy+p2YU2NqF18PEuLnZZcatNcn+Rv3+as3otSFF+HI3L/gUo Yahw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683098161; x=1685690161; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nlNv/F2pCSwWbexWZ5JR+V38LaHDUWBt53s7CUexmGA=; b=d2gbldjQFR6gBZAOVMMQrtJUGdgiXVCdzRb37d+Ffn8SfkE8xdDXwa706FAxzxDIdZ lnkivvl2W+7vpDfM/sPE/3UPUgqujapKx8UkmotLlfTpH/SZ5d6pL4npDmWVjsLxEAPD 1MxsKXP3gu5dCtKMTnFoHpKA+RWy4qXMATQ/SeH0Y9HGW9pDyc13Lvd8UPRlgOl89K2p HOG1O/CGYJq5jSrShRX7qBOMGkquVwAXcEqzjKMRwRKYwnjwMMkvIlMx5YPoimyhCRqF 2E/UmYR4TgHG67UtBiYzUAcVt0eBvgkrVff88RVOSjrHPN7KO2zetDd2tlhleAhhsuym nUvQ== X-Gm-Message-State: AC+VfDy7egTsNZ6oqccl+pdfo/OlOxwaalb6W/5moJ6lleUlEsU0mxIL 06n3JGY39UmMVF9725lUyTdq1medQslKub9rZfM= X-Received: by 2002:a05:6870:9890:b0:18e:7c5e:b58c with SMTP id eg16-20020a056870989000b0018e7c5eb58cmr9395162oab.9.1683098161344; Wed, 03 May 2023 00:16:01 -0700 (PDT) MIME-Version: 1.0 References: <20230502112502.14859-1-yanjiewtw@gmail.com> In-Reply-To: From: Yan-Jie Wang Date: Wed, 3 May 2023 15:15:50 +0800 Message-ID: Subject: Re: [PATCH] docs: clarify KVM related kernel parameters' descriptions To: Sean Christopherson 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="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thank you, Sean. I will revise the patch accordingly and submit a new version as well as update the description of kvm-intel.nested to reflect that it is enabled by default. On Wed, May 3, 2023 at 1:12=E2=80=AFAM Sean Christopherson wrote: > > 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, an= d 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 descrip= tions > using this as a template? E.g. state that the param controls something, = state > the default and use that to communicate that 1=3D=3Denabled, and then, wh= en appropriate, > clarify that KVM disables (or in some cases ignores) params if hardware d= oesn't > support the related feature(s). > > kvm-intel.ept=3D [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 sup= port > 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/Document= ation/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=3D [KVM,AMD] Allow nested virtualization in KVM/SV= M. > > Eh, I don't see any reason to have this one say "allow" instead of "enabl= e/disable". > > > - Default is 1 (enabled) > > + Default is 1 (allow) > > > > - kvm-amd.npt=3D [KVM,AMD] Disable nested paging (virtualized MM= U) > > - for all guests. > > + kvm-amd.npt=3D [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=3D > > @@ -2602,12 +2602,12 @@ > > Format: > > Default: 5 > > > > - kvm-intel.ept=3D [KVM,Intel] Disable extended page tables > > + kvm-intel.ept=3D [KVM,Intel] Enable extended page tables > > (virtualized MMU) support on capable Intel chips. > > Default is 1 (enabled) > > > > kvm-intel.emulate_invalid_guest_state=3D > > - [KVM,Intel] Disable emulation of invalid guest st= ate. > > + [KVM,Intel] Enable emulation of invalid guest sta= te. > > Ignored if kvm-intel.enable_unrestricted_guest=3D= 1, as > > guest state is never invalid for unrestricted gue= sts. > > This param doesn't apply to nested guests (L2), a= s KVM > > @@ -2615,7 +2615,7 @@ > > Default is 1 (enabled) > > > > kvm-intel.flexpriority=3D > > - [KVM,Intel] Disable FlexPriority feature (TPR sha= dow). > > + [KVM,Intel] Enable FlexPriority feature (TPR shad= ow). > > Default is 1 (enabled) > > > > kvm-intel.nested=3D > > @@ -2623,7 +2623,7 @@ > > Default is 0 (disabled) > > Heh, kvm-intel.nested has been enabled by default for quite some time. C= an you > fix that up too? > > > > > kvm-intel.unrestricted_guest=3D > > - [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 in= stances) > > > > - kvm-intel.vpid=3D [KVM,Intel] Disable Virtual Processor Identific= ation > > + kvm-intel.vpid=3D [KVM,Intel] Enable Virtual Processor Identifica= tion > > feature (tagged TLBs) on capable Intel chips. > > Default is 1 (enabled) > > > > > > base-commit: 865fdb08197e657c59e74a35fa32362b12397f58 > > -- > > 2.34.1 > >