Received: by 2002:ac0:b7d5:0:0:0:0:0 with SMTP id v21csp16412ime; Thu, 28 Jul 2022 15:20:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uQvNvtFljHHlx6wJnErR08k5jF7MhsjVg/CwFgpjV2H5mM5Qe/bbISkOyCcfby1mmMyr86 X-Received: by 2002:a17:907:724b:b0:72f:32af:e9cc with SMTP id ds11-20020a170907724b00b0072f32afe9ccmr713152ejc.308.1659046842428; Thu, 28 Jul 2022 15:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659046842; cv=none; d=google.com; s=arc-20160816; b=HahXviWIElmqRodwEcAADGmRi47zlRk8VNPGUwHUNa509yw2lVx5g5hphKxF2clTLB RVUTeIL65unhArenJnXDuc62aLn129rmHfiNNZlTIuSXQyD8lBM7wIZZhlCeT2AVu3sT w00daK3R13w3h7DEwTJLaWM9dEJtBETRwdEGvwERydUkBIHxATvnaOopJ8l54x25BKZB piWp2hB7W1K8Lznf/bFaeWX/HCxrdK4kBSvai9k4AL975e1HmYrhmXaHHvtAFQ9YV6UU 9wESUttMzh4nsZAYR0Js6BfrVkIbpVXwlzYr7PBoHA0dklHQqQZHf+bdCMdD31xpjqJE YJHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=laf7q6oYf9Z/b7tIx3bAIteJTyiMhy6ysUSu6EBmMNA=; b=WQSG7q2XlmOOv0jlBG+seaRKDlpewu9CSo4rkJusXMKuOo3GS118KM3DYw5WxCnHem 0s1kVEKSLxNXlCdVx55xI6J88r0YwyJkhb1WCriPfA5pZZVKe/ZuKruBzXuRitl3KKdc hMT0QeLq7MLbZ281ggWrnFBLjlaIoko9awvztYvBLhbKm4RCZCt5vb9+k0eBnZ1lHMGq UzZN1bU5n3bkr4E1BWEZb3mCqbimGLh+/E6wep3UcPlGSnF8V+OEWEk+RlwYMEDi8n5+ Tkea1MxW674tohr2wsmv59/I7JNJpsCFWtUf3vTuw6YBC/3hVniWmMXOWK7BV5BOWeAD PiCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QsQ3KOE3; 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 us6-20020a170906bfc600b00711dc674239si1421577ejb.726.2022.07.28.15.20.18; Thu, 28 Jul 2022 15:20:42 -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=20210112 header.b=QsQ3KOE3; 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 S231811AbiG1WQA (ORCPT + 99 others); Thu, 28 Jul 2022 18:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbiG1WP5 (ORCPT ); Thu, 28 Jul 2022 18:15:57 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F29E785AB for ; Thu, 28 Jul 2022 15:15:55 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id w63-20020a17090a6bc500b001f3160a6011so4718886pjj.5 for ; Thu, 28 Jul 2022 15:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=laf7q6oYf9Z/b7tIx3bAIteJTyiMhy6ysUSu6EBmMNA=; b=QsQ3KOE3m4TyTQM9LsLSBtiJete862hT/8UaEei6hLSwJKu4h3rNuFCUwCAWIlc0SC cEAVZxb+jZu/1fmYw8X+W8v2J03cYYEExzIdBU2h54bnDKvcJa9Pq/ah32XkpVJFv4iK +XR9jyfqM4Z/gd0tzKDjIXygZLdYSIlQltOTxD353HAnFsEJc2Igz36tsacf/WTmknaI yOIV3qjfBE3h5GYBWut4osLaTLDQKH5qHfTF+BLO0NgpryS5GNwhn+zRmX8OzxBcsmCi CQRNjguPjuq0luMYZE/l8T9MmqsSk9Qi6tHUOBD3r5qYO+unzv1xOgKJVkMfUYeeFvk9 vOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=laf7q6oYf9Z/b7tIx3bAIteJTyiMhy6ysUSu6EBmMNA=; b=psoTudyqDNZpigr8o0XKQzEz5RKNk6BtAedc9YKrrNY/LcPRWf8ul9f2R/jg0aXsnk tyTQw8IYq4h/Oh+nhoPep7nNJdCV/0mMKi3+7Am+ZwyBb+FQoQoVswLxO2yOLkQc9G0M AuHKTJ6nAzSF6GQb2HohD47SmzXvn1rbx9tVesJ5Ii+ByLGQiLPLvfOZdLjzLs2X5KNQ uqk8zqwwALeTDo2aX7scR9UJYI/yr+2OqQ1/L8SqxgvfCoLGrKPyxDRHvxT2pEYdEGGD wXu71LVNQeNY4G6AFLEuwjt5UGM1fToZJjNBsIChoCYuFgzBXs/IOX52V4vynCa5bU8s d1Cw== X-Gm-Message-State: ACgBeo2yZWWR6mo7BQ0bRNq2c6X1XcjHWDYK5X3HasYQd/gUPZ2muwS5 ybFFyQ4gan/Nt73oCxwc9luAjA== X-Received: by 2002:a17:902:ecc7:b0:16d:66eb:bb88 with SMTP id a7-20020a170902ecc700b0016d66ebbb88mr936716plh.170.1659046554544; Thu, 28 Jul 2022 15:15:54 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id ft18-20020a17090b0f9200b001f2f64eada6sm1492299pjb.51.2022.07.28.15.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 15:15:54 -0700 (PDT) Date: Thu, 28 Jul 2022 22:15:50 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yosry Ahmed , Mingwei Zhang , Ben Gardon Subject: Re: [PATCH v2 0/6] KVM: x86: Apply NX mitigation more precisely Message-ID: References: <20220723012325.1715714-1-seanjc@google.com> <08c9e2ed-29a2-14ea-c872-1a353a70d3e5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_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 Fri, Jul 29, 2022, Paolo Bonzini wrote: > On 7/28/22 23:20, Sean Christopherson wrote: > > > > Anyways, the bug we really care about is that by not precisely checking if a > > huge page is disallowed, KVM would refuse to create huge page after disabling > > dirty logging, which is a very noticeable performance issue for large VMs if > > a migration is canceled. That particular bug has since been unintentionally > > fixed in the TDP MMU by zapping the non-leaf SPTE, but there are other paths > > that could similarly be affected, e.g. I believe zapping leaf SPTEs in response > > to a host page migration (mmu_notifier invalidation) to create a huge page would > > yield a similar result; KVM would see the shadow-present non-leaf SPTE and assume > > a huge page is disallowed. > > Ok, thanks. So this will be 5.21 material even during the -rc phase Yes, this definitely needs more time in the queue before being sent to Linus.