Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp82329ybb; Tue, 7 Apr 2020 17:25:27 -0700 (PDT) X-Google-Smtp-Source: APiQypK0yVcV1Yj3eMM0w6bAi9lLr55aJk872ihhTwb3M4UITX422JGdpyS6+bDYHWnkE60ITT4o X-Received: by 2002:aca:2209:: with SMTP id b9mr606572oic.103.1586305527589; Tue, 07 Apr 2020 17:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586305527; cv=none; d=google.com; s=arc-20160816; b=oR0bnmm4OZsnDpNRPggm/W4JPBDau3oue0egjfuk99/RyuzMmcszywF3ZkHwkAOmP3 /NB7hNaiRJKVapOBuCGOYLaQPodfaRX3l+8MLBqvkyQ1HXAsggA7oLApNMuAw9PhY+Uz beXr4UUT9cmuGm2XbvPeTeHggtmVkTLSCWe91B3ldzppmXWwXkODkNNmGQ3Ozyi90cGw kKyv0qDwbqQ1vkoR3g6aCqrDWzezTm+pWrH3PZP2rGVBeWpOvGJRDr+oXWGAVa5Mn3wW dOcVsyu8BLO3A3lyZzEiFXAGJ8KQHcnmEl4T6ERrM0iiWJeEr9Biso6Fw1ZbJsUeUVzF TVAw== 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=iKq3TgYjgw3nZuEk1LMUMf2SykJq/nlJbGMsASxvgv0=; b=Q+PF2BElfzBnnkQvBG9CyCSZL62cbSdZpYzdAPXhqh4Kvjdcb5SDaIeAEA8Sr9FZYb Gy33psDf+yCOZqkIX9xqgMTsOHVeDwz+hKF6pYzW3wzx3e3kpobHfjqMH5x974hpweM9 SOOZDRGna9zhTq0VYMKLX6JNYcVWr6DRAj2q+t67fpU0Pn+K9XC2S9y+biG5LvPrHvMD +1mTVq1sOjzoRbZkZUG0qqw6uaJynaQg++RCn0X5u9xD5Wv1qryC2JH5fQJjRSDaECU6 Asry8ZV+u5nly99zKDiAn6WFxFCSwmq0ka3jpDDdNkTlvOfyQBOwHtARHv82FxLq+XtU snxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=vRaYiOnT; 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 c13si1247107oiy.199.2020.04.07.17.25.11; Tue, 07 Apr 2020 17:25:27 -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=vRaYiOnT; 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 S1726508AbgDHAWy (ORCPT + 99 others); Tue, 7 Apr 2020 20:22:54 -0400 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:3875 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726446AbgDHAWy (ORCPT ); Tue, 7 Apr 2020 20:22:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1586305372; x=1617841372; h=from:to:cc:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version:subject; bh=iKq3TgYjgw3nZuEk1LMUMf2SykJq/nlJbGMsASxvgv0=; b=vRaYiOnT9vp2DUvcQt1dB0w/so0VZXhWgJPlntpK63kKjQ/mzstlUAN3 rIzwpG6/0L91KXhwucMWL2nzn8e+xhw8QfEbVkISmh5Zk4El6Xaq5aGlO qz850IA9n8qyVgzQgMVagyRYzp0/fikBDB9D2+YpqaAXRHLuzKTEDQKZb I=; IronPort-SDR: vZgcunbmelg6GWgKvudrmJgrwnW5YtwkwdKxY3GmOQaLvxPWUVNdxz85bPtbjEIfOIqKUufnAh Zm6kZ+hCEMxQ== X-IronPort-AV: E=Sophos;i="5.72,357,1580774400"; d="scan'208";a="24678441" Subject: Re: [PATCH v2 2/4] arch/x86: Refactor tlbflush and l1d flush Thread-Topic: [PATCH v2 2/4] arch/x86: Refactor tlbflush and l1d flush Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-17c49630.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 08 Apr 2020 00:22:40 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-17c49630.us-east-1.amazon.com (Postfix) with ESMTPS id B9778A2924; Wed, 8 Apr 2020 00:22:37 +0000 (UTC) Received: from EX13D01UWB003.ant.amazon.com (10.43.161.94) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Apr 2020 00:22:37 +0000 Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13d01UWB003.ant.amazon.com (10.43.161.94) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Apr 2020 00:22:36 +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; Wed, 8 Apr 2020 00:22:36 +0000 From: "Singh, Balbir" To: "keescook@chromium.org" CC: "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "tony.luck@intel.com" , "benh@kernel.crashing.org" , "jpoimboe@redhat.com" , "x86@kernel.org" , "dave.hansen@intel.com" Thread-Index: AQHWC8KQbPxrh5g1r06s48CXbhupeqht/CwAgABj6gA= Date: Wed, 8 Apr 2020 00:22:36 +0000 Message-ID: References: <20200406031946.11815-1-sblbir@amazon.com> <20200406031946.11815-3-sblbir@amazon.com> <202004071122.379AB7D@keescook> In-Reply-To: <202004071122.379AB7D@keescook> 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.155] 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 T24gVHVlLCAyMDIwLTA0LTA3IGF0IDExOjI1IC0wNzAwLCBLZWVzIENvb2sgd3JvdGU6DQo+IA0K PiBPbiBNb24sIEFwciAwNiwgMjAyMCBhdCAwMToxOTo0NFBNICsxMDAwLCBCYWxiaXIgU2luZ2gg d3JvdGU6DQo+ID4gUmVmYWN0b3IgdGhlIGV4aXN0aW5nIGFzc2VtYmx5IGJpdHMgaW50byBzbWFs bGVyIGhlbHBlciBmdW5jdGlvbnMNCj4gPiBhbmQgYWxzbyBhYnN0cmFjdCBMMURfRkxVU0ggaW50 byBhIGhlbHBlciBmdW5jdGlvbi4gVXNlIHRoZXNlDQo+ID4gZnVuY3Rpb25zIGluIGt2bSBmb3Ig TDFEIGZsdXNoaW5nLg0KPiA+IA0KPiA+IFNpZ25lZC1vZmYtYnk6IEJhbGJpciBTaW5naCA8c2Js YmlyQGFtYXpvbi5jb20+DQo+ID4gLS0tDQo+ID4gIGFyY2gveDg2L2luY2x1ZGUvYXNtL2NhY2hl Zmx1c2guaCB8ICAzICsrDQ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iZmFpbHVyZSIuIEhvdw0KPiBhYm91dDoNCj4g DQo+IGludCBmbHVzaF9sMWRfY2FjaGVfaHcodm9pZCkNCj4gew0KPiAgICAgIGlmIChzdGF0aWNf Y3B1X2hhcyhYODZfRkVBVFVSRV9GTFVTSF9MMUQpKSB7DQo+ICAgICAgICAgICAgICB3cm1zcmwo TVNSX0lBMzJfRkxVU0hfQ01ELCBMMURfRkxVU0gpOw0KPiAgICAgICAgICAgICAgcmV0dXJuIDA7 DQo+ICAgICAgfQ0KPiAgICAgIHJldHVybiAtRU5PVFNVUFA7DQo+IH0NCj4gDQoNCldpbGwgZG8N Cg0KPiANCj4gPiArRVhQT1JUX1NZTUJPTF9HUEwoZmx1c2hfbDFkX2NhY2hlX2h3KTsNCj4gPiAr DQo+ID4gK3ZvaWQgZmx1c2hfbDFkX2NhY2hlX3N3KHZvaWQgKmwxZF9mbHVzaF9wYWdlcykNCj4g PiArew0KPiA+ICsgICAgIGludCBzaXplID0gUEFHRV9TSVpFIDw8IEwxRF9DQUNIRV9PUkRFUjsN Cj4gPiArDQo+ID4gKyAgICAgYXNtIHZvbGF0aWxlKA0KPiA+ICsgICAgICAgICAgICAgICAgICAg ICAvKiBGaWxsIHRoZSBjYWNoZSAqLw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAieG9ybCAg ICUlZWF4LCAlJWVheFxuIg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAiLkxmaWxsX2NhY2hl OlxuIg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAibW92emJsICglW2ZsdXNoX3BhZ2VzXSwg JSUiIF9BU01fQVggIiksICUlZWN4XG5cdCINCj4gPiArICAgICAgICAgICAgICAgICAgICAgImFk ZGwgICAkNjQsICUlZWF4XG5cdCINCj4gPiArICAgICAgICAgICAgICAgICAgICAgImNtcGwgICAl JWVheCwgJVtzaXplXVxuXHQiDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICJqbmUgICAgLkxm aWxsX2NhY2hlXG5cdCIN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