Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1737118pxb; Wed, 9 Feb 2022 03:30:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBfHwT4CavulagGP08xspcFrCza8ubBr04e0K2nHWT8p9AeGGeRbs6P7GapHwhpJjgbaqT X-Received: by 2002:a17:90b:4a09:: with SMTP id kk9mr2910612pjb.107.1644406209302; Wed, 09 Feb 2022 03:30:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644406209; cv=none; d=google.com; s=arc-20160816; b=YMrm64H5UYRqvmyThLq0PmuPm18ZRrjhMoukPNh5s31qf2pMG4iHr4U+erameNF3sE rlXhQpI0C7+yHgFpVRIWPQ6UPK1nFm3F4B3rnlExNY9YcYm11Q0KSE7lMsPD4WbnH77p pYKnS/qrOl3L3TCK56yJwLPdIxfbIao7FIxHI4mSdjwE7hPlz2btXvw28CY5h0PoaQWz PJLhJFTq3JDj/VcO54w6wPf4WcSi2kl70fw+mVflNF3F2cqUOGlb11+yZOZFw+8uryBr ODzrqdXuurxEj9FlOy6KL9Q3o6tYBY1qb0YgPLqeXuVb458oUqMxttC+j9AyH4C53y/b h+tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/ijq+SQEgOasCfrLHlBKCHwbcT+Y/IDNSQSnjTzRzSw=; b=Of1kKm1v6ZwXdz9gF8cqPABhyOUFWDYv0sBJv+hxfnDoWppB2uDgm0ipNRDvpieb4H SOI6GfFlua783PIjwI8vbIfNeF+rUubbYhVMpuG4wuzDzzbr/lgIyBcnVs5q4ZQ762Z9 POc5K8g38sFeFDN9cYkE09d5M89jJJpzbkhq7z09dKmysbhnBUPczxnA6DDsEl1a/tJp gb7FaHMBARkacwSmE4QnfyKqXimcXuJsMF4Qh0uF4AzAy+K+fiHdxSiDRPszapoJSZRz Zd7tujvvZO6+mJqiFoOs+7ddE6i7gLgdsN1UMzzxVVNxP9ToFPg0wRULYVmc8HWTVEgn Z/kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jBN9y7Bx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z9si17384178pgu.353.2022.02.09.03.30.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 03:30:09 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jBN9y7Bx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2D0AE03AE7F; Wed, 9 Feb 2022 01:51:27 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242794AbiBGVuz (ORCPT + 99 others); Mon, 7 Feb 2022 16:50:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242781AbiBGVuw (ORCPT ); Mon, 7 Feb 2022 16:50:52 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA1EAC06109E for ; Mon, 7 Feb 2022 13:50:51 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id x23so29708257lfc.0 for ; Mon, 07 Feb 2022 13:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/ijq+SQEgOasCfrLHlBKCHwbcT+Y/IDNSQSnjTzRzSw=; b=jBN9y7BxHTFMA+5Hqs8ZS/igmyf6qQbVUnCCODRSEUwBrCSjqqILU4uh0PypgUtLG5 O3bWTHyLGe7Ieqhbz9i1Xo+qNhh1Qm/jo9yFkRJvD/JCdrGdi9OpOqa23Pt5qs0rs+Qu cn4VhJQK6in+29yAAMojj2zm6a8nagBBoYCFbMRWxe7gGPuo7pUPPm2vJXdW6Pvh78Id D8ii/aNPzRzYxtROLqAlop6M4oW3n4+w99D9I08On+CJ2nM330kJWT+349yK4LVjmQfk HXNxCDZpTW98l2JBY4bzgGrMEZH3KBAmbaDZdTOhxYAcum8xSmbtJbyawind7qxDE+sh dujQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/ijq+SQEgOasCfrLHlBKCHwbcT+Y/IDNSQSnjTzRzSw=; b=W1idUBHLO58ft7mo3ZjyCY/3EGennJiferW88OryRtJCgAyXGS16SIzCED7TZXwfOp 5XUPjEC5QwgAHvwwMC6qc6kOpxTbDoOAD0E+w4JvmvDw6u7At8xZlAIiM91NqgudABEc /jZgmELUxACqNky+a+m51BDDWucV0I0NaLKRquaP8PisiKtJpHHgOZRx682uKWWL9/YI FdyOf6EAm+oK25+sxlWxPaQ8ZeBqdw/k237rZBrU2PB3sExTlIHaNywHMEL5W4f/6fVF GD05TDYXj6C5Cxjw+tFYz6QfeOQJxFn0YV5RJveGCrZs3Out7vaAYBNR16elhEp6Gaal TIuQ== X-Gm-Message-State: AOAM532TbOm1SXEdxZWv1pLQCEgHBmJNBKpFj8Kl8UxgYYs/lWfV0PMu MQeiQcuUS3dffmCTzx/H0tWlhWtn0Q6PMZCvKL8JvA== X-Received: by 2002:ac2:58c7:: with SMTP id u7mr999449lfo.518.1644270649934; Mon, 07 Feb 2022 13:50:49 -0800 (PST) MIME-Version: 1.0 References: <20220204115718.14934-1-pbonzini@redhat.com> <20220204115718.14934-2-pbonzini@redhat.com> <8081cbe5-6d12-9f99-9f0f-13c1d7617647@redhat.com> In-Reply-To: From: David Matlack Date: Mon, 7 Feb 2022 13:50:23 -0800 Message-ID: Subject: Re: [PATCH 01/23] KVM: MMU: pass uses_nx directly to reset_shadow_zero_bits_mask To: Sean Christopherson Cc: Paolo Bonzini , LKML , kvm list , Vitaly Kuznetsov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Mon, Feb 7, 2022 at 8:10 AM Sean Christopherson wrote: > > On Sat, Feb 05, 2022, Paolo Bonzini wrote: > > On 2/4/22 18:59, David Matlack wrote: > > > > + reset_shadow_zero_bits_mask(vcpu, context, is_efer_nx(context)); > > > > > > Out of curiousity, how does KVM mitigate iTLB multi-hit when shadowing > > > NPT and the guest has not enabled EFER.NX? > > > > You got me worried for a second but iTLB multihit is Intel-only, isn't it? > > AFAIK, yes, big Core only. arch/x86/kernel/cpu/common.c sets NO_ITLB_MULTIHIT > for all AMD, Hygon, and Atom CPUs. Ah that's right, it's Intel-only. Thanks!