From nobody Mon Feb 9 20:10:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549292704931887.3761057094066; Mon, 4 Feb 2019 07:05:04 -0800 (PST) Received: from localhost ([127.0.0.1]:44116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfnx-0000CG-P2 for importer@patchew.org; Mon, 04 Feb 2019 10:05:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfaU-00066J-KJ for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:51:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqfTa-0005gU-JS for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:59 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:39294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqfTa-0005gJ-BZ for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:58 -0500 Received: by mail-qt1-f176.google.com with SMTP id u47so88911qtj.6 for ; Mon, 04 Feb 2019 06:43:58 -0800 (PST) Received: from redhat.com (pool-173-76-246-42.bstnma.fios.verizon.net. [173.76.246.42]) by smtp.gmail.com with ESMTPSA id m41sm21164364qtc.58.2019.02.04.06.43.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 06:43:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mBsE7iFbvSCMnybV9hsNimZO6pERHKfgS12M2F1FWvQ=; b=ArKYVpR1nlRXBIQfdwpUAx08vIGis9NS1Z6U0dBE7lMyQO/snU0nkl73hALeiesyGR yWLelPJu5W3bdWWxdn+zuJvc67KzLl8/jVtXcoRKsmiqTw6kO4ZNcUsF8a8h7OB0AUIH 5sGavgHCX+VJoJtp8sNx7aMvtTQWmObpzNOAqAgBblijhb0oF0I2gExlJx7cyJFxpTOW YI88AvWost9NdFMo2BKjJYPP+jdWiiYaqiENFckHqPCYX7jJPYHBkg9HrN0tWs6BKVXv 3s6nqQ9ZXloVemyw1E9gI4CI0GylSfWzsl3vJ30SpHnAur3KcN9IfUxrMyeIEuro/ja6 f9gQ== X-Gm-Message-State: AHQUAubWcRUq3wueu+NXb+hgDv3DrK2YjSbCY6iAMZzJxJ0nqpdJlGdh 3RgHe7DahB0JKdhxW8EeY2AYETyNsCr8Sg== X-Google-Smtp-Source: AHgI3IZ31LZPlccgijVWuhthBA0Oefa3sgAIIy70rPsFNxFtq9qrry5JmP8DVrjtNnzRt3n20L3ssw== X-Received: by 2002:ac8:7417:: with SMTP id p23mr2760095qtq.320.1549291437627; Mon, 04 Feb 2019 06:43:57 -0800 (PST) Date: Mon, 4 Feb 2019 09:43:55 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20190204142638.27021-20-mst@redhat.com> References: <20190204142638.27021-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190204142638.27021-1-mst@redhat.com> X-Mailer: git-send-email 2.17.1.1206.gb667731e2e.dirty X-Mutt-Fcc: =sent X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.176 Subject: [Qemu-devel] [PULL 19/25] acpi: Make TPM 2.0 with TIS available as MSFT0101 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Paolo Bonzini , Igor Mammedov , Stefan Berger , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Berger This patch makes the a TPM 2.0 with TIS interface available under the HID 'MSF0101'. This is supported by Linux and also Windows now recognizes the TPM 2.0 with TIS interface. Leave the TPM 1.2 as before. Signed-off-by: Stefan Berger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d60603abd7..26cef4af2d 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2141,8 +2141,16 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en); =20 if (TPM_IS_TIS(tpm)) { - dev =3D aml_device("ISA.TPM"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C31"= ))); + if (misc->tpm_version =3D=3D TPM_VERSION_2_0) { + dev =3D aml_device("TPM"); + aml_append(dev, aml_name_decl("_HID", + aml_string("MSFT0101"))); + } else { + dev =3D aml_device("ISA.TPM"); + aml_append(dev, aml_name_decl("_HID", + aml_eisaid("PNP0C31"))); + } + aml_append(dev, aml_name_decl("_STA", aml_int(0xF))); crs =3D aml_resource_template(); aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE, --=20 MST