Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp6142pxj; Wed, 23 Jun 2021 14:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybcfkj6KgPItL+gDYnCwYmlCuvAPYNs3hVanEU3eaTm0wZGw6aw6T5vX2ZC63EqUE1pda2 X-Received: by 2002:a05:6e02:1bab:: with SMTP id n11mr938011ili.95.1624482690061; Wed, 23 Jun 2021 14:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624482690; cv=none; d=google.com; s=arc-20160816; b=cE8pe334MNYHgRfDlML4G4JzSYb3740b2dl3du87Pb2up7XOJuCaugAyrUAgE4BjQL oLjmLqh3INfHhCEduuqLBS4D1GiHWsyHdTTdOED3kgUsbIccOywIEceYppPD0w6LpRtL ZbRM115gS6C9PkksxRwlYY0Qe5x7jKguCnp6bPmOk/GpiV4Xr/A19a31WUyDlKyY1rjC JSDX3OJ/rBrCGqoIHluODmBVZ8yAvbMjmt53evyEJYZwrXryvYV/JZHE2+wtY93k78Si Zx1lSJFs9fC631Uwz63SJTsRGKSAbGAG++ufFPVeWL6p7F9jgnw1pngRc4f88HgVyNA5 c/xw== 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=NGOtnJRM413AW/4WzGgBLLTqbXHQ1TD22dgtA07InvY=; b=mqMxID9nSp7hLAircg+vvmA+6ok8G0lyt+4XdaBoo08dV9Fb7DJiSKv7Zfv6iW1RSp Tx5XE5tqLkt3LyNvybsaGu/6bcSLkcR/qbJziYl+oWryn+w1KT1jhMANbsp6RwDzsJ2O +djkdzZe2/zvIpOnjweUHPLF+LW0j/zKufSjFmd50J15/PcK4+wy/p6CqpOcUuOyJZGV rCsOF/fBjY4Gz8EtkyyH0kpAd+mFP4sgj77UedASA0wyd5rDfcP2VybDKQUdnuyaBolQ RBlX+CKjvSNHIAJywzx5KrK0C7nVYX+WhWCBdnI88YWau0ZxNQ7PqI8LCcls6w+416zW bCNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=d+7AgKkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si29778iom.21.2021.06.23.14.11.18; Wed, 23 Jun 2021 14:11:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=d+7AgKkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhFWVJN (ORCPT + 99 others); Wed, 23 Jun 2021 17:09:13 -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-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 :-)