Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1845899pxu; Tue, 24 Nov 2020 10:13:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDnFLhuPn1zPLVS0IgJ597IXztE+AWnvejI6AO5Y8osdKMWHcksJqlSmLT3PhgNbuSR4My X-Received: by 2002:a17:906:b80e:: with SMTP id dv14mr4995799ejb.528.1606241588965; Tue, 24 Nov 2020 10:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606241588; cv=none; d=google.com; s=arc-20160816; b=qqwk2b2wRmDPUfH/SR2M1zQE87bISJMME7QOby0EIi/+YAtCbNmUjdpehDHOsVb+uN 3kq8jvFcP9bGzbZ1XHtR5MN+tAULPjpfkmAq1Y5fHFgny8M7sVHhZBbDwxCMWyYpHbCY Bh4/ZHDk/hrVRq1JH83EW+93E0nrixwYOI4WM8yhFfrVTy8wtMxXLHZJnQZaQwu0RZ0J kV3oqkExgXZsQ+5GYz7iMOz4bjBx+5ocJ/DvQEqFVtxymschi4FSY4Su23w885mwCdis 3YDunFz6BrZI3CslX2kFuTBZGcql9k1vnPtWsoVdM4VZ3BpQvnNnyZyRdedqsWdGJCP5 lo0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=/9Hz2o1G824WH6xxflXp1MZwEr8EOjHFFpxmDkFoNeU=; b=WztZzG/q4CSzbAxj8mhciNjIXP4cqP01E60XxL9iSgECRLuelwG4pa5kkN/n3RR/wO C8hwKLEmHa2sPVjiGq/+EhZYZSM7yu4PUM17RwMTkFxBVoCcaJ5YzYZstWd4Zeefifz2 5BjqHcHJWKJHwhKjhR071vnyMJCdRKwE6SUrlL2dYZtQTPvekfhxOrTLtyfPN535NU03 s/LbzlhkD5X+SCND/aKCrlbpjwiDwr9c4LPTTciwRhcixyufV8ekgsOljm73g+IcoCfn 4ZMT4wBICKUKoFnWGuNq867oWsQLOSlXee4Z4hNJ5dO+hPpWevSQ2VNiXvZNetcuOz2o cYHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=CNoT1w+r; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=CNoT1w+r; 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=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk11si7151108ejb.542.2020.11.24.10.12.45; Tue, 24 Nov 2020 10:13:08 -0800 (PST) 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=@hansenpartnership.com header.s=20151216 header.b=CNoT1w+r; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=CNoT1w+r; 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=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404323AbgKXSK0 (ORCPT + 99 others); Tue, 24 Nov 2020 13:10:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404318AbgKXSKZ (ORCPT ); Tue, 24 Nov 2020 13:10:25 -0500 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98AAFC0613D6; Tue, 24 Nov 2020 10:10:25 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 823D01280043; Tue, 24 Nov 2020 10:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1606241423; bh=9bNSodWP10rYEh+2Q0UUXuz2PN4QPQBYDPPj4mCWa+o=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=CNoT1w+r2SuCu3uIdlUtolKGNg832mPiE0xTZFk/7dj+nZ4t/BN8r5NhverRvwBBE xYLHXBI61oHbw8+Ws2fUbtrN786L1h/fLhiPShDbiRG1OffuLsxfW8fb7eAoz1W67w 0QgYUAG/8B2Ghz6h5veYhsJiTpG+oTJfefY4Og20= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LwrDD7nnCZmy; Tue, 24 Nov 2020 10:10:23 -0800 (PST) Received: from jarvis.int.hansenpartnership.com (unknown [IPv6:2601:600:8280:66d1::527]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id EBA171280021; Tue, 24 Nov 2020 10:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1606241423; bh=9bNSodWP10rYEh+2Q0UUXuz2PN4QPQBYDPPj4mCWa+o=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=CNoT1w+r2SuCu3uIdlUtolKGNg832mPiE0xTZFk/7dj+nZ4t/BN8r5NhverRvwBBE xYLHXBI61oHbw8+Ws2fUbtrN786L1h/fLhiPShDbiRG1OffuLsxfW8fb7eAoz1W67w 0QgYUAG/8B2Ghz6h5veYhsJiTpG+oTJfefY4Og20= Message-ID: <67628c88a9ddc85d9957c1847514afe24a6fcebf.camel@HansenPartnership.com> Subject: Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s From: James Bottomley To: Jerry Snitselaar , Jarkko Sakkinen Cc: Matthew Garrett , linux-integrity , Linux Kernel Mailing List , Peter Huewe , Jason Gunthorpe , Hans de Goede Date: Tue, 24 Nov 2020 10:10:21 -0800 In-Reply-To: <871rgiod53.fsf@redhat.com> References: <20201015214430.17937-1-jsnitsel@redhat.com> <87d009c0pn.fsf@redhat.com> <20201124032623.GA40007@kernel.org> <871rgiod53.fsf@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-11-24 at 10:52 -0700, Jerry Snitselaar wrote: > Before diving further into that though, does anyone else have an > opinion on ripping out the irq code, and just using polling? We've > been only polling since 2015 anyways. Well only a biased one, obviously: polling causes large amounts of busy waiting, which is a waste of CPU resources and does increase the time it takes us to do TPM operations ... not a concern if you're doing long computation ones, like signatures, but it is a problem for short operations like bulk updates of PCRs. The other potential issue, as we saw with atmel is that if you prod the chip too often (which you have to do with polling) you risk upsetting it. We've spent ages trying to tune the polling parameters to balance reduction of busy wait with chip upset and still, apparently, not quite got it right. If the TPM has a functioning IRQ then it gets us out of the whole polling mess entirely. The big question is how many chips that report an IRQ actually have a malfunctioning one? James