Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3088409ybz; Sun, 19 Apr 2020 17:28:10 -0700 (PDT) X-Google-Smtp-Source: APiQypIrlPnXJD0ff69oRxfMqFKqVGYiHuNwBHMX5qoP/XCvMQE5YnSGxkMZHvKI4D7FFPhcA9kB X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr13789436ejr.351.1587342490737; Sun, 19 Apr 2020 17:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587342490; cv=none; d=google.com; s=arc-20160816; b=RIQ4G2+F7TnkgZBSdIvmD3N51LuZepGH5x8uninulnBkWiupxMG2t+Bh90l4Fp9Myx JhKBAGEDMg48bvteolUJLui+toCSsmDX4gnxyPVuL04TGNcEi5FWj58PDo0zwX2DKxUS 0U2MutvVBJaA0bar45/OOKUICWQ5bKmqdry6Cwt+PrxdVbR2WQ9PBEoKGigTKJNpxvAm iAcmR3GwuWRi95ATGpXaNdM3+addrnVuAAIoAlaNb7OXqjiuAgDTTR3WSHNjrWqmSauz Rh8LCwCsKVxbAM+6nVHgTbPJ2g55FddVkq4C8WSmgumlR+Y9t8ZH4AUrd/AekqWxhKI4 SytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :ironport-sdr:dkim-signature; bh=UiXmySEE4fmKmlBwL5TZvWRbRqz0Y2gQVVz8hMwxlX8=; b=Fh2zt31SalXWBVU0dDoiEDKJoX2mlORLYFAGIYiMKmNMTp2D1Iqf6ochQBnIyI/cfN kcN3SpUoKZg3MCgzH+bTrGxcJvsaZjwIcmDpR1Sv4qVsFxAUjl7C6ZjM2A3EhmfG/6D9 37IcwMt4fcmVRkiLpw/BNABGEk17i0pXEk5ZdI3r9wtvEijgrtBGpPkzSfXCB5LsSlYE xVkDUnysp38S049eMvFF9ojm/oByS+RTb/jwrD3uxEywQDvVzf3truccLtALuTR+h/PP hwL6x6IP2DAOVurPJdcVVngu7YCEEu/mcil/ijv6FX5IgP02smeqPaiDjzGxb8iaM7nY 1QnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=r50rseoP; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si18147495eji.303.2020.04.19.17.27.35; Sun, 19 Apr 2020 17:28:10 -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=@amazon.com header.s=amazon201209 header.b=r50rseoP; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726012AbgDTAZC (ORCPT + 99 others); Sun, 19 Apr 2020 20:25:02 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:61290 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgDTAZB (ORCPT ); Sun, 19 Apr 2020 20:25:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1587342301; x=1618878301; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=UiXmySEE4fmKmlBwL5TZvWRbRqz0Y2gQVVz8hMwxlX8=; b=r50rseoPnk4v9N7a4evcZlFpX3pZuI6mpOVB5F6jybP9G9FIOSwqb9hJ DD3LSLmXCEZI+vLRQ6b3v0EdnQldxsPFuknl3cGL81u/Q+AwM62hFC9/V EffBetCDljTld7wnu2kUpFAgPhXaJshW6DaBteiwRZmEPrDT+Sgamn3TQ 0=; IronPort-SDR: /NWEc1llBZCb/WoDMBbxRXDLWtDmnKktqeKY8qI6TzYmYfMgV3lfdDqzO2JkjO2Iu+RQnvKPDr Ix0aJbO2vpWQ== X-IronPort-AV: E=Sophos;i="5.72,405,1580774400"; d="scan'208";a="39364790" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-c5104f52.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 20 Apr 2020 00:24:59 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-c5104f52.us-west-2.amazon.com (Postfix) with ESMTPS id E9872A1C0D; Mon, 20 Apr 2020 00:24:58 +0000 (UTC) Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Apr 2020 00:24:58 +0000 Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13d01UWB002.ant.amazon.com (10.43.161.136) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Apr 2020 00:24:58 +0000 Received: from EX13D01UWB002.ant.amazon.com ([10.43.161.136]) by EX13d01UWB002.ant.amazon.com ([10.43.161.136]) with mapi id 15.00.1497.006; Mon, 20 Apr 2020 00:24:58 +0000 From: "Singh, Balbir" To: "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" CC: "keescook@chromium.org" , "tony.luck@intel.com" , "benh@kernel.crashing.org" , "jpoimboe@redhat.com" , "x86@kernel.org" , "dave.hansen@intel.com" Subject: Re: [PATCH v3 4/5] arch/x86: Optionally flush L1D on context switch Thread-Topic: [PATCH v3 4/5] arch/x86: Optionally flush L1D on context switch Thread-Index: AQHWFqofl1vpjX8ZE0eLMm0vby50Xw== Date: Mon, 20 Apr 2020 00:24:57 +0000 Message-ID: References: <20200408090229.16467-1-sblbir@amazon.com> <20200408090229.16467-5-sblbir@amazon.com> <87mu7akwdx.fsf@nanos.tec.linutronix.de> <87mu79xflj.fsf@nanos.tec.linutronix.de> In-Reply-To: <87mu79xflj.fsf@nanos.tec.linutronix.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.160.27] Content-Type: text/plain; charset="utf-8" Content-ID: <9774ED1CA65FEF40A392DFA33C391C1F@amazon.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gU2F0LCAyMDIwLTA0LTE4IGF0IDEyOjE3ICswMjAwLCBUaG9tYXMgR2xlaXhuZXIgd3JvdGU6 DQo+IA0KPiANCj4gIlNpbmdoLCBCYWxiaXIiIDxzYmxiaXJAYW1hem9uLmNvbT4gd3JpdGVzOg0K PiA+IE9uIEZyaSwgMjAyMC0wNC0xNyBhdCAxNjo0MSArMDIwMCwgVGhvbWFzIEdsZWl4bmVyIHdy b3RlOg0KPiA+ID4gQmFsYmlyIFNpbmdoIDxzYmxiaXJAYW1hem9uLmNvbT4gd3JpdGVzOg0KPiA+ ID4gc3RhdGljIHZvaWQgKmwxZF9mbHVzaF9wYWdlczsNCj4gPiA+IHN0YXRpYyBERUZJTkVfTVVU RVgobDFkX2ZsdXNoX211dGV4KTsNCj4gPiA+IA0KPiA+ID4gaW50IGwxZF9mbHVzaF9pbml0KHZv aWQpDQo+ID4gPiB7DQo+ID4gPiAg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