Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1340053ybb; Fri, 20 Mar 2020 18:43:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtf4A450Mip/SK2OcIaloHq/Z44i+2x9Ycg2vT5lHCTWwTmpcg4q1xlIx9ymLjvtWB3xl47 X-Received: by 2002:a05:6830:1358:: with SMTP id r24mr9077666otq.337.1584754998704; Fri, 20 Mar 2020 18:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584754998; cv=none; d=google.com; s=arc-20160816; b=LblYwN4jTrOzNfzgF3smqrfIt483Ue5R/K5Okt3YN/4QyIIM0OKFJTlWKtaVjrykaO qthRmMsJjq4nldsZf3bdEjayHX+SMdclZlKyy+1TQ/L58pN4tV/tHoFkVH3qZjwBRftm 3vc19W2PWt8fTlR4Dt0XfiuRaNxnM+OqYI6IYhChdcEzA+LgyQiDEtjI9s2UJGgS8Om0 DZNY9djwpmi0dL1X63Ga73Vp1f68owDjbMmla28zFusBX0Chkv8LPAimnjzRqrOkib4k 89yMuOKllXeRGjmh+RWHoxylT3rlqtKtns3SQHEKmDWC7JtAvVqjzoIvXuwW8iA7JGnG qGbA== 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:cc:to:from:thread-topic:subject :ironport-sdr:dkim-signature; bh=P03uhPdw11jrxl6E82CoGwg+nTsQWcGa0B+WJNlZ+6Q=; b=Mwe/0HNYl8za6bQXD/496HmV7oTdOuY5lj2kn+RAOStDaTG4dugxeFSJ5UqLooUKOE N6iZREk64glFyWcnKixOrhznV6quRqUKme70M0/v3QyO28vTgOqgA160pFQ2OJI9Fm6r 7yBNNE9SzdPwFyqpu9R6ZgxXfYzeVda17+0vV1czQAUhslNXMD52okwqMj6hBPn2W/fm K3JJddKnA5g5Qy0J5jFUw5J4jUZ+eaTynYvCWdYRMZAttFIILVbhEZ8KfSmxEhKfJqaj glQAYo4Q8dc9WqocqFbNOSmaeQB9orBGcE02Zplxr7PnqK2LB9s7c/BfhT8sc49s3Ltr WlBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=fyXd7zbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id l25si4220767otk.119.2020.03.20.18.43.05; Fri, 20 Mar 2020 18:43:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=fyXd7zbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727113AbgCUBmm (ORCPT + 99 others); Fri, 20 Mar 2020 21:42:42 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:59865 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbgCUBmm (ORCPT ); Fri, 20 Mar 2020 21:42:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584754960; x=1616290960; h=from:to:cc:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version:subject; bh=P03uhPdw11jrxl6E82CoGwg+nTsQWcGa0B+WJNlZ+6Q=; b=fyXd7zbWLx4SyXb2XgsZ1W9WkFsZrvFI1NScuFtwJRarSpuGfIYyFfUT 6VuwUXZyEA8pagbu/jFE7sRKAB7+d8FLkhzYkMYNcwSFs6nYm3SEZZEbG Ys0EjyLIxQR454AUuq4KkKc7sFwf54qA6qOYQFVtGU6+wHfTTkec8JPiW 4=; IronPort-SDR: ajbOZDbqko60UBcFW+ZM097+OI3y1dF3WHVmP2q1KH33IlVNJdrlEMUCrWkHNcuzpmgy6rdCC4 6CQgKX5w2/hA== X-IronPort-AV: E=Sophos;i="5.72,286,1580774400"; d="scan'208";a="24240275" Subject: Re: [RFC PATCH] arch/x86: Optionally flush L1D on context switch Thread-Topic: [RFC PATCH] arch/x86: Optionally flush L1D on context switch Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-821c648d.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 21 Mar 2020 01:42:38 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-821c648d.us-east-1.amazon.com (Postfix) with ESMTPS id EED33A0766; Sat, 21 Mar 2020 01:42:35 +0000 (UTC) Received: from EX13D21UWB001.ant.amazon.com (10.43.161.108) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 21 Mar 2020 01:42:34 +0000 Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13D21UWB001.ant.amazon.com (10.43.161.108) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 21 Mar 2020 01:42:34 +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; Sat, 21 Mar 2020 01:42:34 +0000 From: "Singh, Balbir" To: "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" CC: "keescook@chromium.org" , "Herrenschmidt, Benjamin" , "x86@kernel.org" Thread-Index: AQHV+YNfBeR2nut5dUuur/1Y5KcywKhPGnoAgAFvAYCAAN6oAIAA6NAA Date: Sat, 21 Mar 2020 01:42:34 +0000 Message-ID: <034a2c0e2cc1bb0f4f7ff9a2c5cbdc269a483a71.camel@amazon.com> References: <20200313220415.856-1-sblbir@amazon.com> <87imj19o13.fsf@nanos.tec.linutronix.de> <97b2bffc16257e70b8aa98ee86622dc4178154c4.camel@amazon.com> <8736a3456r.fsf@nanos.tec.linutronix.de> In-Reply-To: <8736a3456r.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.161.219] Content-Type: text/plain; charset="utf-8" Content-ID: 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 T24gRnJpLCAyMDIwLTAzLTIwIGF0IDEyOjQ5ICswMTAwLCBUaG9tYXMgR2xlaXhuZXIgd3JvdGU6 DQo+IA0KPiBCYWxiaXIsDQo+IA0KPiAiU2luZ2gsIEJhbGJpciIgPHNibGJpckBhbWF6b24uY29t PiB3cml0ZXM6DQo+ID4gT24gVGh1LCAyMDIwLTAzLTE5IGF0IDAxOjM4ICswMTAwLCBUaG9tYXMg R2xlaXhuZXIgd3JvdGU6DQo+ID4gPiBXaGF0J3MgdGhlIHBvaW50PyBUaGUgYXR0YWNrIHN1cmZh Y2UgaXMgdGhlIEwxRCBjb250ZW50IG9mIHRoZSBzY2hlZHVsZWQNCj4gPiA+IG91dCB0YXNrLiBJ ZiB0aGUgbWFsaWNpb3VzIHRhc2sgc2NoZWR1bGVzIG91dCwgdGhlbiB3aHkgd291bGQgeW91IGNh cmU/DQo+ID4gPiANCj4gPiA+IE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