[Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23

Stefan Berger posted 4 patches 7 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180524164857.3014670-1-stefanb@linux.vnet.ibm.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
There is a newer version of this series
docs/specs/tpm.txt         | 106 +++++++++++++++++++++
hw/tpm/tpm_emulator.c      | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
hw/tpm/tpm_tis.c           |  52 +++++++++-
hw/tpm/trace-events        |   9 +-
tests/Makefile.include     |   3 +
tests/tpm-crb-swtpm-test.c | 247 +++++++++++++++++++++++++++++++++++++++++++++++
tests/tpm-util.c           | 186 ++++++++++++++++++++++++++++++++++++
tests/tpm-util.h           |  36 +++++++
8 files changed, 948 insertions(+), 14 deletions(-)
create mode 100644 tests/tpm-crb-swtpm-test.c
create mode 100644 tests/tpm-util.c
create mode 100644 tests/tpm-util.h
[Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23
Posted by Stefan Berger 7 years, 5 months ago
This series of patches adds TPM emulator state migration support and a
test case for testing (local) migration.

   Stefan


The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d:

  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-05-22 09:43:58 +0100)

are available in the Git repository at:

  git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2018-05-23-3

for you to fetch changes up to 37fa382f327405b6516e9983c1aa1ca32c726892:

  test: Add test cases that use the external swtpm with CRB interface (2018-05-24 12:07:04 -0400)

----------------------------------------------------------------
Merge tpm 2018/05/23 v3

----------------------------------------------------------------
Stefan Berger (4):
      tpm: extend TPM emulator with state migration support
      tpm: extend TPM TIS with state migration support
      docs: tpm: add VM save/restore example and troubleshooting guide
      test: Add test cases that use the external swtpm with CRB interface

 docs/specs/tpm.txt         | 106 +++++++++++++++++++++
 hw/tpm/tpm_emulator.c      | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 hw/tpm/tpm_tis.c           |  52 +++++++++-
 hw/tpm/trace-events        |   9 +-
 tests/Makefile.include     |   3 +
 tests/tpm-crb-swtpm-test.c | 247 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/tpm-util.c           | 186 ++++++++++++++++++++++++++++++++++++
 tests/tpm-util.h           |  36 +++++++
 8 files changed, 948 insertions(+), 14 deletions(-)
 create mode 100644 tests/tpm-crb-swtpm-test.c
 create mode 100644 tests/tpm-util.c
 create mode 100644 tests/tpm-util.h


-- 
2.14.3


Re: [Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23
Posted by Peter Maydell 7 years, 5 months ago
On 24 May 2018 at 17:48, Stefan Berger <stefanb@linux.vnet.ibm.com> wrote:
> This series of patches adds TPM emulator state migration support and a
> test case for testing (local) migration.
>
>    Stefan
>
>
> The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d:
>
>   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-05-22 09:43:58 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2018-05-23-3
>
> for you to fetch changes up to 37fa382f327405b6516e9983c1aa1ca32c726892:
>
>   test: Add test cases that use the external swtpm with CRB interface (2018-05-24 12:07:04 -0400)
>
> ----------------------------------------------------------------
> Merge tpm 2018/05/23 v3
>
> ----------------------------------------------------------------
> Stefan Berger (4):
>       tpm: extend TPM emulator with state migration support
>       tpm: extend TPM TIS with state migration support
>       docs: tpm: add VM save/restore example and troubleshooting guide
>       test: Add test cases that use the external swtpm with CRB interface

I still see compile failures on OpenBSD, I'm afraid:

In file included from /home/qemu/include/qemu/osdep.h:68:0,
                 from /home/qemu/tests/tpm-util.c:15:
/home/qemu/tests/tpm-util.c: In function 'tpm_util_swtpm_has_tpm2':
/home/qemu/tests/tpm-util.c:101:10: error: expected identifier or '('
before '&' token
     gint stdout;
          ^
/home/qemu/tests/tpm-util.c:112:43: error: lvalue required as unary '&' operand
                                     NULL, &stdout, NULL, NULL);
                                           ^
/home/qemu/tests/tpm-util.c:117:14: warning: passing argument 1 of
'read' makes integer from pointer without a cast
     n = read(stdout, buffer, sizeof(buffer) - 1);
              ^
In file included from /home/qemu/include/qemu/osdep.h:75:0,
                 from /home/qemu/tests/tpm-util.c:15:
/usr/include/unistd.h:372:10: note: expected 'int' but argument is of
type 'struct FILE *'
 ssize_t  read(int, void *, size_t)
          ^
gmake: *** [/home/qemu/rules.mak:66: tests/tpm-util.o] Error 1
gmake: Leaving directory '/home/qemu/build/all'


"stdout" is a FILE* global provided by the system headers -- you can't
reuse it for a local variable name.

thanks
-- PMM

Re: [Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23
Posted by Stefan Berger 7 years, 5 months ago
On 05/25/2018 05:03 AM, Peter Maydell wrote:
> On 24 May 2018 at 17:48, Stefan Berger <stefanb@linux.vnet.ibm.com> wrote:
>> This series of patches adds TPM emulator state migration support and a
>> test case for testing (local) migration.
>>
>>     Stefan
>>
>>
>> The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d:
>>
>>    Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-05-22 09:43:58 +0100)
>>
>> are available in the Git repository at:
>>
>>    git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2018-05-23-3
>>
>> for you to fetch changes up to 37fa382f327405b6516e9983c1aa1ca32c726892:
>>
>>    test: Add test cases that use the external swtpm with CRB interface (2018-05-24 12:07:04 -0400)
>>
>> ----------------------------------------------------------------
>> Merge tpm 2018/05/23 v3
>>
>> ----------------------------------------------------------------
>> Stefan Berger (4):
>>        tpm: extend TPM emulator with state migration support
>>        tpm: extend TPM TIS with state migration support
>>        docs: tpm: add VM save/restore example and troubleshooting guide
>>        test: Add test cases that use the external swtpm with CRB interface
> I still see compile failures on OpenBSD, I'm afraid:
>
> In file included from /home/qemu/include/qemu/osdep.h:68:0,
>                   from /home/qemu/tests/tpm-util.c:15:
> /home/qemu/tests/tpm-util.c: In function 'tpm_util_swtpm_has_tpm2':
> /home/qemu/tests/tpm-util.c:101:10: error: expected identifier or '('
> before '&' token
>       gint stdout;
>            ^
> /home/qemu/tests/tpm-util.c:112:43: error: lvalue required as unary '&' operand
>                                       NULL, &stdout, NULL, NULL);
>                                             ^
> /home/qemu/tests/tpm-util.c:117:14: warning: passing argument 1 of
> 'read' makes integer from pointer without a cast
>       n = read(stdout, buffer, sizeof(buffer) - 1);
>                ^
> In file included from /home/qemu/include/qemu/osdep.h:75:0,
>                   from /home/qemu/tests/tpm-util.c:15:
> /usr/include/unistd.h:372:10: note: expected 'int' but argument is of
> type 'struct FILE *'
>   ssize_t  read(int, void *, size_t)
>            ^
> gmake: *** [/home/qemu/rules.mak:66: tests/tpm-util.o] Error 1
> gmake: Leaving directory '/home/qemu/build/all'
>
>
> "stdout" is a FILE* global provided by the system headers -- you can't
> reuse it for a local variable name.

Renamed it to mystdout.

    Stefan


>
> thanks
> -- PMM
>