From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91DD2C4708E for ; Wed, 7 Dec 2022 14:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbiLGOGd (ORCPT ); Wed, 7 Dec 2022 09:06:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbiLGOGE (ORCPT ); Wed, 7 Dec 2022 09:06:04 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF6A2BEC for ; Wed, 7 Dec 2022 06:05:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7D0CC617A9 for ; Wed, 7 Dec 2022 14:05:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 906A2C433C1; Wed, 7 Dec 2022 14:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670421906; bh=tPXYl0PL9opV7TH+ZTTdR4oUqeZXGjyedJLPpxS40GE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tpxu4pFFkXnTjvsU4SoUSkaT1/Q51Pxi4jnoZggIWqOgZi6b2CCG5HqmD0xG4KKKn G7uuemDLOlOtXdkf18QlSf1aTQP1uttP4MHy9ABaxyOQirXEupGUD13XzvM2qdNZ8/ c6L4WG+j3eaAavzRG+Jd3ZNh8SESSALIUUhmtN4vGZgEbbccmDEJJdYbyyj6VENJi8 Uzw3g2cZ2/GnWzLJFLWPUpJHoUffCH0FxYVx508VHUfcCkQaLVFCaJj4mm/vHPDpRT M59DM5mQfCW6C9juLp9tR0JM/7YSTjKawlFVTbN29lG75CMyRX5N4X8U/Hq2VZpQoF +xfv2255qu0ww== Date: Wed, 7 Dec 2022 14:05:03 +0000 From: Jarkko Sakkinen To: Bjorn Helgaas Cc: Francisco Blas Izquierdo Riera , linux-pci@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH v2] PCI: Add DMA alias for Intel Corporation 8 Series HECI Message-ID: References: <20221121164037.8C73110BB536@smtp.xiscosoft.net> <20221129182756.GA727866@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221129182756.GA727866@bhelgaas> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Nov 29, 2022 at 12:27:56PM -0600, Bjorn Helgaas wrote: > Does the TPM work under Windows? If so, it would suggest that there's > a different way to use it that doesn't require the quirk or the DMAR > override. Or maybe it only works on Windows without the IOMMU being > enabled? Haswell was the first generation having firmware TPM, and had fTPM implementation that was flakky in many ways (e.g. Intel TXT still required a discrete TPM so servers never used it). We have some workarounds for it already in place. I'm almost 100% confident nobody seriously tried to use it on server side and/or together with MMIO. > Naive question: apparently the TPM is doing DMA reads/writes. I see > tpm_crb.c doing MMIO mappings (ioremap()), but I don't see any DMA > mappings. Is that implicit or done elsewhere? Firmware does this. Kernel does not and should not care how it does it because it is not part of the specification [1]. Kernel cares only of getting a buffer pointed out by the firmware. [1] Section 6.5.3 in https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/ BR, Jarkko