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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CDD9C433EF for ; Tue, 4 Jan 2022 14:51:01 +0000 (UTC) Received: from localhost ([::1]:56180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4l9P-0001py-2v for qemu-devel@archiver.kernel.org; Tue, 04 Jan 2022 09:50:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4l7C-0008Q6-7Q for qemu-devel@nongnu.org; Tue, 04 Jan 2022 09:48:42 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4l79-0002hg-PB for qemu-devel@nongnu.org; Tue, 04 Jan 2022 09:48:41 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 204Dva5h019663; Tue, 4 Jan 2022 14:48:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=E7M1NaL6mUeVyqFwV26dwIhbq5JWh2VFl0a1OgybWEM=; b=H1rcj3+Xm0GoMJJ0Knx/97Fhq7lWXN3gd4QoZR4WbRp5oPyA3k/9Evy+I2rpMLrWSzgx mYPd7IWaFaIYCVDmyjrmLljvSkybff1MqyT0iTXgCH7m35Vd07K6LmvDii+scnfV8zTz OQvOWGdDQHT15B2HtoXYrvu++9hGm3Di1+xlFLNaZDzmxcrUoG3smuFPdy10UIBerhYG u6WNC7sOfXxZe2UgRTZqFhOfdZSdAuEeymFiocpaI+k4f7DYt4Gv3NrRe1aKvA15WgP+ SeQ1dpqhOE6QmIl+fhZcdZ0gONVun/Mvc9kGsjyaBJ6UdGN4iJOQZD+RvNFeM8hVb5zO UA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dcen7aqhg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Jan 2022 14:48:36 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 204DhmMU015048; Tue, 4 Jan 2022 14:48:35 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dcen7aqh5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Jan 2022 14:48:35 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 204EmXs7014144; Tue, 4 Jan 2022 14:48:34 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04dal.us.ibm.com with ESMTP id 3daekb76f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Jan 2022 14:48:34 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 204EmXM19176030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jan 2022 14:48:33 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11D2012405C; Tue, 4 Jan 2022 14:48:33 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAA08124052; Tue, 4 Jan 2022 14:48:32 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 4 Jan 2022 14:48:32 +0000 (GMT) Message-ID: <1b32e29a-36fc-7275-e856-97a12585e0a3@linux.ibm.com> Date: Tue, 4 Jan 2022 09:48:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Content-Language: en-US To: Igor Mammedov References: <20211223022310.575496-1-stefanb@linux.ibm.com> <20211223022310.575496-3-stefanb@linux.ibm.com> <20220104105506.17ed9209@redhat.com> From: Stefan Berger In-Reply-To: <20220104105506.17ed9209@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: IfaUeO8a0mUIMwS7uHCksmbHTnMqrvZc X-Proofpoint-GUID: BHq-kOUfky7e4cSPYDgVF8X49bpyEcIr Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-04_06,2022-01-04_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 mlxscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201040098 Received-SPF: pass client-ip=148.163.158.5; envelope-from=stefanb@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.354, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ani Sinha , marcandre.lureau@redhat.com, "Michael S . Tsirkin" , qemu-devel@nongnu.org, Shannon Zhao Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 1/4/22 04:55, Igor Mammedov wrote: > On Wed, 22 Dec 2021 21:23:09 -0500 > Stefan Berger wrote: > >> Add missing device identification objects _STR and _UID. They will appear > why, does it break anything or it's just cosmetic? I don't know about whether any software needs these entries but it's driven by this: https://gitlab.com/qemu-project/qemu/-/issues/708 > >> as files 'description' and 'uid' under Linux sysfs. >> >> Cc: Shannon Zhao >> Cc: Michael S. Tsirkin >> Cc: Igor Mammedov >> Cc: Ani Sinha >> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708 >> Signed-off-by: Stefan Berger >> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com >> --- >> hw/arm/virt-acpi-build.c | 1 + >> hw/i386/acpi-build.c | 8 ++++++++ >> 2 files changed, 9 insertions(+) >> >> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c >> index d0f4867fdf..f2514ce77c 100644 >> --- a/hw/arm/virt-acpi-build.c >> +++ b/hw/arm/virt-acpi-build.c >> @@ -229,6 +229,7 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms) >> >> Aml *dev = aml_device("TPM0"); >> aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101"))); >> + aml_append(dev, aml_name_decl("_STR", aml_string("TPM 2.0 Device"))); >> aml_append(dev, aml_name_decl("_UID", aml_int(0))); >> >> Aml *crs = aml_resource_template(); >> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c >> index 8383b83ee3..2fb70847cb 100644 >> --- a/hw/i386/acpi-build.c >> +++ b/hw/i386/acpi-build.c >> @@ -1812,11 +1812,15 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, >> dev = aml_device("TPM"); >> aml_append(dev, aml_name_decl("_HID", >> aml_string("MSFT0101"))); >> + aml_append(dev, >> + aml_name_decl("_STR", >> + aml_string("TPM 2.0 Device"))); >> } else { >> dev = aml_device("ISA.TPM"); >> aml_append(dev, aml_name_decl("_HID", >> aml_eisaid("PNP0C31"))); >> } >> + aml_append(dev, aml_name_decl("_UID", aml_int(1))); > why it's 1, and not 0 as in virt-arm? Marc-Andre and I looked at machines with hardware TPMs and that's what we found there as well, a '1'. > >> >> aml_append(dev, aml_name_decl("_STA", aml_int(0xF))); >> crs = aml_resource_template(); >> @@ -1844,6 +1848,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, >> if (TPM_IS_CRB(tpm)) { >> dev = aml_device("TPM"); >> aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101"))); >> + aml_append(dev, aml_name_decl("_STR", >> + aml_string("TPM 2.0 Device"))); >> crs = aml_resource_template(); >> aml_append(crs, aml_memory32_fixed(TPM_CRB_ADDR_BASE, >> TPM_CRB_ADDR_SIZE, AML_READ_WRITE)); >> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, >> >> aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); >> > no necessary ^^^ empty line fixed > >> + aml_append(dev, aml_name_decl("_UID", aml_int(1))); >> + >> tpm_build_ppi_acpi(tpm, dev); >> >> aml_append(sb_scope, dev);