Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1266191imu; Fri, 9 Nov 2018 13:38:28 -0800 (PST) X-Google-Smtp-Source: AJdET5eVjYjW3OFifldklOp5O2j+tXSPNPn0NAtOI3IqVTd57a4C0BHx5wiA2ND0rADTsKvwPkKV X-Received: by 2002:a63:bd51:: with SMTP id d17mr9080539pgp.443.1541799508659; Fri, 09 Nov 2018 13:38:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541799508; cv=none; d=google.com; s=arc-20160816; b=ScoLcH5uya3wz0aSFMmSzNGMrNPTTbCOZ+dkf3GiapXG7Evj8flyDksaIfhNTCeIlH ppohNwON2t8l9QhxgXQGQIGiwuOceh3OQ4TazOSY1mWtkmA5XW/8CcwgiKGnIw/6V0X6 XUbjdagLagAtYN+0NZUWZZYn6Frkw35X8Pkac32GxjYzbdq9Bk0GAgccA9U9dnGlx1yd 2TseW8L5QjgxDaXcjVhoIRsUmLE0ByQ5QLo/7U0mqsVO8Tk0PWSlrLGH7ZLtyNb/F64r kZngjUTUMni6OmtEtF539Gd+Pke/tDqLtvItw9FcOiBC+tbvDgbY9AW/TZN+bEM5p0NU qQqQ== 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 :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=JI18GtM04dqkOuq/uu/L4T9SV702MHtzk/XR2nLBNRA=; b=SPA+EK+hVTxKNl4NXB2ZlseWP4Qrc8VFZuLLSfwTXBGNBj3kYs8rQEaoUDIgDx0GQg 44FlcfC+7jE737XQqQbzO5pmiy7PUNABxdYtuFxTjFnLWcgmYwyHBCJj2++BtS38biN+ 4JU/UDgk3o9Iit8jOLHWIsOES8sKWhECyX1hbVolF36GcK6L+628djV3CjOldg5f4TFJ cemutl4fveVX4eKBMer6kPhg3r3yPJ0fGp2zR+c+BwhHyE+bA0RMjyyA+lyHX/+551c1 FmB4QobBgFkmDfZZj4JtMfjiwqxZWD7F+aqBko0ECUlVOewpiL6kMSQmMl8bJOE87W/V Z+1g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba4-v6si8523643plb.93.2018.11.09.13.38.13; Fri, 09 Nov 2018 13:38:28 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbeKJHUR convert rfc822-to-8bit (ORCPT + 99 others); Sat, 10 Nov 2018 02:20:17 -0500 Received: from mga02.intel.com ([134.134.136.20]:29687 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbeKJHUR (ORCPT ); Sat, 10 Nov 2018 02:20:17 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2018 13:37:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,484,1534834800"; d="scan'208";a="107365449" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 09 Nov 2018 13:37:51 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 9 Nov 2018 13:37:51 -0800 Received: from hasmsx112.ger.corp.intel.com (10.184.198.40) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 9 Nov 2018 13:37:51 -0800 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.165]) by HASMSX112.ger.corp.intel.com ([169.254.11.97]) with mapi id 14.03.0415.000; Fri, 9 Nov 2018 23:37:48 +0200 From: "Winkler, Tomas" To: Jarkko Sakkinen CC: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , James Bottomley , "Struk, Tadeusz" , Stefan Berger , "Nayna Jain" , Peter Huewe , "Jason Gunthorpe" , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: RE: [PATCH v5 16/17] tpm: take TPM chip power gating out of tpm_transmit() Thread-Topic: [PATCH v5 16/17] tpm: take TPM chip power gating out of tpm_transmit() Thread-Index: AQHUd238CNv13jYvhU+0nbO7Ml7SjKVGNDswgAAq4wCAAZjFgA== Date: Fri, 9 Nov 2018 21:37:48 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DA190F4@hasmsx108.ger.corp.intel.com> References: <20181108141541.12832-1-jarkko.sakkinen@linux.intel.com> <20181108141541.12832-17-jarkko.sakkinen@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9DA18602@hasmsx108.ger.corp.intel.com> <20181108230700.GA8038@linux.intel.com> In-Reply-To: <20181108230700.GA8038@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODY2ZmE1NjQtNTcyZC00NjIzLTgyMWMtY2RlNWRlYWQyOTg3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTlpOdjN0TFhjdjBQM3BVNHdJWDNoM3FrVUtnYTRTSEk5VFFTT3VcL2FydktBTU1yQWpOM2NsQnRWQlFPeENiRlIifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.255.203.64] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Thu, Nov 08, 2018 at 06:38:59PM +0000, Winkler, Tomas wrote: > > > Call tpm_chip_start() and tpm_chip_stop() in > > > > > > * tpm_try_get_ops() and tpm_put_ops() > > > * tpm_chip_register() > > > * tpm2_del_space() > > > > > > And remove these calls from tpm_transmit(). The core reason for this > > > change is that in tpm_vtpm_proxy a locality change requires a > > > virtual TPM command (a command made up just for that driver). > > > > > I don't think you can do that, locality has to be request for each > > command, as for example tboot can request higher locality any time. > > That could be a potential problem. How tboot intervention gets prevented > without this patch? As it was said, need to request locality and relinquish it for each command, I believe thought this is not required for client platforms only for servers. > > > Same for cmd_ready()/go_idle() powergatin, you will prevent the whole > > platform entering power save state. > > Why would you want that in a middle of using the TPM anyway? If I'm reading this patch correctly you do cmd_ready when tpm is opened, it doesn't mean there is a real traffic, so why to keep it awake. Thanks Tomas