Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1543757pxb; Tue, 8 Feb 2022 21:44:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJylcGOxkCUD8gjO2sjN1sZHhaVgfwGRIZWwYidoGJuerom8+fWCVyJTRc0z0Vv6MDSO3kib X-Received: by 2002:a05:6a00:2486:: with SMTP id c6mr644362pfv.21.1644385494284; Tue, 08 Feb 2022 21:44:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644385494; cv=none; d=google.com; s=arc-20160816; b=K0xVY81I9Z52Lt6oVzgk5EVOBjA5p+jFr3lLmANS0qo43cy+W6bwAID3EvwwUlhSgs qUnyYeBjOFNMA+xvtLE7R1IdH6N80DG5Q0NhT+j32HiBLdp4GfRLF6rIT6A791tKzl2l kg2sd6KRJuZe0YEGq01f7SGSoj3ZCJQCPNkF0SgwoSxZVobGJF5uAWMuvc7dmIHgSDdX 0YHGvmOruxWYkj01iwrkAvb/YleKY8QDteAs+Z6FwT2INE/MXSiSM9S5b6kSoDYLaqL8 CtXRZyIbRObCOyMXMmapctEWuaxu6Oryg07chxdIaPClmV0sLDyASxSbR68lTXI4I4IJ JfDQ== 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=xiSBzPQnTG+yIHuJ7k7x6ADsNTF+1w12491gzVcMAFE=; b=ojTfh1kykuRGCeazccv82F/qbsEdQiCIetMAQwzLtcOkys1rLTjwq7+xMPvoYhP0C5 DeD/ML+F/2suxJWpKCkjrhwO70/KZSW59DOixfnfUsLcefT0FIFedTLqkfv+Oat5ebRn qKv12c37Of2pfwxzaf+hOghsyhjeZctW2E1yjH6oUcMtnNC8oHwAoUbjPOEnM64Z/C43 b+Uq4npW3WnxrtWGMuxfGQULGbAUyLTSKEYA1Yt5UAv0H51NKkRO3RRKHds68k3vNqyW Klecs8pSyBL5tGYu1MdDFXLymBQz77w5ZLLkxVtxnYL8XSZ7utiSk6ccXNzWTLFZb+/+ 3IIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZbB3crbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w19si17519691pfu.4.2022.02.08.21.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 21:44:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZbB3crbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 2D462C002B4D; Tue, 8 Feb 2022 21:39:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380473AbiBGQOp (ORCPT + 99 others); Mon, 7 Feb 2022 11:14:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232706AbiBGQKE (ORCPT ); Mon, 7 Feb 2022 11:10:04 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF7E1C0401CF for ; Mon, 7 Feb 2022 08:10:02 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id u12so4368942plq.10 for ; Mon, 07 Feb 2022 08:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xiSBzPQnTG+yIHuJ7k7x6ADsNTF+1w12491gzVcMAFE=; b=ZbB3crbAr+DzqHrDW5Wa8yEKGFB41seBarYw/+E5gPl3dirtURFGGzZ5zhYw3d1vg5 FdW1Gih98v5ar8dHJBsPRS7twDQgTBUtxRh3/aLC4PuerU5TfB9hvDDGxs+xE72BGbe8 vxo84b+Mkfy5EU/P6GHDHkw5M3Ukn9Kn1G8ZOlG4BGoNjSCXabmc0C3yMadA5vBZmddf vU8HLzOLMQeRJTdxuj/Uzzqx62U4WyDC4oMoJM6mJEQ/NP2wOOiN/Q59NINXhQ0cdnJM R4H9/dJBXlmZTjjEn/6KotsLQzQGNfMutC0lPaHyHoSpVj6AmKHbmSJVa2+pwlNVhEuQ l6pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xiSBzPQnTG+yIHuJ7k7x6ADsNTF+1w12491gzVcMAFE=; b=QHOg6gjOvBNbtSSMadPdjQYeabf+zDbcDN9EXQBJEFg/KixxxSOyaPoFPvv7KyAR0S mDCI1wAtKAso0VA+j8iCZ8p5s2oON0eUdWpP2vVR3BCwqsRxrnu13CoHrVsNKYVqeD2j /GxQr+upl+2gCpJQW3EP500qO7FbVar+tP5FzcQt/lG+LCCEVWpTli90TjRn20WuilL8 tmv36jAhdz8XGhEQq0EH/kTwLCzRIlKC0bnhBsiXLrNxnDgxmqQU6UQIBVwJVrUjyCuJ pJ95HIWF+sv4LUSLXbD4Xy/xLzPM5r5jxLFeRo33F9SbEmL6IJmvev3zLkIBRpY5aRju FmRw== X-Gm-Message-State: AOAM53345WE1UMbP2+VhjcfwLEVIn2hPYECJTq+QKyqEMbEh1kERiubq haskA3HrpsvJphg1Nf8/lOt6FQ== X-Received: by 2002:a17:90b:2251:: with SMTP id hk17mr19523346pjb.210.1644250202261; Mon, 07 Feb 2022 08:10:02 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id s32sm6788998pfw.80.2022.02.07.08.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 08:10:01 -0800 (PST) Date: Mon, 7 Feb 2022 16:09:58 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: David Matlack , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, vkuznets@redhat.com Subject: Re: [PATCH 01/23] KVM: MMU: pass uses_nx directly to reset_shadow_zero_bits_mask Message-ID: References: <20220204115718.14934-1-pbonzini@redhat.com> <20220204115718.14934-2-pbonzini@redhat.com> <8081cbe5-6d12-9f99-9f0f-13c1d7617647@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8081cbe5-6d12-9f99-9f0f-13c1d7617647@redhat.com> X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 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.