[RFC 0/6] TPM-TIS bios-tables-test

Eric Auger posted 6 patches 3 years, 11 months ago
Only 5 patches received!
There is a newer version of this series
tests/qtest/tpm-emu.h          |   3 ++
tests/qtest/bios-tables-test.c |  60 +++++++++++++++++++++++++++++++++
tests/qtest/tpm-emu.c          |   1 -
tests/data/acpi/q35/DSDT.tis   | Bin 0 -> 8468 bytes
tests/data/acpi/q35/TPM2.tis   | Bin 0 -> 76 bytes
tests/qtest/Makefile.include   |   1 +
6 files changed, 64 insertions(+), 1 deletion(-)
create mode 100644 tests/data/acpi/q35/DSDT.tis
create mode 100644 tests/data/acpi/q35/TPM2.tis
[RFC 0/6] TPM-TIS bios-tables-test
Posted by Eric Auger 3 years, 11 months ago
This series adds the test of the TPM2 and DSDT tables when the
TPM-TIS device gets instantiated.

The series also allows to validate changes in the TPM2 table
generation done in "[PATCH v3 0/4] vTPM/aarch64 ACPI support",
sent separately.

This depends on Stefan's "acpi: tpm: Do not build TCPA table
for TPM 2".

This is in RFC state because I am not very familiar with the
table generation process docommented in bios-tables-test.c.

I don't know how to get rid of the checkpatch errors:
"ERROR: Does not appear to be a unified-diff format patch"

Surprisingly, checkpatch argues when void tables are added in
the same time as bios-tables-test-allowed-diff.h changes.

Most importantly, to be able to reuse tpm-emu code, I was forced
to remove the TPM2_ST_NO_SESSIONS assert. I would be grateful
if I could get some advises on the best way to address the issue.

Best Regards

Eric

This series can be found at:
https://github.com/eauger/qemu/tree/v5.0-tpm-acpi-tests-v1


Eric Auger (6):
  test/tpm-emu: include sockets and channel headers in tpm-emu header
  tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test
  tests/acpi: Ignore TPM2.tis and DSDT.tis
  tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS
  bios-tables-test: Add Q35/TPM-TIS test
  bios-tables-test: Generate reference tables for Q35/TPM-TIS

 tests/qtest/tpm-emu.h          |   3 ++
 tests/qtest/bios-tables-test.c |  60 +++++++++++++++++++++++++++++++++
 tests/qtest/tpm-emu.c          |   1 -
 tests/data/acpi/q35/DSDT.tis   | Bin 0 -> 8468 bytes
 tests/data/acpi/q35/TPM2.tis   | Bin 0 -> 76 bytes
 tests/qtest/Makefile.include   |   1 +
 6 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/q35/DSDT.tis
 create mode 100644 tests/data/acpi/q35/TPM2.tis

-- 
2.20.1


Re: [RFC 0/6] TPM-TIS bios-tables-test
Posted by Auger Eric 3 years, 11 months ago
Hi,

On 6/1/20 12:21 PM, Eric Auger wrote:
> This series adds the test of the TPM2 and DSDT tables when the
> TPM-TIS device gets instantiated.
> 
> The series also allows to validate changes in the TPM2 table
> generation done in "[PATCH v3 0/4] vTPM/aarch64 ACPI support",
> sent separately.
> 
> This depends on Stefan's "acpi: tpm: Do not build TCPA table
> for TPM 2".
> 
> This is in RFC state because I am not very familiar with the
> table generation process docommented in bios-tables-test.c.
> 
> I don't know how to get rid of the checkpatch errors:
> "ERROR: Does not appear to be a unified-diff format patch"
> 
> Surprisingly, checkpatch argues when void tables are added in
> the same time as bios-tables-test-allowed-diff.h changes.
Both issues reported above were resolved by Michael's
[PATCH] checkpatch: reversed logic with acpi test checks

Thank you for fixing that

Eric

> 
> Most importantly, to be able to reuse tpm-emu code, I was forced
> to remove the TPM2_ST_NO_SESSIONS assert. I would be grateful
> if I could get some advises on the best way to address the issue.
> 
> Best Regards
> 
> Eric
> 
> This series can be found at:
> https://github.com/eauger/qemu/tree/v5.0-tpm-acpi-tests-v1
> 
> 
> Eric Auger (6):
>   test/tpm-emu: include sockets and channel headers in tpm-emu header
>   tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test
>   tests/acpi: Ignore TPM2.tis and DSDT.tis
>   tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS
>   bios-tables-test: Add Q35/TPM-TIS test
>   bios-tables-test: Generate reference tables for Q35/TPM-TIS
> 
>  tests/qtest/tpm-emu.h          |   3 ++
>  tests/qtest/bios-tables-test.c |  60 +++++++++++++++++++++++++++++++++
>  tests/qtest/tpm-emu.c          |   1 -
>  tests/data/acpi/q35/DSDT.tis   | Bin 0 -> 8468 bytes
>  tests/data/acpi/q35/TPM2.tis   | Bin 0 -> 76 bytes
>  tests/qtest/Makefile.include   |   1 +
>  6 files changed, 64 insertions(+), 1 deletion(-)
>  create mode 100644 tests/data/acpi/q35/DSDT.tis
>  create mode 100644 tests/data/acpi/q35/TPM2.tis
> 


[RFC 2/6] tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test
Posted by Eric Auger 3 years, 11 months ago
Add placeholders for TPM and DSDT reference tables for
Q35 TPM-TIS tests.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
 tests/data/acpi/q35/DSDT.tis | Bin
 tests/data/acpi/q35/TPM2.tis | Bin
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.tis
 create mode 100644 tests/data/acpi/q35/TPM2.tis

diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
-- 
2.20.1


Re: [RFC 2/6] tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test
Posted by Stefan Berger 3 years, 11 months ago
On 6/1/20 6:21 AM, Eric Auger wrote:
> Add placeholders for TPM and DSDT reference tables for
> Q35 TPM-TIS tests.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>


> ---
>   tests/data/acpi/q35/DSDT.tis | Bin
>   tests/data/acpi/q35/TPM2.tis | Bin
>   2 files changed, 0 insertions(+), 0 deletions(-)
>   create mode 100644 tests/data/acpi/q35/DSDT.tis
>   create mode 100644 tests/data/acpi/q35/TPM2.tis
>
> diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis
> new file mode 100644
> index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
> diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis
> new file mode 100644
> index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391



Re: [RFC 2/6] tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test
Posted by Igor Mammedov 3 years, 11 months ago
On Mon,  1 Jun 2020 12:21:09 +0200
Eric Auger <eric.auger@redhat.com> wrote:

> Add placeholders for TPM and DSDT reference tables for
> Q35 TPM-TIS tests.
> 
> Signed-off-by: Eric Auger <eric.auger@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  tests/data/acpi/q35/DSDT.tis | Bin
>  tests/data/acpi/q35/TPM2.tis | Bin
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  create mode 100644 tests/data/acpi/q35/DSDT.tis
>  create mode 100644 tests/data/acpi/q35/TPM2.tis
> 
> diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis
> new file mode 100644
> index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
> diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis
> new file mode 100644
> index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391