Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp438489lqg; Thu, 11 Apr 2024 07:29:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPoVJUOB/ROUSDTI8vAs70aAe6YxMeuNoiLyA8z96lbhky4qkf2H6Vdz/nh0GKPMmilUyysiepTI6C2z66Lu7uAWQsInUd0jb0qH+oNw== X-Google-Smtp-Source: AGHT+IHR/Whbm8GZk3m5f8F1X/Uqnal/T8EK3jJoS94fRdHFvZ07PBdqAIuxKJocbEsKvCi/UnmY X-Received: by 2002:a05:6830:601:b0:6ea:3538:bef4 with SMTP id w1-20020a056830060100b006ea3538bef4mr4689405oti.26.1712845795472; Thu, 11 Apr 2024 07:29:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712845795; cv=pass; d=google.com; s=arc-20160816; b=W9lBYN11oQ/e5GkoXiiMsj7w4sELLdEfWMOxyFPXgZBVHtR8sXOOmPl6o3vFIsP3NJ 1zFyA1xvsrTf8ljbqF6QpTP0QZo3QJtU/UAl4iD4SJQJ2flIsn3EhbhPR++oPSaizRoK blOT/jc+uuPLBmlcJvTIdQpfRBXYJaMwgpwZr/FvcubAc10rTke7dngRmkmsnjTvakG1 D2JZNVrpedCa9rBk4VIEig9JEdzwxrOT6K2iNbh/5is0SP9GM27qy9Lun2kkEdzGAFoc hxcat5hKgmDC5KLEZHwJfC+H83PAEZD8VpwD3mhOGK2pera1KgH5zXALByVubYNK7pjF 5OYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=JJmBDRYpQVGPOAzl5ekp5wY5VwMrYDSR6T3I1ZkBMGQ=; fh=w03VlS930kjVt4rF408xQae5RDvmc2ww142YUC569ms=; b=V0WpwGechNfV6LaiQ1NedFraldplf7RFpmBvvyzTJoB3q54WMmwmGbcG68blQvvDiR 1xkDZ2OPsImywok7FdTwBXU8fb/m+ddmIp9z5TPpLO9u3o/2Bt+60D0dv3BS3PHGjzOu hQY+b/Z9Xtr66jXU2Yu8KDZAATTsZ4Yoi0KLMSuMOc/s+2FIYwcRQGAigpgQgx4erQ+d wqBIJ9V4XfHiLahydyKcucNdO+HWe4383kUh8onjeurMUAUSrsgnOSXJFNH1Ah26O3Nm D8inh7l8YX95H+BCDelflvdYV+6dy7osskukoE872PBcalLYpZjNwI8Pz8aBnsQM8J9G p7lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=XkmyBtAA; 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-140651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140651-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t16-20020a05620a0b1000b0078d50be5d37si1590205qkg.87.2024.04.11.07.29.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:29:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=XkmyBtAA; 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-140651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140651-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F95E1C21C4E for ; Thu, 11 Apr 2024 14:29:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F7FE14EC65; Thu, 11 Apr 2024 14:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XkmyBtAA" 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 5C5F4149C7F for ; Thu, 11 Apr 2024 14:29:21 +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=1712845762; cv=none; b=bmh1z+ZcDGzJHdTQycjj3aqwLcTeykABNVvD+qBS28ViXiw0nUP1HUGxSfsl3mWGOJep4LLqMvq5AvRbZbC1qwCPnnnuXDXR1Ux1Rwfo1NmeRCYKS3DG8xSYW3QTHsf9XwarZBHGVaDQ0S0pbemz7LNnv4u6HtLSkCoCnmT/KZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845762; c=relaxed/simple; bh=x55n7vjcJdyUEJvdibwMdhPTKR2vStUWN+qbo2qhmPk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=B0H3Qj9rFVPIKlLY94OsCoEHSNJAFEA9TIq/UUSzs71XUvQGJegTxOwH+PNih4+RYKLTLGITXNAWtSuTBlGesmH1DqolNbfWsr0qTWxguUCs6cqTySzuke7KSbTMLO4NHNE1YVEs+GY18cjkWty8zODDyyh6hhOA9OBX6r8zIPI= 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=XkmyBtAA; 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-618409ab1acso33856857b3.3 for ; Thu, 11 Apr 2024 07:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712845760; x=1713450560; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=JJmBDRYpQVGPOAzl5ekp5wY5VwMrYDSR6T3I1ZkBMGQ=; b=XkmyBtAA8EpBmm+9OvRViVeUTxXfp4nvIO8R9LyJI/Cekzc3LugzLTtB99kccghg0O 7U3RbVkhKSa+auAF/IKNRAR+zwOymGXbzRrIl/e6xkBg7Uc4LVlWAb8s6C/EJ+wZqs80 EaTXyT+kwSDEu69Ocywc4c368oidUVuH4TLK5Kd19hDHn/bXgbrcMcFdJytnH6cN397F R3YGk6PUEepZi6o1NQa8IAQeaktGNQHsYTs19yP/BHGl3WprwEdXlUkJk8/bkbOhgMXw y/Xw9skFR1zEiI9qJFOJ2l/jSxi/56ZLddclFgGa5juLHDcKAGoMvnYtAS+OJvXQrn1y N2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712845760; x=1713450560; h=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=JJmBDRYpQVGPOAzl5ekp5wY5VwMrYDSR6T3I1ZkBMGQ=; b=pdQ4s4Y69/BtSfNCTx4wwYse3AHy9aKhCQOno4ReLIk2ZL0yAV12R0I5+rrcXToJdt LJ7b9WMHqd6xkTBtgA3O9yKwT5pg/+VpSjkC+NmeUhfUVhFQEX1TC0O7q4WqUlZa/zCi vtJ+1WhwYqEp/TpPTPYWKSmHC/MHiFq4EbOTeCj0Kthgk5Ms2r9nNY4WipKDEsFRq8sY QZC0o/0BKD5fxFuQHdkllOQHSPrFjUAa6wNpJyjly7vqHFYPTNC0L5cw37S1CPoPMcrE qCqLfOvDM+USkDw7DfrRAchC7n5w1rYM6saSFU1XZFmpokZkJS/rlUuz1Ik5K6uNZRyW Pabg== X-Forwarded-Encrypted: i=1; AJvYcCWNmvDSHMfoIaFyYSM1RM8A7aG3YNtGe119GiITixE5BIkmLkb6D3adRC6zQLgbR1NjXbgJf+TCCNIqQV9dQt04ogcp/jdtMz3lKhlh X-Gm-Message-State: AOJu0Yw3Y1Q0H3CrVGg3EySXuPQz1g6i95xvKKcZtfPohXXf1j4XuugU bv9m6V6W2dWBe7WOj0BxBujGeMOjIUwe32Ibi2E5bwTiWASeD6UrKU0IERBniQHmywP1tgNG5BJ pFw== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:b94:b0:618:4a14:54b8 with SMTP id ck20-20020a05690c0b9400b006184a1454b8mr1183076ywb.1.1712845760361; Thu, 11 Apr 2024 07:29:20 -0700 (PDT) Date: Thu, 11 Apr 2024 07:29:18 -0700 In-Reply-To: <20240411104822.6429-1-xry111@xry111.site> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240411104822.6429-1-xry111@xry111.site> Message-ID: 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: Sean Christopherson To: Xi Ruoyao Cc: Dave Hansen , Michael Kelley , Pawan Gupta , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Andrew Cooper Content-Type: text/plain; charset="us-ascii" On Thu, Apr 11, 2024, Xi Ruoyao wrote: > Per the "Processor Specification Update" documentations referred by the > intel-microcode-20240312 release note, this microcode release has fixed > the issue for all affected models. > > So don't disable INVLPG if the microcode is new enough. The precise > minimum microcode revision fixing the issue is provided by engineer from > Intel. > > And the erratum says: > > 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. > > So if the kernel is running in a hypervisor, we are in VMX non-root > operation and we should be safe. This should be two separate patches, one to do the precise ucode update check, and one to keep PCID enabled for guests.