Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp158422pxb; Tue, 28 Sep 2021 18:09:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4xDl0IhSfTXkhEdiqKkJ/nqOUvRpphjLpr9J+RLAOQa5y8pqwLplt8mRivkbnCt4uAf9s X-Received: by 2002:a17:906:469a:: with SMTP id a26mr10706119ejr.38.1632877774160; Tue, 28 Sep 2021 18:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632877774; cv=none; d=google.com; s=arc-20160816; b=0WTdg/Z6IzPOWawbIc6QPCwQZtIqOl1InsYNAbhd73ZAeyVq//CYcWCuB9PPiocQBX I3x/15RnhT6Vfg0j++D7TanaNPyu8euRODIWdcOvnjmFba9JID+bg+rNyflCzDmfCtIM oCCyWNaHfwjKbZ/Ay+oDiEQDaBC0oLCtVCY7OsumlqvwehWWL7CKkmEOQibk8/I3zJ40 AMrgYYKjEFHED9aIj/6+LWP+Kpwhd9PdpU6oTvKzrxC7lUqECxc+jgItCPPokFpQ+yXt +oqtI+XOUvizGcNkcA6ZKr+6uSLabaGax6cXH0UaQf55Qa4LHFOrXr9j6W2h+kcMlUgy KYlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=WbhRnPwzuxb/2dfujJRfGpyyzbF2OUO0hkfB+wzfPMU=; b=WrngpRm1XclHKXp8Iq7UP+7uGC1F85VeY62OWFmUvw1NGAF4hbNOpwyvJaittA5Gon TpdMEdooVJdXMTBCzTj4ppD2g1dbiDN2rLIUN6PsWrVWQNiZkeFeosWbr6j/2k57O2QT +lLYjVPH67D9P1Fxw+7ISrU9VqFiZOgDthgCMQwvESYv+AFT+07xQHrQCtnGEHFS1OKt DvSlSDSuO/jq9APch2RdUO5D/ZNUXSfawr9MOWtAuPwih/MaByfTMcxtPESePjpuoa3u Vk3GHU2JMpnJ2M3truJGtzjxGtFhYLf2Ly1zqqiu+xT/i+zC10b+xa0HWx9RBNR3bkx6 xb+A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si744326ede.227.2021.09.28.18.09.10; Tue, 28 Sep 2021 18:09:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243578AbhI2BIh convert rfc822-to-8bit (ORCPT + 99 others); Tue, 28 Sep 2021 21:08:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:50376 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243507AbhI2BIg (ORCPT ); Tue, 28 Sep 2021 21:08:36 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="224491889" X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="224491889" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 18:06:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="562786703" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 28 Sep 2021 18:06:54 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 18:06:53 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 18:06:53 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2242.012; Tue, 28 Sep 2021 18:06:53 -0700 From: "Luck, Tony" To: "Yu, Fenghua" CC: "Hansen, Dave" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "Peter Zijlstra (Intel)" , Lu Baolu , Joerg Roedel , Josh Poimboeuf , "Jiang, Dave" , "Pan, Jacob jun" , "Raj, Ashok" , "Shankar, Ravi V" , "iommu@lists.linux-foundation.org" , "the arch/x86 maintainers" , Linux Kernel Mailing List Subject: RE: [PATCH 4/8] x86/traps: Demand-populate PASID MSR via #GP Thread-Topic: [PATCH 4/8] x86/traps: Demand-populate PASID MSR via #GP Thread-Index: AQHXrlppUXtiT4Ul9UCq0y1lpkQn1quyuuKAgAWuhwCAAKRkgIAAyOqAgAB9aAD//53xAIAAfQEA//+wWACAAICAgP//j4cAAA9QjQAADVLnoA== Date: Wed, 29 Sep 2021 01:06:52 +0000 Message-ID: References: <20210920192349.2602141-5-fenghua.yu@intel.com> <1aae375d-3cd4-4ab8-9c64-9e387916e6c0@www.fastmail.com> <035290e6-d914-a113-ea6c-e845d71069cf@intel.com> <3f97b77e-a609-997b-3be7-f44ff7312b0d@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> fpregs_lock(); > > I'm afraid we may hit the same locking issue when we send IPI to notify another task to modify its > PASID state. Here the API is called to modify another running task's PASID state as well without a right lock. > fpregs_lock() is not enough to deal with this, I'm afraid. We don't send IPI any more to change PASID state. The only place that the current patch series touches the PASID MSR is in the #GP fault handler. -Tony