[PULL v1 00/10] Merge TPM 2020/03/04

Stefan Berger posted 10 patches 5 years, 8 months ago
Test docker-quick@centos7 failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200304131214.179000-1-stefanb@linux.vnet.ibm.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Stefan Berger <stefanb@linux.ibm.com>, Peter Maydell <peter.maydell@linaro.org>, Igor Mammedov <imammedo@redhat.com>, Richard Henderson <rth@twiddle.net>, Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
There is a newer version of this series
default-configs/i386-softmmu.mak        |   2 +-
docs/specs/tpm.rst                      |  25 +-
hw/arm/Kconfig                          |   1 +
hw/arm/sysbus-fdt.c                     |  33 ++
hw/arm/virt.c                           |   7 +
hw/i386/Kconfig                         |   2 +-
hw/i386/acpi-build.c                    |   6 +-
hw/tpm/Kconfig                          |  12 +-
hw/tpm/Makefile.objs                    |   4 +-
hw/tpm/tpm_tis.h                        |  91 +++++
hw/tpm/{tpm_tis.c => tpm_tis_common.c}  | 181 +---------
hw/tpm/tpm_tis_isa.c                    | 170 +++++++++
hw/tpm/tpm_tis_sysbus.c                 | 159 +++++++++
include/sysemu/tpm.h                    |   7 +-
tests/qtest/Makefile.include            |  11 +-
tests/qtest/tpm-crb-swtpm-test.c        |   9 +-
tests/qtest/tpm-crb-test.c              |   3 +
tests/qtest/tpm-tests.c                 |  10 +-
tests/qtest/tpm-tests.h                 |   5 +-
tests/qtest/tpm-tis-device-swtpm-test.c |  76 ++++
tests/qtest/tpm-tis-device-test.c       |  87 +++++
tests/qtest/tpm-tis-swtpm-test.c        |   8 +-
tests/qtest/tpm-tis-test.c              | 414 +---------------------
tests/qtest/tpm-tis-util.c              | 451 ++++++++++++++++++++++++
tests/qtest/tpm-tis-util.h              |  23 ++
tests/qtest/tpm-util.c                  |  11 +-
tests/qtest/tpm-util.h                  |   8 +-
27 files changed, 1207 insertions(+), 609 deletions(-)
create mode 100644 hw/tpm/tpm_tis.h
rename hw/tpm/{tpm_tis.c => tpm_tis_common.c} (85%)
create mode 100644 hw/tpm/tpm_tis_isa.c
create mode 100644 hw/tpm/tpm_tis_sysbus.c
create mode 100644 tests/qtest/tpm-tis-device-swtpm-test.c
create mode 100644 tests/qtest/tpm-tis-device-test.c
create mode 100644 tests/qtest/tpm-tis-util.c
create mode 100644 tests/qtest/tpm-tis-util.h
[PULL v1 00/10] Merge TPM 2020/03/04
Posted by Stefan Berger 5 years, 8 months ago
This series of patches adds support for TPM on ARM.

Regards,
    Stefan

The following changes since commit 2ac031d171ccd18c973014d9978b4a63f0ad5fb0:

  Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-5.0-sf3' into staging (2020-03-03 11:06:39 +0000)

are available in the Git repository at:

  git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-03-04-1

for you to fetch changes up to cf5b8ff14b38eb93363364635df3a0e6aa8c74e5:

  test: tpm-tis: Add Sysbus TPM-TIS device test (2020-03-03 07:29:09 -0500)


