Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1966851ybt; Mon, 15 Jun 2020 14:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpNLtLGGbtmMVSvEosLoH+J5V1EOSb2juWQFgl4K9Yat19IP/xKe1J/Uyb6YY6JF6QU/Al X-Received: by 2002:a17:906:4e0a:: with SMTP id z10mr21060563eju.57.1592256058706; Mon, 15 Jun 2020 14:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592256058; cv=none; d=google.com; s=arc-20160816; b=Ywx3CubgXzPEKxT6it8E2woET8y/Q95btzBEN992tf8acrlXf065gKaGn4Ey3jg90H aDpZ8vN6VHklz3ecvTBDsHnW+cCZgUdhsWMFwB8Ijt2STNF1Trlaquq//7MUkj/zBMXk LxDEAXp3wSRhVtqglAVLO498+nSBjD2QYhcxcHrs5cUXNfGtZ0SWebCrN7CCogQR9Dil 8PA0+ZuBYQVV/SzzlII18S83dkLKb6nTTL3S/Lie5I+lwsrSeDv9ENsWJjahYT9EJpKa K4qN1X1MUmt08V9rZK2L74NZqQTunHZnmADcootXePq+ob+9RScH2jkQ5NzZQuI1eQS4 4+CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=K+cMiKrRga91vCTBmD8D5XGxUlsSQ1EKO7QoeTvwQ14=; b=BS+h6IouWTpdMZ5RWKhy1jXb1pwjXy3KJbQHElGZ6PuEwxlXp4dQxSaNN7PPoqRv7M 7rrLbb8YrO6QJd3d3EK5SCHIFloPpALGWCl8+XmiFiH6rtilz/1wVIb24Y/0h0LkWW0I 8ERPoEkfR765zGVKJRVcJ5AQjwkLXqkOArPveVtqQmg9KTgeiTSrV59kxQg3YcnbPQ9P urwoJp6IpikI2gHdwSJl8QlJfoKrJRUAICQR5UA/iv7ZSfObD2hdgk1b+kJ9ZOu/Prkd Wz0egb3jkaLiMYle8/btYrcKnDo+N7lOEtBrszQepnXSWtFqLxIzpPJc47eWPPT3S6SP tavA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2GB7LupH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si9918673edi.316.2020.06.15.14.20.34; Mon, 15 Jun 2020 14:20:58 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2GB7LupH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731513AbgFOVSo (ORCPT + 99 others); Mon, 15 Jun 2020 17:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgFOVSn (ORCPT ); Mon, 15 Jun 2020 17:18:43 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA18C061A0E for ; Mon, 15 Jun 2020 14:18:43 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id m2so449132pjv.2 for ; Mon, 15 Jun 2020 14:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=K+cMiKrRga91vCTBmD8D5XGxUlsSQ1EKO7QoeTvwQ14=; b=2GB7LupHwlZ6MZtJPWSNxp3apFXotPM40suzbHcMbHpAtfxMDlfoT68CSyoFNL8a5W Z0tAhownZcTP8TRk6IoslRw8BJAf1OXzJREAwoj7wWd3V14OSBwEBVF70E7hminRlU56 2VsxRj20OP0xyXqNS18gd25MtW6DEU2un5q7P64tYWB4Fs7qzeb27Scj4voailQZlsxX kibSCzCnlI3uAzFI7DH/O+JIlSgCq0aVl2WDsd7HhTrTfAWwnO/iAvwlYH/1TAJRTivU y1ZhI4gCO2NoAYrkyYozZCRaczRqz8a/Xr9GEbYWOyr3GPdZ6rbRamLSMm4DX8QTnYXG f0Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=K+cMiKrRga91vCTBmD8D5XGxUlsSQ1EKO7QoeTvwQ14=; b=BnX58WuLjPUoO9AHOjepSbkbE2k0PDOA0JWGuB0H/XCOXJ0IGV1pVJBWHFk7b117z3 zl5BOV8bfKQZMO3DmAJv7jgaFc1IT+TJTOMP/oNCzGhvP++GVdc6h482rhg8LA4BlcOk QmhyjD9Vy/WWPR7wXqApnjPCAvO3Rp8kiqMUeJAYpuRvgVq0qn/rQa8FPP9choBxW8oq CIdH3XHCUy4gdTeypz/wKn3pSzUJAvHfYDqJOaZPyeaiLOeQ02bP25gBN5GGm5B9qFzY 7I4/EBT7FfY7Z4knmjGovOiA1CC3pSwja5BQlRs0rwJR0ZVIA2xFR8zGXyMFCLXjWFZ/ bMDQ== X-Gm-Message-State: AOAM5324OK1FfcZY9SaEfvWdMCM8ArlI8Cp1dr6b+LM6H/EA1gSPIXU0 pWNQPoKd+P6tXv8kZRyb1YkCUQ== X-Received: by 2002:a17:90a:e509:: with SMTP id t9mr1153242pjy.189.1592255922875; Mon, 15 Jun 2020 14:18:42 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:d2f:b9d:749:9ce5? ([2601:646:c200:1ef2:d2f:b9d:749:9ce5]) by smtp.gmail.com with ESMTPSA id g65sm14766552pfb.61.2020.06.15.14.18.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2020 14:18:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2 12/12] x86/traps: Fix up invalid PASID Date: Mon, 15 Jun 2020 14:18:39 -0700 Message-Id: References: <3908561D78D1C84285E8C5FCA982C28F7F66C849@ORSMSX115.amr.corp.intel.com> Cc: "Yu, Fenghua" , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , David Woodhouse , Lu Baolu , Frederic Barrat , Andrew Donnellan , Felix Kuehling , Joerg Roedel , "Hansen, Dave" , "Raj, Ashok" , "Pan, Jacob jun" , "Jiang, Dave" , "Yu, Yu-cheng" , "Mehta, Sohil" , "Shankar, Ravi V" , linux-kernel , x86 , "iommu@lists.linux-foundation.org" , amd-gfx , linuxppc-dev In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7F66C849@ORSMSX115.amr.corp.intel.com> To: "Luck, Tony" X-Mailer: iPhone Mail (17F80) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jun 15, 2020, at 1:56 PM, Luck, Tony wrote: >=20 > =EF=BB=BF >>=20 >> Are we planning to keep PASID live once a task has used it once or are we= going to swap it lazily? If the latter, a percpu variable might be better.= >=20 > Current plan is "touch it once and the task owns it until exit(2)" >=20 > Maybe someday in the future when we have data on how applications > actually use accelerators we could look at something more complex > if usage patterns look like it would be beneficial. >=20 >=20 So what=E2=80=99s the RDMSR for? Surely you have some state somewhere that says =E2=80=9Cthis task has a PASID.=E2=80=9D= Can=E2=80=99t you just make sure that stays in sync with the MSR? Then, o= n #GP, if the task already has a PASID, you know the MSR is set.=