[Qemu-devel] [PATCH v9 0/6] Add support for TPM Physical Presence interface

Marc-André Lureau posted 6 patches 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180810153223.28409-1-marcandre.lureau@redhat.com
Test checkpatch failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
There is a newer version of this series
hw/tpm/tpm_ppi.h      |  28 +++
include/hw/acpi/tpm.h |  17 ++
include/hw/compat.h   |  14 +-
include/hw/i386/pc.h  |   5 +-
hw/i386/acpi-build.c  | 456 +++++++++++++++++++++++++++++++++++++++++-
hw/i386/pc_piix.c     |  13 +-
hw/i386/pc_q35.c      |  12 +-
hw/tpm/tpm_crb.c      |  12 ++
hw/tpm/tpm_ppi.c      |  54 +++++
hw/tpm/tpm_tis.c      |  12 ++
docs/specs/tpm.txt    | 101 ++++++++++
hw/tpm/Makefile.objs  |   1 +
hw/tpm/trace-events   |   3 +
13 files changed, 722 insertions(+), 6 deletions(-)
create mode 100644 hw/tpm/tpm_ppi.h
create mode 100644 hw/tpm/tpm_ppi.c
[Qemu-devel] [PATCH v9 0/6] Add support for TPM Physical Presence interface
Posted by Marc-André Lureau 7 years, 2 months ago
Hi,

The following patches implement the TPM Physical Presence Interface
that allows a user to set a command via ACPI (sysfs entry in Linux)
that, upon the next reboot, the firmware looks for and acts upon by
sending sequences of commands to the TPM.

A dedicated memory region is added to the TPM CRB & TIS devices, at
address/size 0xFED45000/0x400. A new "etc/tpm/config" fw_cfg entry
holds the location for that PPI region and some version details, to
allow for future flexibility.

With the associated edk2/ovmf firmware, the Windows HLK "PPI 1.3" test
now runs successfully.

It is based on previous work from Stefan Berger ("[PATCH v2 0/4]
Implement Physical Presence interface for TPM 1.2 and 2")

The edk2 support is merged upstream.

v9:
- add 3.1 pc machines patch
- call tpm_ppi_reset() from TIS/CRB device reset()
- mintor doc/commit improvements
- add acks/review-by

Marc-André Lureau (3):
  hw/i386: add pc-i440fx-3.1 & pc-q35-3.1
  tpm: add a "ppi" boolean property
  tpm: add ACPI memory clear interface

Stefan Berger (3):
  tpm: allocate/map buffer for TPM Physical Presence interface
  acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg
  acpi: build TPM Physical Presence interface

 hw/tpm/tpm_ppi.h      |  28 +++
 include/hw/acpi/tpm.h |  17 ++
 include/hw/compat.h   |  14 +-
 include/hw/i386/pc.h  |   5 +-
 hw/i386/acpi-build.c  | 456 +++++++++++++++++++++++++++++++++++++++++-
 hw/i386/pc_piix.c     |  13 +-
 hw/i386/pc_q35.c      |  12 +-
 hw/tpm/tpm_crb.c      |  12 ++
 hw/tpm/tpm_ppi.c      |  54 +++++
 hw/tpm/tpm_tis.c      |  12 ++
 docs/specs/tpm.txt    | 101 ++++++++++
 hw/tpm/Makefile.objs  |   1 +
 hw/tpm/trace-events   |   3 +
 13 files changed, 722 insertions(+), 6 deletions(-)
 create mode 100644 hw/tpm/tpm_ppi.h
 create mode 100644 hw/tpm/tpm_ppi.c

-- 
2.18.0.547.g1d89318c48


Re: [Qemu-devel] [PATCH v9 0/6] Add support for TPM Physical Presence interface
Posted by no-reply@patchew.org 7 years, 2 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180810153223.28409-1-marcandre.lureau@redhat.com
Subject: [Qemu-devel] [PATCH v9 0/6] Add support for TPM Physical Presence interface

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
fd04150f40 tpm: add ACPI memory clear interface
e0301517ac acpi: build TPM Physical Presence interface
bc2fb50446 acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg
d0e68c0039 tpm: allocate/map buffer for TPM Physical Presence interface
227b4a27be tpm: add a "ppi" boolean property
e87b544450 hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

=== OUTPUT BEGIN ===
Checking PATCH 1/6: hw/i386: add pc-i440fx-3.1 & pc-q35-3.1...
Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2360.
Checking PATCH 2/6: tpm: add a "ppi" boolean property...
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#68: FILE: include/hw/compat.h:4:
+#define HW_COMPAT_3_0 \
+    {\
+        .driver   = "tpm-crb",\
+        .property = "ppi",\
+        .value    = "false",\
+    },\
+    {\
+        .driver   = "tpm-tis",\
+        .property = "ppi",\
+        .value    = "false",\
+    },

total: 1 errors, 0 warnings, 48 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/6: tpm: allocate/map buffer for TPM Physical Presence interface...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
new file mode 100644

total: 0 errors, 1 warnings, 124 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 4/6: acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg...
Checking PATCH 5/6: acpi: build TPM Physical Presence interface...
Checking PATCH 6/6: tpm: add ACPI memory clear interface...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com