Eric Auger (10):
  tpm: rename TPM_TIS into TPM_TIS_ISA
  tpm: Use TPMState as a common struct
  tpm: Separate tpm_tis common functions from isa code
  tpm: Separate TPM_TIS and TPM_TIS_ISA configs
  tpm: Add the SysBus TPM TIS device
  hw/arm/virt: vTPM support
  docs/specs/tpm: Document TPM_TIS sysbus device for ARM
  test: tpm: pass optional machine options to swtpm test functions
  test: tpm-tis: Get prepared to share tests between ISA and sysbus
    devices
  test: tpm-tis: Add Sysbus TPM-TIS device test

 default-configs/i386-softmmu.mak        |   2 +-
 docs/specs/tpm.rst                      |  25 +-
 hw/arm/Kconfig                          |   1 +
 hw/arm/sysbus-fdt.c                     |  33 ++
 hw/arm/virt.c                           |   7 +
 hw/i386/Kconfig                         |   2 +-
 hw/i386/acpi-build.c                    |   6 +-
 hw/tpm/Kconfig                          |  12 +-
 hw/tpm/Makefile.objs                    |   4 +-
 hw/tpm/tpm_tis.h                        |  91 +++++
 hw/tpm/{tpm_tis.c => tpm_tis_common.c}  | 181 +---------
 hw/tpm/tpm_tis_isa.c                    | 170 +++++++++
 hw/tpm/tpm_tis_sysbus.c                 | 159 +++++++++
 include/sysemu/tpm.h                    |   7 +-
 tests/qtest/Makefile.include            |  11 +-
 tests/qtest/tpm-crb-swtpm-test.c        |   9 +-
 tests/qtest/tpm-crb-test.c              |   3 +
 tests/qtest/tpm-tests.c                 |  10 +-
 tests/qtest/tpm-tests.h                 |   5 +-
 tests/qtest/tpm-tis-device-swtpm-test.c |  76 ++++
 tests/qtest/tpm-tis-device-test.c       |  87 +++++
 tests/qtest/tpm-tis-swtpm-test.c        |   8 +-
 tests/qtest/tpm-tis-test.c              | 414 +---------------------
 tests/qtest/tpm-tis-util.c              | 451 ++++++++++++++++++++++++
 tests/qtest/tpm-tis-util.h              |  23 ++
 tests/qtest/tpm-util.c                  |  11 +-
 tests/qtest/tpm-util.h                  |   8 +-
 27 files changed, 1207 insertions(+), 609 deletions(-)
 create mode 100644 hw/tpm/tpm_tis.h
 rename hw/tpm/{tpm_tis.c => tpm_tis_common.c} (85%)
 create mode 100644 hw/tpm/tpm_tis_isa.c
 create mode 100644 hw/tpm/tpm_tis_sysbus.c
 create mode 100644 tests/qtest/tpm-tis-device-swtpm-test.c
 create mode 100644 tests/qtest/tpm-tis-device-test.c
 create mode 100644 tests/qtest/tpm-tis-util.c
 create mode 100644 tests/qtest/tpm-tis-util.h

-- 
2.24.1


Re: [PULL v1 00/10] Merge TPM 2020/03/04
Posted by Peter Maydell 5 years, 8 months ago
On Wed, 4 Mar 2020 at 13:12, Stefan Berger <stefanb@linux.vnet.ibm.com> wrote:
>
> This series of patches adds support for TPM on ARM.
>
> Regards,
>     Stefan
>
> The following changes since commit 2ac031d171ccd18c973014d9978b4a63f0ad5fb0:
>
>   Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-5.0-sf3' into staging (2020-03-03 11:06:39 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-03-04-1
>
> for you to fetch changes up to cf5b8ff14b38eb93363364635df3a0e6aa8c74e5:
>
>   test: tpm-tis: Add Sysbus TPM-TIS device test (2020-03-03 07:29:09 -0500)


