Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1821641lqe; Tue, 9 Apr 2024 00:56:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2jCNpMF18pSKcLPp2C+BPandyzqVJjOrPLKYnKRxL/05CB1xcqyn6bifki7XF1a/UpDUyWMxV4p+Fs8YQxxc2Lz/ZOv08G6KH5jjM1w== X-Google-Smtp-Source: AGHT+IFU7ShQFB0xkV6G/D3itCYmWSR3/k58ivbYKMRRSbKSWk9V1O+prqMq7LriDirconvh5e9B X-Received: by 2002:a17:907:7ba2:b0:a51:b0e1:863b with SMTP id ne34-20020a1709077ba200b00a51b0e1863bmr7762876ejc.1.1712649403159; Tue, 09 Apr 2024 00:56:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712649403; cv=pass; d=google.com; s=arc-20160816; b=N5TQYIroZ2Qx37CK4HDwE2PVaJJ9HpPKiyqdPdDLxkE8SuBxJTIJ4JbIHFk/I/3iVz 3NDteE2fLWeZRvuhwORIMh/VBxWoZXrkDPkOFkD+W5aQmxHR/O2GfuMsn60ECVhprqfG ojgGOMh89hBx4+VOWQr9Bs5AnLX2/0PRjcWvT7hEwRnL3OozxUMachcbBY9/Xm3a/EGT 7bgTkLU8OTRutG106EeiCY0kg+6QqOhXfI+k+gofntk2LgwNJekpwUvsdZzk5S5Nkwv1 dPmne15hHayoff1HrK3isfG0FgU+8St6B6h96L8jrUOW4uKXiklEqw/8aoHAuRrbJQFq 71NQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=eLRrmyrkSoVdDITv9mGHfqqiu3Rslw82mlx/smFYYTw=; fh=gNNxlg2n1lEY0umycaDomU22YedfbF9S33uadNZtfbE=; b=wg8hle9CPlMqbYegaHYixKJbNLMYq+78KStiqvhvRDYQznIMKy2//tOeDI0XLmL+pu 8N6H7EtohQgWMWMv9BSnGbpMLO6goRHhU0yYLk0OAaAQGLuhYrHoFvGeuxEw4BoA+Ivz md4z9DyIgM2KHsTp9galGwXCM+F36YdBHs/R/YtssC2n78tJG/5lSlNB/ykKjd0lZiMA eNNHl8/HbGFDtFcoWSJMYWNK/0oNLVrSlvaahWXQW0R/1DE89keQJ91/AaYeMe97jcMk LcXokb7SqQfedSdcofC/yR/TonM+LbAWRJN2NCUl//aTkIZv6/mYCjehSEwM9L0fYDQZ qbPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b="rb/nEBMZ"; arc=pass (i=1 spf=pass spfdomain=cloud.com dkim=pass dkdomain=citrix.com dmarc=pass fromdomain=citrix.com); spf=pass (google.com: domain of linux-kernel+bounces-136395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j18-20020a170906051200b00a4e47db064bsi4449060eja.141.2024.04.09.00.56.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 00:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b="rb/nEBMZ"; arc=pass (i=1 spf=pass spfdomain=cloud.com dkim=pass dkdomain=citrix.com dmarc=pass fromdomain=citrix.com); spf=pass (google.com: domain of linux-kernel+bounces-136395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8D52D1F22DD0 for ; Tue, 9 Apr 2024 07:56:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65D807D3E8; Tue, 9 Apr 2024 07:56:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="rb/nEBMZ" Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 C634F7C6C5 for ; Tue, 9 Apr 2024 07:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712649394; cv=none; b=UL2h1qAXlbPguqxYGk6Dmk5m3Iji8i8zBAKn3vd2WdICRwzLKDIk61w6ozpDIYjpGvfodNqQn1HrkDE37SM6j2ao80+X0RXWZYMANVkp2n1WbgZ5e0l3pzSfJcbXI7FYRsu6DgzNme4zsRkWG9nQbdGMiVstj78cOLaYFjO5jPY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712649394; c=relaxed/simple; bh=J+1B+SztGs+d9sY3z7ovEHaFKiQTvjRrCrrMd0lPWvE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AdZYnIWq9aw4TJii3ulk6GF/nAR10oMnHsHXQnAOMuWx3kwzJCFyOXASAKdgRKwj0e0X+pqtgLkt2qzY2yEttx/u+cjyHMpGmnVXDjUZ9aH/Kmrp6QuZQXE3vS4P2EQQvRm/egUF4CkcxQA8cpd+KNBQxA0YpxXsaoIFtC6Btno= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com; spf=pass smtp.mailfrom=cloud.com; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b=rb/nEBMZ; arc=none smtp.client-ip=209.85.167.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloud.com Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c397193878so2780446b6e.3 for ; Tue, 09 Apr 2024 00:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1712649392; x=1713254192; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=eLRrmyrkSoVdDITv9mGHfqqiu3Rslw82mlx/smFYYTw=; b=rb/nEBMZePi4rvK1XZ3mwYqp7xJZhFmpdupJh8DB8dOXUzkf/n01JDXw1KUME7/+En 69V2TwW3pHBoUp7p8gn9nyUKtgFknrbJgU2wTxrGQB4ha0I4nOBMyWHx9skYXyj/5Kzl fgW1DdMSbLQYAHnLy+Z5jqtVQmDXp9Gok+rQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712649392; x=1713254192; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eLRrmyrkSoVdDITv9mGHfqqiu3Rslw82mlx/smFYYTw=; b=fUIP6TZmKfPNkyTsTv8eNOoEQFy9+6NAvZGoYHky34YZB/hdYoriwuymAGjEA8pYA+ L7sbvFE4uxo6IPNNS4wL4W0Om42Jr4chLmUWyrvJI3l+kl6R5zbmPEZ9ofOzAHXdx0YT nnUxUW2DQWEGf5sCbz4Flr96juBtfDA2MRmmE2/ejn7Z2ug6r0mByQFeA4g6LfbxvgH3 wDeSR7R0qXW4ILnwzoxDpNaPDUuNJRjpfqK3SJ0/ooOChf/PDGPXSt6gcBUC2LTMIXm7 3B9YRwD6c1Isl1dWYg1Z8lo1CK8+TjPVvM/cQNn7lANI3hBd5UjYulY2I55CxTkObkGH t7YA== X-Forwarded-Encrypted: i=1; AJvYcCUiWAVdb+ZLACt4bkXOIsNRlAx976sYG9+GiXJBphHMZC6qjssnky3SnJY5dt1CZmxp1/Z1E5eZsLTxHzU4B1Jczrl5lxAwX24ucjK7 X-Gm-Message-State: AOJu0YyTGMmtcV8AR7awpaeYG93ZzmgKvp0MwpD/cP1zyv8hJyFB0sy1 9tCBax8axFLylxPZg1L3LIsT7ReaKccuvNv+q5nxLnlUofbbkd+W2ybQo3oeAAw= X-Received: by 2002:a05:6808:b0c:b0:3c5:f7e7:e3e0 with SMTP id s12-20020a0568080b0c00b003c5f7e7e3e0mr4067700oij.22.1712649391898; Tue, 09 Apr 2024 00:56:31 -0700 (PDT) Received: from [192.168.1.10] (host-92-3-248-192.as13285.net. [92.3.248.192]) by smtp.gmail.com with ESMTPSA id qp12-20020a05620a388c00b0078d704f9867sm280735qkn.71.2024.04.09.00.56.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Apr 2024 00:56:31 -0700 (PDT) Message-ID: Date: Tue, 9 Apr 2024 08:56:28 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] x86/mm: Don't disable INVLPG if "incomplete Global INVLPG flushes" is fixed by microcode To: Sean Christopherson , Michael Kelley Cc: Dave Hansen , 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 References: <20240324190503.116160-1-xry111@xry111.site> Content-Language: en-GB From: Andrew Cooper Autocrypt: addr=andrew.cooper3@citrix.com; keydata= xsFNBFLhNn8BEADVhE+Hb8i0GV6mihnnr/uiQQdPF8kUoFzCOPXkf7jQ5sLYeJa0cQi6Penp VtiFYznTairnVsN5J+ujSTIb+OlMSJUWV4opS7WVNnxHbFTPYZVQ3erv7NKc2iVizCRZ2Kxn srM1oPXWRic8BIAdYOKOloF2300SL/bIpeD+x7h3w9B/qez7nOin5NzkxgFoaUeIal12pXSR Q354FKFoy6Vh96gc4VRqte3jw8mPuJQpfws+Pb+swvSf/i1q1+1I4jsRQQh2m6OTADHIqg2E ofTYAEh7R5HfPx0EXoEDMdRjOeKn8+vvkAwhviWXTHlG3R1QkbE5M/oywnZ83udJmi+lxjJ5 YhQ5IzomvJ16H0Bq+TLyVLO/VRksp1VR9HxCzItLNCS8PdpYYz5TC204ViycobYU65WMpzWe LFAGn8jSS25XIpqv0Y9k87dLbctKKA14Ifw2kq5OIVu2FuX+3i446JOa2vpCI9GcjCzi3oHV e00bzYiHMIl0FICrNJU0Kjho8pdo0m2uxkn6SYEpogAy9pnatUlO+erL4LqFUO7GXSdBRbw5 gNt25XTLdSFuZtMxkY3tq8MFss5QnjhehCVPEpE6y9ZjI4XB8ad1G4oBHVGK5LMsvg22PfMJ ISWFSHoF/B5+lHkCKWkFxZ0gZn33ju5n6/FOdEx4B8cMJt+cWwARAQABzSlBbmRyZXcgQ29v cGVyIDxhbmRyZXcuY29vcGVyM0BjaXRyaXguY29tPsLBegQTAQgAJAIbAwULCQgHAwUVCgkI CwU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rs 6+ahAA== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 09/04/2024 2:43 am, Sean Christopherson wrote: > On Mon, Apr 08, 2024, Michael Kelley wrote: >> From: Dave Hansen Sent: Thursday, April 4, 2024 11:09 AM >>> On 4/4/24 10:48, Michael Kelley wrote: >>>> I agree one could argue that it is a hypervisor bug to present PCID to 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, at least >>>> for Hyper-V, I don't know. What's the real impact of running with PCID while >>>> the flaw is still present? I don’t know the history here ... >>> There's a chance that INVLPG will appear ineffective. >>> >>> 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. >> Xi Ruoyao's patch identifies these errata: RPL042 and ADL063. In the links >> to the documents Xi provided, both of these errata have the following >> statement in the Errata Details section: >> >> This erratum does not apply in VMX non-root operation. It applies only >> when PCIDs are enabled and either in VMX root operation or outside >> VMX operation. >> >> I don't have deep expertise on the terminology here, but this sounds >> like it is saying the erratum doesn’t 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 probably > makes sense to have KVM advertise support if PCID is available in hardware, even > if PCID is disabled by the host kernel. My reading is the same also.  Seems like VMs are fine. ~Andrew