From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2806DEB64D8 for ; Wed, 14 Jun 2023 19:08:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234140AbjFNTIB (ORCPT ); Wed, 14 Jun 2023 15:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232550AbjFNTIA (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 55F2B1BE9 for ; Wed, 14 Jun 2023 12:07:59 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id d2e1a72fcca58-65592a7cb54so6618999b3a.0 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=OCzKjqV4oZlyVQSOtKnT/OUjYJvRz6KhQD+PgxX2c+hPqW0/zwvsgZLWs3lsEjIg3g sBI9NuNKmDlKQ16CxcGJ26UmY0MdPmrrfHTDqCc0IqOyJTVr29qIhJK8HJ7YYpnowblR UaOvt9YyHMSB8LL9/aGxTkli0XMeNpCJ3CYU5sDx7PFgSOK94WDI0tWFGbS38bMYxaP/ PVgMfH1mZSWb5X/LBCJfDBnFIs9DBHNGc8Ot+NDw2I/WxZPcW21/2GHPrVkYUjjwmJnG 8E3UXmUNSnVjV1Dp0V6yYWDJM88zXF8Z92tF5HqyCbsqtzCdZbNWvXlUMJkXuACpez1a EK2A== X-Gm-Message-State: AC+VfDwAOqZDA/MnEj4GITSt0feHUlA1aYkXz7/lpLNHDL65F6Q3rrKb b0uJ13VSvjg12GRTN7uy8OMQ0CsfZxE= X-Google-Smtp-Source: ACHHUZ51wQ/2Dxa+sgAhbPBB11TqxtOBn8DzwfspQDh9sz2PfijpF6oDOmxPzuT9ZPQOc58r5fog9k55rDE= 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" Precedence: bulk List-ID: X-Mailing-List: kvm@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!