Hi; this fails 'make check' on osx hosts (possibly also elsewhere
but that's the first build to fail):

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64
QTEST_QEMU_IMG=qemu-img tests/qtest/arm-cpu-features -m=quick -k --tap
< /dev/null | ./scripts/tap-driver.pl --test-name="arm-cpu-features"
PASS 1 arm-cpu-features /aarch64/arm/query-cpu-model-expansion
qemu-system-aarch64: -accel kvm: invalid accelerator kvm
qemu-system-aarch64: falling back to tcg
PASS 2 arm-cpu-features /aarch64/arm/kvm/query-cpu-model-expansion
qemu-system-aarch64: -accel kvm: invalid accelerator kvm
qemu-system-aarch64: falling back to tcg
PASS 3 arm-cpu-features /aarch64/arm/kvm/query-cpu-model-expansion/sve-off
PASS 4 arm-cpu-features /aarch64/arm/max/query-cpu-model-expansion/sve-max-vq-8
PASS 5 arm-cpu-features /aarch64/arm/max/query-cpu-model-expansion/sve-off
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64
QTEST_QEMU_IMG=qemu-img tests/qtest/tpm-tis-device-test -m=quick -k
--tap < /dev/null | ./scripts/tap-driver.pl
--test-name="tpm-tis-device-test"
qemu-system-aarch64: Device tpm-tis-device can not be dynamically instantiated
Broken pipe
/Users/pm215/src/qemu-for-merges/tests/qtest/libqtest.c:166:
kill_qemu() tried to terminate QEMU process but encountered exit
status 1 (expected 0)
ERROR - missing test plan


thanks
-- PMM

Re: [PULL v1 00/10] Merge TPM 2020/03/04
Posted by Auger Eric 5 years, 8 months ago
Hi Peter, Stefan

On 3/5/20 3:50 PM, Peter Maydell wrote:
> On Wed, 4 Mar 2020 at 13:12, Stefan Berger <stefanb@linux.vnet.ibm.com> wrote:
>>
>> This series of patches adds support for TPM on ARM.
>>
>> Regards,
>>     Stefan
>>
>> The following changes since commit 2ac031d171ccd18c973014d9978b4a63f0ad5fb0:
>>
>>   Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-5.0-sf3' into staging (2020-03-03 11:06:39 +0000)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-03-04-1
>>
>> for you to fetch changes up to cf5b8ff14b38eb93363364635df3a0e6aa8c74e5:
>>
>>   test: tpm-tis: Add Sysbus TPM-TIS device test (2020-03-03 07:29:09 -0500)
> 
> 
> Hi; this fails 'make check' on osx hosts (possibly also elsewhere
> but that's the first build to fail):
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64
> QTEST_QEMU_IMG=qemu-img tests/qtest/arm-cpu-features -m=quick -k --tap
> < /dev/null | ./scripts/tap-driver.pl --test-name="arm-cpu-features"
> PASS 1 arm-cpu-features /aarch64/arm/query-cpu-model-expansion
> qemu-system-aarch64: -accel kvm: invalid accelerator kvm
> qemu-system-aarch64: falling back to tcg
> PASS 2 arm-cpu-features /aarch64/arm/kvm/query-cpu-model-expansion
> qemu-system-aarch64: -accel kvm: invalid accelerator kvm
> qemu-system-aarch64: falling back to tcg
> PASS 3 arm-cpu-features /aarch64/arm/kvm/query-cpu-model-expansion/sve-off
> PASS 4 arm-cpu-features /aarch64/arm/max/query-cpu-model-expansion/sve-max-vq-8
> PASS 5 arm-cpu-features /aarch64/arm/max/query-cpu-model-expansion/sve-off
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64
> QTEST_QEMU_IMG=qemu-img tests/qtest/tpm-tis-device-test -m=quick -k
> --tap < /dev/null | ./scripts/tap-driver.pl
> --test-name="tpm-tis-device-test"
> qemu-system-aarch64: Device tpm-tis-device can not be dynamically instantiated
> Broken pipe
> /Users/pm215/src/qemu-for-merges/tests/qtest/libqtest.c:166:
> kill_qemu() tried to terminate QEMU process but encountered exit
> status 1 (expected 0)
> ERROR - missing test plan
I think it is an issue in
[PATCH v4 06/10] hw/arm/virt: vTPM support

    TYPE_BINDING(TYPE_TPM_TIS_SYSBUS, add_tpm_tis_fdt_node),
is within the CONFIG_LINUX and should be outside.

I am going to send a fix right now but I don't have any environment
ready to test it against make check.

By the way, Peter, you did not review
[PATCH v4 06/10] hw/arm/virt: vTPM support

Are you OK with it besides the above issue?

Thanks

Eric



> 
> 
> thanks
> -- PMM
> 


Re: [PULL v1 00/10] Merge TPM 2020/03/04
Posted by Peter Maydell 5 years, 8 months ago
On Thu, 5 Mar 2020 at 15:11, Auger Eric <eric.auger@redhat.com> wrote:
>
> Hi Peter, Stefan
>
> On 3/5/20 3:50 PM, Peter Maydell wrote:
> I think it is an issue in
> [PATCH v4 06/10] hw/arm/virt: vTPM support
>
>     TYPE_BINDING(TYPE_TPM_TIS_SYSBUS, add_tpm_tis_fdt_node),
> is within the CONFIG_LINUX and should be outside.
>
> I am going to send a fix right now but I don't have any environment
> ready to test it against make check.

It fails also on the BSD VM setups in tests/vm, which
you can probably use to test locally.

thanks
-- PMM

Re: [PULL v1 00/10] Merge TPM 2020/03/04
Posted by Auger Eric 5 years, 8 months ago
Hi Peter,

On 3/5/20 4:17 PM, Peter Maydell wrote:
> On Thu, 5 Mar 2020 at 15:11, Auger Eric <eric.auger@redhat.com> wrote:
>>
>> Hi Peter, Stefan
>>
>> On 3/5/20 3:50 PM, Peter Maydell wrote:
>> I think it is an issue in
>> [PATCH v4 06/10] hw/arm/virt: vTPM support
>>
>>     TYPE_BINDING(TYPE_TPM_TIS_SYSBUS, add_tpm_tis_fdt_node),
>> is within the CONFIG_LINUX and should be outside.
>>
>> I am going to send a fix right now but I don't have any environment
>> ready to test it against make check.
> 
> It fails also on the BSD VM setups in tests/vm, which
> you can probably use to test locally.

OK thank you for the hint. Currently running it.

Best Regards

Eric
> 
> thanks
> -- PMM
>