Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp405051ybz; Fri, 24 Apr 2020 18:54:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJmcm12Wqw43+LSjYqooRd9zZUQLLwNBPo5zn2BExwvYVTKJFKajtETzQ6B+aD1hrdBjzbQ X-Received: by 2002:a17:906:9482:: with SMTP id t2mr9700440ejx.241.1587779666621; Fri, 24 Apr 2020 18:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587779666; cv=none; d=google.com; s=arc-20160816; b=DCCC0agvWRD1/btayWmjH+xva0W23yiwPiHvsoo1TqdqXzZDuM3B0RqRhD5DisMy56 C96hVSzf9qJPuGmOG5IFrYUgd6EKqe8FzRQls8JBMEUAsIHZiarPiH+8CX6mDBxe9htL 7zxibT5r4/LWnYEoGcR62xnSqA9j3hmzEGuMHPBv+pmWTCUcYPfAmIzYHWQcizDM5Np0 MDE9x6JVGnl38/X2zEv73+QsfmLgNvz3kQHbAlqymcxNBimlrhszQMlQGJr537h+FRpj Rh3ZVnzRvhNYSVm6vm0+QMj0LQlyDlMOyRmJMpnjokelsmgy2sUblekE5ZKa2QcZjQ9f 9asQ== 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=TNGDwjN/KA3qXS69rgpOe1AwkRhBkDAIyTgpQ/Anz/I=; b=v6LwTTAoYMJ4VS84pQxGL1OtJj9X0Vv2mfbpeX1aVzlxI/REs4Dlxwr/GI4nZRNpnb p0dUt+uUT+0bfJBFBEq3B29JEYyruEusqdOXGJbSnJAx+oU4Unad0G1sOuNmOTZdsF+D omLULSRCxwUYOR0Vp24JOw+tBmUVWYUqIvXTFg02z90hWfhx9qzAgFrdyH0qc+rFCLQR uK0kP1sO4o6THENQ3lFRJ7grQVSrWcb67jM0X+7XvZghpnAWq+l0CpF+tCMiSItyTYHi MaiW8kbA6R1iVnxZLTgBxUvPegFeq9NhO+kbk/Sau1U6MZbWdmbY1RSFLkpvNRkkKp4H ADtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="rj/559xr"; 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 n18si4300232ejj.459.2020.04.24.18.54.02; Fri, 24 Apr 2020 18:54:26 -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="rj/559xr"; 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 S1726157AbgDYBt2 (ORCPT + 99 others); Fri, 24 Apr 2020 21:49:28 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:57504 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbgDYBt2 (ORCPT ); Fri, 24 Apr 2020 21:49:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1587779368; x=1619315368; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=TNGDwjN/KA3qXS69rgpOe1AwkRhBkDAIyTgpQ/Anz/I=; b=rj/559xrbGi1M6VgdpS3uNbtQ5vrzPKdMmUwmEF7XWLmYo7c3axmNGgD CXNGa+QZtA5ZiS2H5PuJxSXuzXAjERtC+ZP/s3yL5HRcIhSAsMvx/D15q JzhxHLeyZAmhKGHLSQ0LthqQ6WR2hDF5eGFd/wjBQsn9r0yXMvTcvH5Yn M=; IronPort-SDR: sMQsEtecHO/bEqKNbU7cMU7AHNw6n+pJS1ta7SBRMoTpObU9nYekyWeWs8MO1wKc33FpJiyVJY EjAXZf5oga5w== X-IronPort-AV: E=Sophos;i="5.73,314,1583193600"; d="scan'208";a="39386269" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-c300ac87.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 25 Apr 2020 01:49:25 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-c300ac87.us-west-2.amazon.com (Postfix) with ESMTPS id A3614A27C6; Sat, 25 Apr 2020 01:49:21 +0000 (UTC) Received: from EX13D01UWB003.ant.amazon.com (10.43.161.94) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 25 Apr 2020 01:49:21 +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; Sat, 25 Apr 2020 01:49:20 +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, 25 Apr 2020 01:49:20 +0000 From: "Singh, Balbir" To: "thomas.lendacky@amd.com" , "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 v4 1/6] arch/x86/kvm: Refactor l1d flush lifecycle management Thread-Topic: [PATCH v4 1/6] arch/x86/kvm: Refactor l1d flush lifecycle management Thread-Index: AQHWGqO9uySqPyunLEWB26nlla6sNA== Date: Sat, 25 Apr 2020 01:49:20 +0000 Message-ID: References: <20200423140125.7332-1-sblbir@amazon.com> <20200423140125.7332-2-sblbir@amazon.com> In-Reply-To: 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: <790580E9EA41B84AAAD86B1C3CB2DD61@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 T24gRnJpLCAyMDIwLTA0LTI0IGF0IDEzOjU5IC0wNTAwLCBUb20gTGVuZGFja3kgd3JvdGU6DQo+ IA0KPiBPbiA0LzIzLzIwIDk6MDEgQU0sIEJhbGJpciBTaW5naCB3cm90ZToNCj4gPiBTcGxpdCBv dXQgdGhlIGFsbG9jYXRpb24gYW5kIGZyZWUgcm91dGluZXMgdG8gYmUgdXNlZCBpbiBhIGZvbGxv dw0KPiA+IHVwIHNldCBvZiBwYXRjaGVzICh0byByZXVzZSBmb3IgTDFEIGZsdXNoaW5nKS4NCj4g PiANCj4gPiBTaWduZWQtb2ZmLWJ5OiBCYWxiaXIgU2luZ2ggPHNibGJpckBhbWF6b24uY29tPg0K PiA+IFJldmlld2VkLWJ5OiBLZWVzIENvb2sgPGtlZXNjb29rQGNocm9taXVtLm9yZz4NCj4gPiAt LS0NCj4gPiAgIGFyY2gveDg2L2luY2x1ZGUvYXNtL2NhY2hlZmx1c2guaCB8ICAzICsrKw0KPiA+ ICAgYXJjaC94ODYva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A+IC0gICAgICAgICAgICAgICogVGhpcyBhbGxvY2F0aW9uIGZvciB2bXhfbDFkX2Zs dXNoX3BhZ2VzIGlzIG5vdCB0aWVkIHRvIGENCj4gPiBWTQ0KPiA+IC0gICAgICAgICAgICAgICog bGlmZXRpbWUgYW5kIHNvIHNob3VsZCBub3QgYmUgY2hhcmdlZCB0byBhIG1lbWNnLg0KPiA+IC0g ICAgICAgICAgICAgICovDQo+ID4gLSAgICAgICAgICAgICBwYWdlID0gYWxsb2NfcGFnZXMoR0ZQ X0tFUk5FTCwgTDFEX0NBQ0hFX09SREVSKTsNCj4gPiAtICAgICAgICAgICAgIGlmICghcGFnZSkN Cj4gPiArICAgICAgICAgICAgIHZteF9sMWRfZmx1c2hfcGFnZXMgPSBsMWRfZmx1c2hfYWxsb2Nf cGFnZXMoKTsNCj4gPiArICAgICAgICAgICAgIGlmICghdm14X2wxZF9mbHVzaF9wYWdlcykNCj4g PiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07DQo+ID4gLSAgICAgICAgICAg ICB2bXhfbDFkX2ZsdXNoX3BhZ2VzID0gcGFnZV9hZGRyZXNzKHBhZ2UpOw0KPiA+IC0NCj4gPiAt ICAgICAgICAgICAgIC8qDQo+ID4gLSAgICAgICAgICAgICAgKiBJbml0aWFsaXplIGVhY2ggcGFn ZSB3aXRoIGEgZGlmZmVyZW50IHBhdHRlcm4gaW4NCj4gPiAtICAgICAgICAgICAgICAqIG9yZGVy IHRvIHByb3RlY3QgYWdhaW5zdCBLU00gaW4gdGhlIG5lc3RlZA0KPiA+IC0gICAgICAgICAgICAg ICogdmlydHVhbGl6YXRpb24gY2FzZS4NCj4gPiAtICAgICAgICAgICAgICAqLw0KPiA+IC0gICAg ICAgICAgICAgZm9yIChpID0gMDsgaSA8IDF1IDw8IEwxRF9DQUNIRV9PUkRFUjsgKytpKSB7DQo+ ID4gLSAgICAgICAgICAgICAgICAgICAgIG1lbXNldCh2bXhfbDFkX2ZsdXNo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