qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] tpm: Add missing ACPI device identification objects
@ 2021-11-10 13:35 Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Stefan Berger @ 2021-11-10 13:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau, Stefan Berger

This series of patches adds missing ACPI device identification objects _STR
and _UID to TPM 1.2 and TPM 2 ACPI tables.

   Stefan

v3:
 - Dropped replacement of ACPI tables with empty files in 1/3.
 - Reduced ignored files

Stefan Berger (3):
  tests: acpi: prepare for updated TPM related tables
  acpi: tpm: Add missing device identification objects
  tests: acpi: Add updated TPM related tables

 hw/arm/virt-acpi-build.c           |   1 +
 hw/i386/acpi-build.c               |   8 ++++++++
 tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2  | Bin 8894 -> 8921 bytes
 4 files changed, 9 insertions(+)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables
  2021-11-10 13:35 [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
@ 2021-11-10 13:35 ` Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Berger @ 2021-11-10 13:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ani Sinha, marcandre.lureau, Igor Mammedov, Michael S . Tsirkin,
	Stefan Berger

Replace existing TPM related tables, that are about to change, with
empty files.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..5d80e408d4 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,3 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 2/3] acpi: tpm: Add missing device identification objects
  2021-11-10 13:35 [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
@ 2021-11-10 13:35 ` Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
  2021-11-27  4:15 ` [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Berger @ 2021-11-10 13:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, Shannon Zhao, Igor Mammedov, Ani Sinha,
	marcandre.lureau, Stefan Berger

Add missing device identification objects _STR and _UID. They will appear
as files 'description' and 'uid' under Linux sysfs.

Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
Signed-off-by: Stefan Berger <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 674f902652..09456424aa 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -228,6 +228,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 a3ad6abd33..5bd2160a89 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1808,11 +1808,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)));
 
                 aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
                 crs = aml_resource_template();
@@ -1840,6 +1844,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));
@@ -1847,6 +1853,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
 
         aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
 
+        aml_append(dev, aml_name_decl("_UID", aml_int(1)));
+
         tpm_build_ppi_acpi(tpm, dev);
 
         aml_append(sb_scope, dev);
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 3/3] tests: acpi: Add updated TPM related tables
  2021-11-10 13:35 [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
  2021-11-10 13:35 ` [PATCH v3 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
@ 2021-11-10 13:35 ` Stefan Berger
  2021-11-27  4:15 ` [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Berger @ 2021-11-10 13:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ani Sinha, marcandre.lureau, Igor Mammedov, Michael S . Tsirkin,
	Stefan Berger

The updated TPM related tables have the following additions:

   Device (TPM)
   {
       Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */)  // _HID: Hardware ID
+      Name (_STR, "TPM 2.0 Device")  // _STR: Description String
+      Name (_UID, One)  // _UID: Unique ID
       Name (_STA, 0x0F)  // _STA: Status
       Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 8894 -> 8900 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 8894 -> 8921 bytes
 tests/qtest/bios-tables-test-allowed-diff.h |   2 --
 3 files changed, 2 deletions(-)

diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12
index c96b5277a14ae98174408d690d6e0246bd932623..dc1c990496a8fb0fc268081a54c5af363bcd833f 100644
GIT binary patch
delta 50
zcmdnzdc>8>CD<k8h!O(><D-pSq6(a@S~2m#PVoZ1lQk6FnOs#T7b=LdgnGI#Zf;Sq
GVgdkq_zlDW

delta 45
zcmX@&y3du%CD<iopArKDquNF;Q3Xza&6xOLr+5MP$r=joO#Uj93l&5+_b6B}0RSYU
B3@rcv

diff --git a/tests/data/acpi/q35/DSDT.tis.tpm2 b/tests/data/acpi/q35/DSDT.tis.tpm2
index c92d4d29c79352a60974ea9f665d0b9a410a4bac..1314a5d3dad1b7b9aff782e649058873c492acb0 100644
GIT binary patch
delta 70
zcmdnzdefE5CD<k8rV;}KBl|`!Q3Wn9?U?vrr+5J;?a7)7ZcJWklM5BZ#e;Z50(=#W
a^b8bSQp+-vQyDnoLp@y>H@7HQF#!OXKoTqf

delta 46
zcmccVy3du%CD<iopArKD<HL<yq6%F8nlbUgPVoZnnv*pZ+?f1TCKoD*Z(gim#smOL
C#|=IJ

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index 5d80e408d4..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,3 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/3] tpm: Add missing ACPI device identification objects
  2021-11-10 13:35 [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
                   ` (2 preceding siblings ...)
  2021-11-10 13:35 ` [PATCH v3 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
@ 2021-11-27  4:15 ` Stefan Berger
  2021-11-27 23:12   ` Michael S. Tsirkin
  3 siblings, 1 reply; 6+ messages in thread
From: Stefan Berger @ 2021-11-27  4:15 UTC (permalink / raw)
  To: qemu-devel, Michael S. Tsirkin, Igor Mammedov; +Cc: marcandre.lureau

Is this series now acceptable for 'after 6.2'?


On 11/10/21 08:35, Stefan Berger wrote:
> This series of patches adds missing ACPI device identification objects _STR
> and _UID to TPM 1.2 and TPM 2 ACPI tables.
>
>     Stefan
>
> v3:
>   - Dropped replacement of ACPI tables with empty files in 1/3.
>   - Reduced ignored files
>
> Stefan Berger (3):
>    tests: acpi: prepare for updated TPM related tables
>    acpi: tpm: Add missing device identification objects
>    tests: acpi: Add updated TPM related tables
>
>   hw/arm/virt-acpi-build.c           |   1 +
>   hw/i386/acpi-build.c               |   8 ++++++++
>   tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
>   tests/data/acpi/q35/DSDT.tis.tpm2  | Bin 8894 -> 8921 bytes
>   4 files changed, 9 insertions(+)
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/3] tpm: Add missing ACPI device identification objects
  2021-11-27  4:15 ` [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
@ 2021-11-27 23:12   ` Michael S. Tsirkin
  0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2021-11-27 23:12 UTC (permalink / raw)
  To: Stefan Berger; +Cc: Igor Mammedov, qemu-devel, marcandre.lureau

On Fri, Nov 26, 2021 at 11:15:40PM -0500, Stefan Berger wrote:
> Is this series now acceptable for 'after 6.2'?

Sure. Tagged. Pls ping me aftre release to help make sure I don't lose
it.

> 
> On 11/10/21 08:35, Stefan Berger wrote:
> > This series of patches adds missing ACPI device identification objects _STR
> > and _UID to TPM 1.2 and TPM 2 ACPI tables.
> > 
> >     Stefan
> > 
> > v3:
> >   - Dropped replacement of ACPI tables with empty files in 1/3.
> >   - Reduced ignored files
> > 
> > Stefan Berger (3):
> >    tests: acpi: prepare for updated TPM related tables
> >    acpi: tpm: Add missing device identification objects
> >    tests: acpi: Add updated TPM related tables
> > 
> >   hw/arm/virt-acpi-build.c           |   1 +
> >   hw/i386/acpi-build.c               |   8 ++++++++
> >   tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
> >   tests/data/acpi/q35/DSDT.tis.tpm2  | Bin 8894 -> 8921 bytes
> >   4 files changed, 9 insertions(+)
> > 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-27 23:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 13:35 [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2021-11-10 13:35 ` [PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
2021-11-10 13:35 ` [PATCH v3 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
2021-11-10 13:35 ` [PATCH v3 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
2021-11-27  4:15 ` [PATCH v3 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2021-11-27 23:12   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).