Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp88218rwd; Wed, 14 Jun 2023 12:36:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kOzo0gdYo9x3RtgDbQBXj5j7GBdyEe6074C4GG+1GUm3fzl/kbv+izpBu/pjb6S6ilU2a X-Received: by 2002:a17:90a:1a0b:b0:25b:a15e:58b8 with SMTP id 11-20020a17090a1a0b00b0025ba15e58b8mr3686604pjk.10.1686771417045; Wed, 14 Jun 2023 12:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686771417; cv=none; d=google.com; s=arc-20160816; b=DK302pVozy51m2kMhgxuh9DlFNUh7u9z03SKjmzHrZtDgXl2tk1Q8DGSs23lZggDyM sZL1kYwIUwolOSBI/x38j1wLgy4ChBXf3aDbNdnpH2BiLDJBNNNgc2OPVGhyIzJrrDqF Vwo+ShL1qGfd8ktDCBC94TRQYcXR6DKVeR/+x6jeluk9fo1NUo5VjDjW0We22GgSGA3B P6HaWT0Yz1dWxfHZwgVrFSaTtOdqtslS1A5oBUIXpUNokpqqdb6Otre264aicgdwctEi SVy6MYR3R9lzInOLbrpmZXSH7F5N4Tbe2CBflYX4i6URSHIi7OkiitwZ1VnXc+GblAki qufg== 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=R4oGXHbJy0nScfl9DUrXr2aiFTxNn0y6vjEBgrD4YHY=; b=Rl/5Oo8G85NDd6hjAW/5OWvuuW8VGBQJD1DZJQJbgMqM9LBpb4Had5Npsm3BSOKOpu aj9CglBR6aI+uKBJCdH45Ft2+yD9C+i0huc5hBoMV8If8FpjLf2yFmLfSzPJ7ab0/UW4 +JBsverkgaItwH+7miRmUbi289+xfjSbpXDU1PNWqU1wAlqQX9zNImIve9SvEE55AfpW PNFURXghtQgL2KMS/wJKu7TrJPfiMvxkhKCZAJ+rfGPe7x7hxJ/9uW17CflB41NZZXih +mRl8cpbvtQNSSjmbxsmk0GY5/67zfgicGzXcQA4GgdR75FFqP+I0g+W5jlut5AEaHBH tugA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=nOGHX1VJ; 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 oc11-20020a17090b1c0b00b0025672fbdad5si9136459pjb.178.2023.06.14.12.36.45; Wed, 14 Jun 2023 12:36:57 -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=nOGHX1VJ; 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 S234120AbjFNTIB (ORCPT + 99 others); Wed, 14 Jun 2023 15:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231901AbjFNTIA (ORCPT ); Wed, 14 Jun 2023 15:08:00 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 584131BFD for ; Wed, 14 Jun 2023 12:07:59 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id d2e1a72fcca58-6667643e4d6so468655b3a.2 for ; Wed, 14 Jun 2023 12:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686769679; x=1689361679; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=R4oGXHbJy0nScfl9DUrXr2aiFTxNn0y6vjEBgrD4YHY=; b=nOGHX1VJJGIvmuPEYJLThOxBUNYD8p50ORrVKKbBVCFp+RH5oBFXjH+xznFg3oqCa8 xb8VEcdYAWoX/WXiUXIJi8x/EunCDAJ5WJvYtu55mcNKj25XFU23lbP8VgCAZeApXtPY X5/5uXytYr/SprRnkU2euA+CJ1Wy4Ai+PakcLnr9/dF9E7t+tvGez4qYVYdEiAoHs5PN +nMR+cQYNfByy8QinHcoI10a0LyvV9twr6lJxXo0xCg/dxjXWHjYA1wUsnYUWW/0m3XC H3ksHLjWjc1yYPyaRjVle585qu30bJ7GPuqZrK+KCB6nFeXu1gM17XUjgMiHyAUYS9WQ Xv8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686769679; x=1689361679; 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=R4oGXHbJy0nScfl9DUrXr2aiFTxNn0y6vjEBgrD4YHY=; b=e/Jg7b8dZx7u2R4vNn948pSwZmn3HlOIEnXzgzPWug6XoMXhFZojEBoieXQnVFRuz+ tDQtGxGC+x+B++wbgvuEtkyS2AgGPD2C9S7rStAqayUg4rLHVAMD5ZdIkYhlEtOkyNNo VQ88wgwOIIaEszLVO/CbMvzLntLOF7+XUki7ioOHiVjj8gkYQVsccrPe/951SST4gMAE ZpXBFpEgpbi3jBu0ZMNK9sL5D7U9Op4+4Hf5Y3SH+rMmGqMVioF/yeUWMDYmTjYjw60d TTckekWk8aF4zXYZMsaIVa1wvscgfsit0aPnrTLVyuKtBZE9dWhVD4mQUm2VPGReuc0z 4iJg== X-Gm-Message-State: AC+VfDxsM/s+DNu7dlm4tcaZddv/r3p313/pq7m7lQgECV1fY6Qzf3Yc lbu6gopPhdggEyUlXWhmEWYr7TBgfVA= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a00:8ca:b0:665:bd58:c93e with SMTP id s10-20020a056a0008ca00b00665bd58c93emr798632pfu.1.1686769678715; Wed, 14 Jun 2023 12:07:58 -0700 (PDT) Date: Wed, 14 Jun 2023 12:07:57 -0700 In-Reply-To: Mime-Version: 1.0 References: <20230602005859.784190-1-seanjc@google.com> <168667299355.1927151.1998349801097712999.b4-ty@google.com> Message-ID: Subject: Re: [PATCH] KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages From: Sean Christopherson To: Luiz Capitulino Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Li RongQing , Yong He , Robert Hoo , Kai Huang 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 Wed, Jun 14, 2023, Luiz Capitulino wrote: > > > 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. Yes please, thanks!