Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp450564lqg; Thu, 11 Apr 2024 07:48:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXq4+FV7T6s0RqZt06cYQ8ven5b20+6QsvL9avnwsWgpNC5Rgz/qo5/CMM8qurqeZwOiR771I+Oek3EBITIdMu/itp590mRaiqnFEPyEg== X-Google-Smtp-Source: AGHT+IEWqCOjKRytoxx8rPmMYxBvLVcQMiR3FIPvE96VvBOuh1mokmjfFB7mW7ipzJFaG0tUVWoY X-Received: by 2002:a05:6a00:22c3:b0:6ed:1012:93ed with SMTP id f3-20020a056a0022c300b006ed101293edmr6418426pfj.5.1712846905128; Thu, 11 Apr 2024 07:48:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712846905; cv=pass; d=google.com; s=arc-20160816; b=pkd9Y4PdbSFYCMI9XBu3K4sMFfB0ukJTpnB3XnmshqppYfIVylrhYJLTEhFJ+FRD8U qpdFqZpJ+Ekiuk7nI2K9pz+HAsPRCrNlqJSwxrkZhofqozENnxb/AsqYskavvMzDNuHw J5lyhIkQx7rGiMtd8fgagwEoV+d4xd0MHt0oU044UtOwHgf4DDSulqrwGwY9gOOYqvJx 2f7LT7nXYh2gOrUud03WE/SeRvry5qAgreYhY6X1RjWHNic0zCKKyNzjBc/Ca7WMSyp8 moBC9isa4bZyMRpMym0iNtdn5RdLnJwjaTv8ZPMPE+W0ddmTRboWMmpUmgBNR3FrCHzY w7sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=QVhpAEmxCGgqTVVaUx5X9K31vzTtbdJmPQ0+U/i5mM0=; fh=IQSoyHA03lW/4FFUJpz+fI7aqBno0ftH2gQe/cJLp/E=; b=O4QAEdyL2sg+eP+aYhNgX9sRO6lT3dh4DXs3OiAD/CvHjulbkXSNSpZCgoyyvOPArb t3SH8giPdBJrEG4p6DVK+tpkdhZGCg+AOvL3Xaczd1O5ulyBvW/y90TAv0Rjvn/Oz0tM faZwPiKOJydvNHDHycim9N2TeUAJKxGoHf2PMBDWiWOh72OMYFMfEwaPRU6Il2/ypX7I +kJuashWPi5N1k1+J7dQqRj1BcYutAaz5GFgEVeyRszKuZEfdcz7TskfFTJF54ippcBR s8JvRkBwm5nZdoBXLCZTWbbjQGHgYARj3Oe0VN9ajsnOoBWQuUfSU8+KZEnyz7o0xvwb w6Ug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=QWS4LBIf; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-140692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s22-20020a056a00179600b006ea8c975ef0si1524589pfg.398.2024.04.11.07.48.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=QWS4LBIf; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-140692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CAC8E283873 for ; Thu, 11 Apr 2024 14:48:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72D6FDF44; Thu, 11 Apr 2024 14:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="QWS4LBIf" Received: from xry111.site (xry111.site [89.208.246.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC91D530 for ; Thu, 11 Apr 2024 14:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712846898; cv=none; b=nHTx1ooG9d3grytDl9s++ZHD7sBLt9XrQczab9ccunFITxMomocfl3cnWcaagYuIXF/SVbNxXvQeR7eseToGU1QB6egT/ZG5f9vWT4zDQr6JdOfBL2Ids7IzLvj8999xoLsmJHnd4Uin4O1PNZFuV7CqgYVY/m1nTg4CiVbfBRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712846898; c=relaxed/simple; bh=wjBgk7029GiJIT3ORMbsWBEnFRbSTbg6nXwPGUXtmG0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=r7A+Dia36kfnuNIswsVahdVqODBhZv5l0w0NCrO9/6G3y17mgw+qAsGvPmGrdbeh9gqA4JXV2jSl8j2R0EA2byy93N2yHLgvjD06bND9tVNSG/R5Db21n7muzx6h5iC2WWcQc7QhQtrWyODOG2c+4cSLA4HpsBmUvNnfXGjTQ+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=QWS4LBIf; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1712846894; bh=wjBgk7029GiJIT3ORMbsWBEnFRbSTbg6nXwPGUXtmG0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=QWS4LBIfeGBLa4KXZ/CG7I2X2Lp5C5rrVF3/E861PnlYV+IY8vE4OhXSl44VztRiz 9KP/WqY3yHGTnKUxjntHFH38wJhQ8h7NTaV9kjWicwVu+3lvS30ejWgPy764e3Z3Qo SWcE3noACDMma+WjU6RX+YCgO/ymTajdvPXdcrBU= Received: from [192.168.124.10] (unknown [113.200.174.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id A475466EB0; Thu, 11 Apr 2024 10:48:11 -0400 (EDT) Message-ID: <1f5d53596e2ac8948332570e3bda17c3877fd499.camel@xry111.site> Subject: Re: [PATCH v6] x86/mm: Don't disable INVLPG if "incomplete Global INVLPG flushes" is fixed by microcode or the kernel is running in a hypervisor From: Xi Ruoyao To: Dave Hansen , Dave Hansen , Michael Kelley , Pawan Gupta Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Andrew Cooper Date: Thu, 11 Apr 2024 22:48:07 +0800 In-Reply-To: <3ee70b6c-3399-43f9-8934-cb5a0e51f006@intel.com> References: <20240411104822.6429-1-xry111@xry111.site> <3ee70b6c-3399-43f9-8934-cb5a0e51f006@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-04-11 at 07:44 -0700, Dave Hansen wrote: > On 4/11/24 03:48, Xi Ruoyao wrote: > > + /* > > + * The Intel errata claims: "this erratum does not apply in VMX > > + * non-root operation.=C2=A0 It applies only when PCIDs are enabled > > + * and either in VMX root operation or outside VMX operation." > > + * So we are safe if we are surely running in a hypervisor. > > + */ >=20 > When you revise this, could you please work to make this more succinct? > The Intel language on these things tends to be a bit flowery and is not > always well-suited for the kernel. Oops, bad timing. I just sent v7 before getting this reply. I'm not a native English speaker, so could you give some hint about how to write this comment clearly? > Also, saying that the erratum "claims" this casts doubt on it.=C2=A0 That= 's > counterproductive.=C2=A0 I believe the current documentation is correct.= =C2=A0 My > original ce0b15d11ad8 ("x86/mm: Avoid incomplete Global INVLPG flushes") > should have considered virtualized systems immune to this issue. Then do we need a "Fixes: ce0b15d11ad8" for the patch keeping PCID enabled for guests? > I agree that it sounds weird.=C2=A0 It _is_ weird that systems running un= der > hypervisors aren't affected.=C2=A0 But that's all it is: a weird bug.=C2= =A0 The > documentation is correct. Yes, these hardware issues are just weird to me... --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University