Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1704982lqe; Mon, 8 Apr 2024 18:43:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVILArP/HGBTuyr/cmOrPIjfTiIJg1tLAAbckxpCYY68JIE0Ka7sF8nxNw6rkIL6zg8znjdaukT6qfnUFWB5O6M9fH0OUtCmVQysgdC4A== X-Google-Smtp-Source: AGHT+IGE45VmV2P2RROK4R7ylHG8jCOotF562/oGU65sNPO3j3Oq39EPhW7I4Q6O639xB07iJZNS X-Received: by 2002:a05:6a00:b84:b0:6ea:7981:d40b with SMTP id g4-20020a056a000b8400b006ea7981d40bmr8789705pfj.16.1712627028941; Mon, 08 Apr 2024 18:43:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712627028; cv=pass; d=google.com; s=arc-20160816; b=ASC9NSgfimU5GJqRe2hgjIMKGjUG8W3GvRcNMSygL4JfGjTf6OEmf+CNQF02cGmbP4 r8yvtqyBtVDmrjRlBmKRZ2mpIx/sJRQ485gBAoVGePhX7kzvlUqetL0EPLHtMBdOrWnv 6Z7nRZhR8icSTu/6MhLcgSrqYB90Q0O0AAvvspF8ukQAO3XuCf/b7rLhaX0tG1mwbdIo tqdfWuShUht7+Udj2WlA38GhnrBhCSqVdm7gfhrviN3b8NYJrhRLVF63HVAajri4Z2DW XMTAis2YqzkexWQAcKUJfz5tdc3D2OdtlfrORcMJnWrjiYlFt6HCtw+5nOU0X+keiPeQ b38g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:date:dkim-signature; bh=vjRIPz/M2VcYUECjNKWWApA6QeGNd1itI8GrWzco+o0=; fh=QZHjz1CdpkjCU8LdZwDYYfQnAu5L5RQ3doIJFd214Lw=; b=BdKxu3PcOEBt4hJ4M7XG41glMr2C+vAs+zYbww/DGCLKjNl3w9dP3Q3Rrgdb3qbT93 sPULKQy2Nh75cuPQjMadsdU2HDNdXkJ0ETY8ZXV1zZSCuHnNDo8/oIhRYsHzphQgwKb9 xG0SFIawseEjEgBS6lih2lBhN3yNZaSzdJjxFhUe9SBbActCC/aXFXUcAZ3tNW+lGRQY BLrwi/83q24I7PP3uoVDDfp6NLboWkf3U5eqQSyI469Q4/AcrEPTZ6ErsmJirtscboi4 4f8CnTIkFnFTMd4RQ7WmtylFEdSk/b39VQ+R5xELkO5D8JqehkwvOnCpm7jw08hkII44 c0XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=h60fPXzW; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-136096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y13-20020a056a00180d00b006eaa98c88b5si7801995pfa.64.2024.04.08.18.43.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 18:43:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136096-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=@google.com header.s=20230601 header.b=h60fPXzW; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-136096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 9A4A4284753 for ; Tue, 9 Apr 2024 01:43:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 470C54E1AD; Tue, 9 Apr 2024 01:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="h60fPXzW" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8C0A64B for ; Tue, 9 Apr 2024 01:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712627023; cv=none; b=XhQ7490fUzzJ7AwRp9u+uC4SpDClbv8UjfiNpZ2tRUPKUzDPq+wiG0K9QnbTiDHyr6dpMjtNyYcTkSKiKiKebcPmcRQ6fvYSyRP32McbjQr2XAHFJLcDbjAL/5vls/0uy2UTnLXYtC7359eUN3clSAQ5FQBr/8yWZTUGImByq+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712627023; c=relaxed/simple; bh=BD1zkFEQaCmId3mcDbRC3TYOSHb6Co89bm3mk+igess=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Wqse9ffQDbT+abhZiDCn1C8E+Ny0TMbGQRcIqjSX0/+vRXyw0E9dWad7p3o5M3TCqYhnFe97IwBT6+H3ypRXJtS9OqyOh3aA0lOSyI+iTT0b7gcns+Zj6Zjm9h5d+Ha0bMxeWxFe/AGKZVJph+8bD5a0oH3oOJvFKRrzxx9cbPI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=h60fPXzW; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6144244c60cso74634817b3.2 for ; Mon, 08 Apr 2024 18:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712627021; x=1713231821; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=vjRIPz/M2VcYUECjNKWWApA6QeGNd1itI8GrWzco+o0=; b=h60fPXzW2phobwCv85xH/q4ID8VtFL+oYbaAf4d25kwQA0EJHLlffKbezFka/GySYJ RJwfDn2OWYkXAfhhqbCyK2o5EbAMvzGn2M83Z+ww8O5T+IjmFBT7M4WAhzcE7eBC+HJA JViPODu3XP4Y3xucKlL0mVxuHQF+HfnASxJvMMMzUEC5a08/Ak+H0TmmqTF7sAlJmdrA HsXp5//RhwQhn0PDubwLGZQVwOb/lt11ohDVpdCNaztQ+mAfRYQz4BiFG3XvG3wepjQ4 dbPklnDc8zPHSnz8KZG9VC4R3tMVPiM9ibzT5fusUZKJJIOMj8vqpkLvDy5vpwaCMICf vIww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712627021; x=1713231821; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=vjRIPz/M2VcYUECjNKWWApA6QeGNd1itI8GrWzco+o0=; b=P3fQl9d2hzLGP0u0YDOnqZmCuFRrhp91+9i2aOAS0I8AUnuQhzq9kV6mtCO+zIesuY 8t8Nb6QRwxvLLMM8qwhUxxkCRTWFsJdbTMFtb+YLIGHpJEI2vbUId2PEi1ZAB/WqmOjh /sWACPIEO7qyYoN6my2AgGZaEsdyqu1zZW7V0re/UlF0NjD2uxcNqFRq2NKD0SV3Iule cD1PdvYgWCek3ymNxTphYoQLgOAwNU/wCCxTzhTSl2In9zOM6GQEL1t+Ad2XP86XIe2v GDhiOARzGQZqlM4Fb14LYOQ+cv0nXZi0a50pj7tyWPy+SRXcZ7zf1C/+X4bRtN4QZ/v5 pKZA== X-Forwarded-Encrypted: i=1; AJvYcCUhMZNPa579Ke+VKL/OYhw3XFPlduh0eTzETJQ4QiYlDgcMu9x0mt3Tnx15dAFGAbz3EiNBvOf6BbR6m9yekh/MMsAcSh+4TWSd2vur X-Gm-Message-State: AOJu0Yzcf2HSJfQm3aw5U3qwyi7/uSeJ0dZqEvpyu6hCwWsBrzI1WWF3 2AFhWoCpyxVntOfahxG0t90PrY/6s8hRaKeHXAlUT6VWc1nPnh2OAjCuXHenLy+LroTRcrHrBI3 b0A== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:680b:b0:614:881:f59e with SMTP id id11-20020a05690c680b00b006140881f59emr2787183ywb.2.1712627021028; Mon, 08 Apr 2024 18:43:41 -0700 (PDT) Date: Tue, 9 Apr 2024 01:43:39 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240324190503.116160-1-xry111@xry111.site> Message-ID: Subject: Re: [PATCH v2] x86/mm: Don't disable INVLPG if "incomplete Global INVLPG flushes" is fixed by microcode From: Sean Christopherson To: Michael Kelley Cc: Dave Hansen , Andrew Cooper , Xi Ruoyao , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Dexuan Cui Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2024, Michael Kelley wrote: > From: Dave Hansen Sent: Thursday, April 4, 2024 1= 1:09 AM > >=20 > > On 4/4/24 10:48, Michael Kelley wrote: > > > I agree one could argue that it is a hypervisor bug to present PCID t= o the guest > > > in this situation. It's a lot cleaner to not have a guest be checking= FMS and > > > microcode versions. But whether that's practical in the real world, a= t least > > > for Hyper-V, I don't know. What's the real impact of running with PCI= D while > > > the flaw is still present? I don=E2=80=99t know the history here ... > >=20 > > There's a chance that INVLPG will appear ineffective. > >=20 > > The bad sequence would go something like this: The kernel does the > > INVLPG on a global mapping. Later, when switching PCIDs, the TLB entry > > mysteriously reappears. No PCIDs switching means no mysterious > > reappearance. >=20 > Xi Ruoyao's patch identifies these errata: RPL042 and ADL063. In the li= nks > to the documents Xi provided, both of these errata have the following > statement in the Errata Details section: >=20 > This erratum does not apply in VMX non-root operation. It applies on= ly > when PCIDs are enabled and either in VMX root operation or outside > VMX operation. >=20 > I don't have deep expertise on the terminology here, but this sounds > like it is saying the erratum doesn=E2=80=99t apply in a guest VM. Or am= I > misunderstanding? Huh. My read of that is the same as yours. If that's the case, then it pr= obably makes sense to have KVM advertise support if PCID is available in hardware,= even if PCID is disabled by the host kernel.