Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2802741rwd; Wed, 14 Jun 2023 07:32:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7I+51BHPfW/NIePhPgIWIlCVZRKJ+YmLxVQUW4Au/Z5Bq7xlIC2yr5rw4uG3t3gr6Q5dz0 X-Received: by 2002:a19:6710:0:b0:4f7:6471:d5c2 with SMTP id b16-20020a196710000000b004f76471d5c2mr1485552lfc.6.1686753133822; Wed, 14 Jun 2023 07:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686753133; cv=none; d=google.com; s=arc-20160816; b=L98i4cIK83KKq/B5A9Xo6G9NDIZuHkRYEm8w0y4+96OZedHoifptnD/drTNBtMatYv 5rjO8msGDct5RSU/Xgr2aa82cOEkOIYBLKXQ9Ro/RhfcKqj3KO/r/JV8yXSDsQ+sWTDy qtFXWZbwLFCqoCzm6/B7lROUo5wy5yv44+s1hAyl2lonRWbFTYLAgL787XJktyJGCD6U ZeYXgRXBPjueSURsVKK02h8sqJIggGfIJ0XNSBR0V4zCh+5PG7BhKo9Czv0BDlSlzFJx 5eyDTbA9uZZo8haJWh2OyRoEzoRRUk2zAsYUOobDZ2x0w515FN95gQnGrZ1Gd+QyTpGB i6+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TTY+FiTaX7AgDqQBUwj/BsShWUwI+/hjWm+TAF5VYBA=; b=DDF4zryJG36LPRq6x3MHOFtyVqKNh72CjTITof+nKYHp333STlF/nCC5j+Hylkm9E2 CiMV/bdexpZdTZvnoEDIFRJTKg5+Z/9kTS7o13LmWHIh+b5Z+nWOdaI2/whLhHkm22qC OaOXD4bW0dn+6M8ly931RDc163lUQlzV9Xgb2Ftvl1sixjTPnmG7AmlZUc9dl7QTFZDw mbHLn8RTLocgdsdz9kwH4lPByJpbYowNXx2tiXsjgglctgtSHPeVPq222RXaxnNIIKSg REyUtmwsvok7jLPGiq08abVszMPJ9zcveWDIlSuHe5Gc3DumvWSJW3H05MjZnsYLkCum m+mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=YN27Qk+3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a056402089200b00514a6d05de1si9037162edy.409.2023.06.14.07.31.48; Wed, 14 Jun 2023 07:32:13 -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=@amazon.com header.s=amazon201209 header.b=YN27Qk+3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244881AbjFNNUe (ORCPT + 99 others); Wed, 14 Jun 2023 09:20:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234810AbjFNNUd (ORCPT ); Wed, 14 Jun 2023 09:20:33 -0400 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B211118; Wed, 14 Jun 2023 06:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1686748832; x=1718284832; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=TTY+FiTaX7AgDqQBUwj/BsShWUwI+/hjWm+TAF5VYBA=; b=YN27Qk+3Rt9C38O7udVLhG76gTVD3bg8KbsPpPAtLVM27KoJd1LzIiop GA9ugURrJt4c8Hr1FVrhQga9K51irEEdyyIdB7rWt+zw/3AI5EbdV+jNs x793/lN3lpRuoImm7HX7zOYhoub4AH9s+Lm1M4RXotHRaeNdTGj/qFO+o s=; X-IronPort-AV: E=Sophos;i="6.00,242,1681171200"; d="scan'208";a="220608635" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-m6i4x-44b6fc51.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 13:20:30 +0000 Received: from EX19MTAUEC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2a-m6i4x-44b6fc51.us-west-2.amazon.com (Postfix) with ESMTPS id A6337A3E0A; Wed, 14 Jun 2023 13:20:29 +0000 (UTC) Received: from EX19D028UEC003.ant.amazon.com (10.252.137.159) by EX19MTAUEC001.ant.amazon.com (10.252.135.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 14 Jun 2023 13:20:29 +0000 Received: from [10.95.176.26] (10.95.176.26) by EX19D028UEC003.ant.amazon.com (10.252.137.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 14 Jun 2023 13:20:27 +0000 Message-ID: Date: Wed, 14 Jun 2023 09:20:24 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages Content-Language: en-US To: Sean Christopherson , Paolo Bonzini CC: , , Li RongQing , Yong He , Robert Hoo , Kai Huang References: <20230602005859.784190-1-seanjc@google.com> <168667299355.1927151.1998349801097712999.b4-ty@google.com> From: Luiz Capitulino In-Reply-To: <168667299355.1927151.1998349801097712999.b4-ty@google.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.95.176.26] X-ClientProxiedBy: EX19D035UWB001.ant.amazon.com (10.13.138.33) To EX19D028UEC003.ant.amazon.com (10.252.137.159) X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 On 2023-06-13 19:21, Sean Christopherson wrote: > > > > On Thu, 01 Jun 2023 17:58:59 -0700, Sean Christopherson wrote: >> Add a "never" option to the nx_huge_pages module param to allow userspace >> to do a one-way hard disabling of the mitigation, and don't create the >> per-VM recovery threads when the mitigation is hard disabled. Letting >> userspace pinky swear that userspace doesn't want to enable NX mitigation >> (without reloading KVM) allows certain use cases to avoid the latency >> problems associated with spawning a kthread for each VM. >> >> [...] > > Applied to kvm-x86 mmu. I kept the default as "auto" for now, as that can go on > top and I don't want to introduce that change this late in the cycle. If no one > beats me to the punch (hint, hint ;-) ), I'll post a patch to make "never" the > default for unaffected hosts so that we can discuss/consider that change for 6.6. Thanks Sean, I agree with the plan. I could give a try on the patch if you'd like. - Luiz > > Thanks for the reviews! > > [1/1] KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages > https://github.com/kvm-x86/linux/commit/0b210faf3373 > > -- > https://github.com/kvm-x86/linux/tree/next > https://github.com/kvm-x86/linux/tree/fixes