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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86AAEC48BC2 for ; Wed, 23 Jun 2021 21:06:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BD4761164 for ; Wed, 23 Jun 2021 21:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbhFWVJO (ORCPT ); Wed, 23 Jun 2021 17:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbhFWVJN (ORCPT ); Wed, 23 Jun 2021 17:09:13 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AED3C061574 for ; Wed, 23 Jun 2021 14:06:55 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id k5so2222608pjj.1 for ; Wed, 23 Jun 2021 14:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NGOtnJRM413AW/4WzGgBLLTqbXHQ1TD22dgtA07InvY=; b=d+7AgKkBClG4Pi7p+1wrEXh5Vw7Ffgd5qmz+Ifmsk9unDXMJwnMadmgiOclHpqjXfQ kUBsjWgXXWjEa/W2Fxm6rj+GEzi1gXYks4nUyZiLqRqd5ga3B+Ee5Xq0aR7BtQIo27jm 9BbQRI49JsfoAPU/5thquB7J164rNuol74IIAN5OWgvmS3U2tQdnkRC+R+3MZx9mNmVR LLI/O/1MYjYQ2gsbbT7X3MJOShiAQs3OcE8/9gzwELLe8sbbTu5/vXeoOUCncYxn5Kzj /Mbjkb1+zQ+iiZmr2QFRE3HciQHLuOvr7BOf/ntZp8dg83rgxas+khDXe5ereDFht2sw gcCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NGOtnJRM413AW/4WzGgBLLTqbXHQ1TD22dgtA07InvY=; b=kUHBMKr5BCOIvy/K+FMAHd2sMBDZFRHhMcSyXZPJ0MOGQv71ZwhjAQudTBd6Sjyn6I ECMrsU0uuxri4A6NrREyYdXq+AfDvRwzN0SmEf6y08qd7lDsbNSHpRyieYttDdMIMFlU spFEtFMf6bh5kyJT3eST5ZFMHB5L6AN34Fqf2Kh5xwICRONhH3sYUEQMqCYOQ4qnxVFZ nkK2hmLKuK4CouEVghJQ6m8jD/VezorxtXISBcVJuz/iAsyyYIuKROTCYF62z51jFMS7 DhU12aztbDKFzE53vwiiTLSj1+wL+Y0mwefxoS2un+XUGlDL2H2PCCPK+C7UIHgm4K1B OVFw== X-Gm-Message-State: AOAM532KgJmGfCjlv9f9lB9K23O17RZ+09NBaYzbhqeHcw9oH0OuiEvs 2pIygIu94oPxieyat8Rfr/h3zg== X-Google-Smtp-Source: ABdhPJxmcGvI6WF/6wJ4phX5MiTOXtD1weAlXETOb2PhcyTtcuAy620UrfS6qWp1nh89/XX4bqdPlQ== X-Received: by 2002:a17:902:9a01:b029:11a:d4e:8f4 with SMTP id v1-20020a1709029a01b029011a0d4e08f4mr1271615plp.52.1624482414587; Wed, 23 Jun 2021 14:06:54 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id 190sm46371pgd.1.2021.06.23.14.06.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 14:06:54 -0700 (PDT) Date: Wed, 23 Jun 2021 21:06:50 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yu Zhang , Maxim Levitsky Subject: Re: [PATCH 00/54] KVM: x86/mmu: Bug fixes and summer cleaning Message-ID: References: <20210622175739.3610207-1-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 23, 2021, Paolo Bonzini wrote: > On 22/06/21 19:56, Sean Christopherson wrote: > > Patch 01 is the only patch that is remotely 5.13 worthy, and even then > > only because it's about as safe as a patch can be. Everything else is far > > from urgent as these bugs have existed for quite some time. > > Maybe patch 54 (not sarcastic), but I agree it's not at all necessary. > > This is good stuff, I made a few comments but almost all of them (all except > the last comment on patch 9, "Unconditionally zap unsync SPs") are cosmetic > and I can resolve them myself. The 0-day bot also reported some warnings. vcpu_to_role_regs() needs to be static, the helpers are added without a user. I liked the idea of adding the helpers in one patch, but I can't really defend adding them without a user. :-/ arch/x86/kvm/mmu/mmu.c:209:26: warning: no previous prototype for function 'vcpu_to_role_regs' [-Wmissing-prototypes] struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu) ^ arch/x86/kvm/mmu/mmu.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu) ^ static arch/x86/kvm/mmu/mmu.c:199:1: warning: unused function '____is_cr0_wp' [-Wunused-function] BUILD_MMU_ROLE_REGS_ACCESSOR(cr0, wp, X86_CR0_WP); > > I'd like your input on renaming is_{cr0,cr4,efer}_* to is_mmu_* (and > possibly reduce the four underscores to two...). > > If I get remarks by tomorrow, I'll get this into 5.14, otherwise consider > everything but the first eight patches queued only for 5.15. > > > I labeled the "sections" of this mess in the shortlog below. > > > > P.S. Does anyone know how PKRU interacts with NPT? I assume/hope NPT > > accesses, which are always "user", ignore PKRU, but the APM doesn't > > say a thing. If PKRU is ignored, KVM has some fixing to do. If PKRU > > isn't ignored, AMD has some fixing to do:-) > > > > P.S.S. This series pulled in one patch from my vCPU RESET/INIT series, > > "Properly reset MMU context at vCPU RESET/INIT", as that was needed > > to fix a root_level bug on VMX. My goal is to get the RESET/INIT > > series refreshed later this week and thoroughly bombard everyone. > > Note that it won't get into 5.14 anyway, since I plan to send my first pull > request to Linus as soon as Friday. Good to know. I'll still try to get it out tomorrow as I'll be on vacation for a few weeks starting Friday, and I'm afraid I'll completely forget what's in the series :-)