Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1267869rwb; Wed, 14 Dec 2022 08:16:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lL0BmO6MdOK9J5mhrEwMuIkuCmi7+SRxy3wt2bbZ9g3k7e4rfGbF9ulhbOaCIu006f2ek X-Received: by 2002:a17:906:7c4f:b0:7c1:6344:843 with SMTP id g15-20020a1709067c4f00b007c163440843mr13733943ejp.6.1671034595061; Wed, 14 Dec 2022 08:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671034595; cv=none; d=google.com; s=arc-20160816; b=BX18Qy61YEJJKSwruVbS0i1izDhc9x6+lG7csXp/VOb2kevfXyUnMhQP+/vmz5szbv cNcslVLNoVPsrwAnVidjG9sXJi/EGtqhkg7HdQaM50w+7swXQUCGk9rBBxkw7IPHIP8n Mhe7OdTi+Pq9VATbgp7S6d6DmmqE0tmh6UzBwU0qQMsNnr/XOX8UJWJq2wbRbfZtZMfN Zx+tMkl3vUHSeb3A5jj8MH4T7uwG9ad9aeWZnfN4eLgjC8J6d2RfkG4gUTDoKwI5J10y G69No6ntPtJkmViJl/EnuR5kQJ1QTHCJU1TBLVmKkxgXq+bw/ork07PsGUsh0ahVQPiI Jo+g== 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=WaLTjgWRihQN7b0MKycoZ8sfbj+ZIdN/5VH6BQ1zJG8=; b=1JtY4ZeC24vKpD9QKjuoveVqzQbORpdrMk05yKGaSGxGupAnX6uX7wsa0MQiR/4IHc NM9kHWSZTSnLmyQHvUejeaLLiDMC2jLDSmHh+kKHackWqKUwgCNtbvBZvBXMltdIVYUf WrE5LFPOggN+k9Z3le2/oE81QE8x0nMhD0Fwa56v9Myi9Gx7O29hvwDpzJ04NrXlfBtb sRlPjseIH9HFo+bPjt8b27zDJeu7C/IsJMb8J+dT/eMexe/p/U/5WqGA+6drm2Bz6a4n CieQLIRU9PmbIiXYPsuTnPLPjASPSmcvRvwRTGdvqvKWwTtZUhWSPDVuq+7rAl8kp38m U0pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="XMynpH/Q"; 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 i5-20020a1709064fc500b007c1727f7c57si6987536ejw.243.2022.12.14.08.16.17; Wed, 14 Dec 2022 08:16:35 -0800 (PST) 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="XMynpH/Q"; 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 S238893AbiLNPwS (ORCPT + 70 others); Wed, 14 Dec 2022 10:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238855AbiLNPv4 (ORCPT ); Wed, 14 Dec 2022 10:51:56 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51BB429368 for ; Wed, 14 Dec 2022 07:48:49 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id fy4so7414025pjb.0 for ; Wed, 14 Dec 2022 07:48:49 -0800 (PST) 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:subject:date:message-id:reply-to; bh=WaLTjgWRihQN7b0MKycoZ8sfbj+ZIdN/5VH6BQ1zJG8=; b=XMynpH/QE30AFbSvvPWWkgXqBXOOP1Y7o2E1+jU1ZROwcipnsl43BYfWKz9UVtbJUD FVLlZIdq+s3UiL8JKNXsew7gpKRWx7wcggHKte6wQJLKVPXiwjDE/qbEqakc4+d/kCU2 o2eGMGvttgdi6SdN1OzsUGW4UtjOjHLCxTiM4PTKChd0mM4LYT3q+33OqzLuUQhMe/y6 CHMJs7HG9S6fYMPMLqzpe5LeKmvI//Ft+/64Ru0nYaHW0Q7FnON5kHJKF4RqxzQH3SYj Ivi5e5hKL/gNehXywqTOr8RChJeVoEFJydOfZFfxG/tuCv6bs8GG84qEb5uroMjXovOr Zsgg== 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:subject:date :message-id:reply-to; bh=WaLTjgWRihQN7b0MKycoZ8sfbj+ZIdN/5VH6BQ1zJG8=; b=BrQ8aiqAhxcL9bu+TMizBYi5rArTZwqzjQSdrD/7eRwOIiDbwHzT23JkobFvrKxAPT KXjhi3ICd1luGntG0j9jYBqqXgSVsI77/cNx60uTFw4xfYVZGYveu7fmwWKWahL+avtb 939B93YCrlpwwsW7fzu8F4SFj+EXowDajW9ljM/YmNBb/76o0/3k4aWfHUE5PnwdaNBm /lOPana9YGkuj9cptPTOtf0Zf8VWt/+rIfuV9GDLGelX2ZC7t61Hh8PO4fvEamaNCBUK q17zC6dk75EVgVkH32jqKIpyKiH9WOCJVioTRY/PgZQfRZOXAZS+cJeArTjl9zlgQyrw QO1w== X-Gm-Message-State: ANoB5pl5XdCRzXq9ly+7xpowJBQ8wXqJRg2RNRoz1RMrlxg5x4WgEWdz JWKlBFDMxZUgj6JnunViCWHpyg== X-Received: by 2002:a05:6a21:2d8f:b0:a7:882e:3a18 with SMTP id ty15-20020a056a212d8f00b000a7882e3a18mr576516pzb.1.1671032929053; Wed, 14 Dec 2022 07:48:49 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id b28-20020aa78edc000000b0056b2e70c2f5sm57481pfr.25.2022.12.14.07.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 07:48:48 -0800 (PST) Date: Wed, 14 Dec 2022 15:48:44 +0000 From: Sean Christopherson To: Robert Hoo Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Thelen , David Matlack , Ben Gardon , Mingwei Zhang Subject: Re: [PATCH 0/5] KVM: x86/mmu: TDP MMU fixes for 6.2 Message-ID: References: <20221213033030.83345-1-seanjc@google.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 Wed, Dec 14, 2022, Robert Hoo wrote: > On Tue, 2022-12-13 at 03:30 +0000, Sean Christopherson wrote: > > Fix three fatal TDP MMU bugs introduced in 6.2, > > introduced in 6.1? or earlier? 6.2, or more precisely, code sitting in kvm/next that will hopefully become part of 6.2-rc1. > > harden related code, > > and clean up kvm_tdp_mmu_map() to eliminate the need for gotos. > > > > Sean Christopherson (5): > > KVM: x86/mmu: Don't attempt to map leaf if target TDP MMU SPTE is > > frozen > > KVM: x86/mmu: Map TDP MMU leaf SPTE iff target level is reached > > KVM: x86/mmu: Re-check under lock that TDP MMU SP hugepage is > > disallowed > > KVM: x86/mmu: Don't install TDP MMU SPTE if SP has unexpected level > > KVM: x86/mmu: Move kvm_tdp_mmu_map()'s prolog and epilog to its > > caller > > > > arch/x86/kvm/mmu/mmu.c | 9 +++++++- > > arch/x86/kvm/mmu/mmu_internal.h | 1 - > > arch/x86/kvm/mmu/tdp_mmu.c | 39 +++++++++++++++-------------- > > ---- > > 3 files changed, 26 insertions(+), 23 deletions(-) > > > > > > base-commit: 51229fd7872f82af07498aef5c79ad51baf81ea0 > > I cannot find this base commit in my tree, where I just pulled to > latest queue yesterday. But find this series can be applied to this > latest queue as well. Ya, I have an extra commit in my local repo sitting on top of kvm/queue so that my standard builds don't fail. diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index cc3e8c7d0850..2c7f2a26421e 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -898,6 +898,7 @@ bool kvm_hv_assist_page_enabled(struct kvm_vcpu *vcpu) return false; return vcpu->arch.pv_eoi.msr_val & KVM_MSR_ENABLED; } +EXPORT_SYMBOL_GPL(kvm_hv_assist_page_enabled); int kvm_hv_get_assist_page(struct kvm_vcpu *vcpu) {