* [PATCH v2 00/11] tpm: Split hw/ vs backends/
@ 2020-06-11 16:02 Philippe Mathieu-Daudé
2020-06-11 16:02 ` [PATCH v2 01/11] docs/specs/tpm: Correct header path name Philippe Mathieu-Daudé
` (12 more replies)
0 siblings, 13 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:02 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
Hi,
Yesterday I started to review some vTPM patches and got very
confused by the files under hw/tpm/. In particular after
running:
$ git grep TYPE_TPM_BACKEND
backends/tpm.c:188: .name = TYPE_TPM_BACKEND,
hw/tpm/tpm_emulator.c:985: .parent = TYPE_TPM_BACKEND,
hw/tpm/tpm_passthrough.c:393: .parent = TYPE_TPM_BACKEND,
include/sysemu/tpm_backend.h:21:#define TYPE_TPM_BACKEND "tpm-backend"
As there is no particular reason to keep this mixed, clean it up.
Since v1:
- Amended docs/ changes
- Renamed Kconfig TPM_BACKEND variable
- Move backend files under backends/tpm/ (Marc-André & Stefan)
- Fix x86-64 build error (patchew)
Philippe Mathieu-Daudé (11):
docs/specs/tpm: Correct header path name
backends: Add TPM files into their own directory
hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig
hw/tpm: Do not include 'qemu/osdep.h' in header
hw/tpm: Include missing 'qemu/option.h' header
hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources
hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion
hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h'
hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header
hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h"
tpm: Move backend code under the 'backends/' directory
docs/specs/tpm.rst | 14 +++++------
Makefile | 2 +-
Makefile.objs | 1 +
{hw => backends}/tpm/tpm_int.h | 19 +++++++++++---
{hw => backends}/tpm/tpm_ioctl.h | 0
hw/tpm/tpm_ppi.h | 1 -
hw/tpm/tpm_prop.h | 31 +++++++++++++++++++++++
hw/tpm/tpm_tis.h | 1 -
{hw/tpm => include/sysemu}/tpm_util.h | 19 +++-----------
backends/{tpm.c => tpm/tpm_backend.c} | 0
{hw => backends}/tpm/tpm_emulator.c | 2 +-
{hw => backends}/tpm/tpm_passthrough.c | 2 +-
{hw => backends}/tpm/tpm_util.c | 2 +-
hw/tpm/tpm_crb.c | 4 +--
hw/tpm/tpm_ppi.c | 1 +
hw/tpm/tpm_spapr.c | 4 +--
hw/tpm/tpm_tis_common.c | 4 +--
hw/tpm/tpm_tis_isa.c | 3 ++-
hw/tpm/tpm_tis_sysbus.c | 3 ++-
tests/qtest/tpm-emu.c | 2 +-
MAINTAINERS | 2 +-
backends/Kconfig | 1 +
backends/Makefile.objs | 2 +-
backends/tpm/Kconfig | 14 +++++++++++
backends/tpm/Makefile.objs | 4 +++
backends/tpm/trace-events | 33 +++++++++++++++++++++++++
hw/tpm/Kconfig | 21 +++-------------
hw/tpm/Makefile.objs | 3 ---
hw/tpm/trace-events | 34 +-------------------------
29 files changed, 132 insertions(+), 97 deletions(-)
rename {hw => backends}/tpm/tpm_int.h (81%)
rename {hw => backends}/tpm/tpm_ioctl.h (100%)
create mode 100644 hw/tpm/tpm_prop.h
rename {hw/tpm => include/sysemu}/tpm_util.h (80%)
rename backends/{tpm.c => tpm/tpm_backend.c} (100%)
rename {hw => backends}/tpm/tpm_emulator.c (99%)
rename {hw => backends}/tpm/tpm_passthrough.c (99%)
rename {hw => backends}/tpm/tpm_util.c (99%)
create mode 100644 backends/Kconfig
create mode 100644 backends/tpm/Kconfig
create mode 100644 backends/tpm/Makefile.objs
create mode 100644 backends/tpm/trace-events
--
2.21.3
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 01/11] docs/specs/tpm: Correct header path name
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
@ 2020-06-11 16:02 ` Philippe Mathieu-Daudé
2020-06-11 16:19 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 02/11] backends: Add TPM files into their own directory Philippe Mathieu-Daudé
` (11 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:02 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
Commit 8dc6701722 introduce the documentation but an
incorrect path name was used. Fix that.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
docs/specs/tpm.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 5e61238bc5..9e48e3b981 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -199,8 +199,8 @@ to be used with the passthrough backend or the swtpm backend.
QEMU files related to TPM backends:
- ``backends/tpm.c``
+ - ``include/sysemu/tpm.h``
- ``include/sysemu/tpm_backend.h``
- - ``include/sysemu/tpm_backend_int.h``
The QEMU TPM passthrough device
-------------------------------
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 02/11] backends: Add TPM files into their own directory
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
2020-06-11 16:02 ` [PATCH v2 01/11] docs/specs/tpm: Correct header path name Philippe Mathieu-Daudé
@ 2020-06-11 16:02 ` Philippe Mathieu-Daudé
2020-06-11 16:20 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig Philippe Mathieu-Daudé
` (10 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:02 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
As we will have various TPM backend files, it is cleaner
to use a single directory.
Suggested-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
backends/{tpm.c => tpm/tpm_backend.c} | 0
MAINTAINERS | 2 +-
backends/Makefile.objs | 2 +-
backends/tpm/Makefile.objs | 1 +
4 files changed, 3 insertions(+), 2 deletions(-)
rename backends/{tpm.c => tpm/tpm_backend.c} (100%)
create mode 100644 backends/tpm/Makefile.objs
diff --git a/backends/tpm.c b/backends/tpm/tpm_backend.c
similarity index 100%
rename from backends/tpm.c
rename to backends/tpm/tpm_backend.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 3abe3faa4e..9deb15b268 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2385,7 +2385,7 @@ F: hw/tpm/*
F: include/hw/acpi/tpm.h
F: include/sysemu/tpm*
F: qapi/tpm.json
-F: backends/tpm.c
+F: backends/tpm/
F: tests/qtest/*tpm*
T: git https://github.com/stefanberger/qemu-tpm.git tpm-next
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
index 28a847cd57..22d204cb48 100644
--- a/backends/Makefile.objs
+++ b/backends/Makefile.objs
@@ -1,7 +1,7 @@
common-obj-y += rng.o rng-egd.o rng-builtin.o
common-obj-$(CONFIG_POSIX) += rng-random.o
-common-obj-$(CONFIG_TPM) += tpm.o
+common-obj-$(CONFIG_TPM) += tpm/
common-obj-y += hostmem.o hostmem-ram.o
common-obj-$(CONFIG_POSIX) += hostmem-file.o
diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs
new file mode 100644
index 0000000000..8cf5772824
--- /dev/null
+++ b/backends/tpm/Makefile.objs
@@ -0,0 +1 @@
+common-obj-y += tpm_backend.o
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
2020-06-11 16:02 ` [PATCH v2 01/11] docs/specs/tpm: Correct header path name Philippe Mathieu-Daudé
2020-06-11 16:02 ` [PATCH v2 02/11] backends: Add TPM files into their own directory Philippe Mathieu-Daudé
@ 2020-06-11 16:02 ` Philippe Mathieu-Daudé
2020-06-11 16:22 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 04/11] hw/tpm: Do not include 'qemu/osdep.h' in header Philippe Mathieu-Daudé
` (9 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:02 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
The TPMDEV describe TPM backends. Use the TPM_BACKEND config
name which is self-explicit.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/Kconfig | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index 4794e7fe28..5028fd8880 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -1,4 +1,4 @@
-config TPMDEV
+config TPM_BACKEND
bool
depends on TPM
@@ -15,26 +15,26 @@ config TPM_TIS_SYSBUS
config TPM_TIS
bool
depends on TPM
- select TPMDEV
+ select TPM_BACKEND
config TPM_CRB
bool
depends on TPM && PC
- select TPMDEV
+ select TPM_BACKEND
config TPM_PASSTHROUGH
bool
default y
# FIXME: should check for x86 host as well
- depends on TPMDEV && LINUX
+ depends on TPM_BACKEND && LINUX
config TPM_EMULATOR
bool
default y
- depends on TPMDEV
+ depends on TPM_BACKEND
config TPM_SPAPR
bool
default y
depends on TPM && PSERIES
- select TPMDEV
+ select TPM_BACKEND
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 04/11] hw/tpm: Do not include 'qemu/osdep.h' in header
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-06-11 16:02 ` [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig Philippe Mathieu-Daudé
@ 2020-06-11 16:02 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 05/11] hw/tpm: Include missing 'qemu/option.h' header Philippe Mathieu-Daudé
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:02 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
From CODING_STYLE.rst:
Do not include "qemu/osdep.h" from header files since the .c
file will have already included it.
Remove "qemu/osdep.h" from "tpm_tis.h".
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_tis.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h
index 5554989395..f6b5872ba6 100644
--- a/hw/tpm/tpm_tis.h
+++ b/hw/tpm/tpm_tis.h
@@ -24,7 +24,6 @@
#ifndef TPM_TPM_TIS_H
#define TPM_TPM_TIS_H
-#include "qemu/osdep.h"
#include "sysemu/tpm_backend.h"
#include "tpm_ppi.h"
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 05/11] hw/tpm: Include missing 'qemu/option.h' header
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2020-06-11 16:02 ` [PATCH v2 04/11] hw/tpm: Do not include 'qemu/osdep.h' in header Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 06/11] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources Philippe Mathieu-Daudé
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
Files using the TPM_STANDARD_CMDLINE_OPTS macro declared in
"tpm_int.h" will use QEMU_OPT_STRING definition declared in
"qemu/option.h".
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_int.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
index 3fb28a9d6c..fd5ebc6489 100644
--- a/hw/tpm/tpm_int.h
+++ b/hw/tpm/tpm_int.h
@@ -12,6 +12,8 @@
#ifndef TPM_TPM_INT_H
#define TPM_TPM_INT_H
+#include "qemu/option.h"
+
#define TPM_STANDARD_CMDLINE_OPTS \
{ \
.name = "type", \
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 06/11] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 05/11] hw/tpm: Include missing 'qemu/option.h' header Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 07/11] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion Philippe Mathieu-Daudé
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
Nothing in "tpm_ppi.h" require declarations from "hw/acpi/tpm.h".
Reduce dependencies and include it only in the files requiring it.
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_ppi.h | 1 -
hw/tpm/tpm_ppi.c | 1 +
hw/tpm/tpm_tis_isa.c | 1 +
hw/tpm/tpm_tis_sysbus.c | 1 +
4 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h
index d33ef27de6..6f773c25a0 100644
--- a/hw/tpm/tpm_ppi.h
+++ b/hw/tpm/tpm_ppi.h
@@ -12,7 +12,6 @@
#ifndef TPM_TPM_PPI_H
#define TPM_TPM_PPI_H
-#include "hw/acpi/tpm.h"
#include "exec/address-spaces.h"
typedef struct TPMPPI {
diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c
index 6d9c1a3e40..72d7a3d926 100644
--- a/hw/tpm/tpm_ppi.c
+++ b/hw/tpm/tpm_ppi.c
@@ -17,6 +17,7 @@
#include "cpu.h"
#include "sysemu/memory_mapping.h"
#include "migration/vmstate.h"
+#include "hw/acpi/tpm.h"
#include "tpm_ppi.h"
#include "trace.h"
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
index 30ba37079d..42f909ff1e 100644
--- a/hw/tpm/tpm_tis_isa.c
+++ b/hw/tpm/tpm_tis_isa.c
@@ -26,6 +26,7 @@
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
+#include "hw/acpi/tpm.h"
#include "tpm_util.h"
#include "tpm_tis.h"
diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
index eced1fc843..edca1dae0d 100644
--- a/hw/tpm/tpm_tis_sysbus.c
+++ b/hw/tpm/tpm_tis_sysbus.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
+#include "hw/acpi/tpm.h"
#include "tpm_util.h"
#include "hw/sysbus.h"
#include "tpm_tis.h"
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 07/11] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 06/11] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 08/11] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Philippe Mathieu-Daudé
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
Remove unnecessary 'tpm_int.h' header inclusion.
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_crb.c | 1 -
hw/tpm/tpm_spapr.c | 1 -
hw/tpm/tpm_tis_common.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index cd004e7f8e..664ff70ef9 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -25,7 +25,6 @@
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
#include "sysemu/reset.h"
-#include "tpm_int.h"
#include "tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
index ce65eb2e45..ab1a86ad6e 100644
--- a/hw/tpm/tpm_spapr.c
+++ b/hw/tpm/tpm_spapr.c
@@ -20,7 +20,6 @@
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
-#include "tpm_int.h"
#include "tpm_util.h"
#include "hw/ppc/spapr.h"
diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
index 1af4bce139..94704870f6 100644
--- a/hw/tpm/tpm_tis_common.c
+++ b/hw/tpm/tpm_tis_common.c
@@ -33,7 +33,6 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
-#include "tpm_int.h"
#include "tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 08/11] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h'
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 07/11] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 09/11] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Philippe Mathieu-Daudé
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
We are going to make "tpm_util.h" publicly accessible by
moving it to the include/ directory in a pair of commits.
Keep declarations internals to hw/tpm/ in "tpm_int.h".
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_int.h | 11 +++++++++++
hw/tpm/tpm_util.h | 10 ----------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
index fd5ebc6489..9f72879d89 100644
--- a/hw/tpm/tpm_int.h
+++ b/hw/tpm/tpm_int.h
@@ -13,6 +13,7 @@
#define TPM_TPM_INT_H
#include "qemu/option.h"
+#include "sysemu/tpm.h"
#define TPM_STANDARD_CMDLINE_OPTS \
{ \
@@ -74,4 +75,14 @@ struct tpm_resp_hdr {
#define TPM_RC_FAILURE 0x101
#define TPM_RC_LOCALITY 0x907
+int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version,
+ size_t *buffersize);
+
+typedef struct TPMSizedBuffer {
+ uint32_t size;
+ uint8_t *buffer;
+} TPMSizedBuffer;
+
+void tpm_sized_buffer_reset(TPMSizedBuffer *tsb);
+
#endif /* TPM_TPM_INT_H */
diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
index 7889081fba..d524935576 100644
--- a/hw/tpm/tpm_util.h
+++ b/hw/tpm/tpm_util.h
@@ -66,19 +66,9 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error)
stl_be_p(b + 6, error);
}
-int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version,
- size_t *buffersize);
-
#define DEFINE_PROP_TPMBE(_n, _s, _f) \
DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *)
-typedef struct TPMSizedBuffer {
- uint32_t size;
- uint8_t *buffer;
-} TPMSizedBuffer;
-
-void tpm_sized_buffer_reset(TPMSizedBuffer *tsb);
-
void tpm_util_show_buffer(const unsigned char *buffer,
size_t buffer_size, const char *string);
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 09/11] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 08/11] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 10/11] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h" Philippe Mathieu-Daudé
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
We are going to make "tpm_util.h" publicly accessible by
moving it to the include/ directory in the next commit.
The DEFINE_PROP_TPMBE() macro is only meaningful for the
TPM hardware files (in hw/tpm/), so keep this macro in a
local header.
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/tpm/tpm_prop.h | 31 +++++++++++++++++++++++++++++++
hw/tpm/tpm_util.h | 3 ---
hw/tpm/tpm_crb.c | 1 +
hw/tpm/tpm_spapr.c | 1 +
hw/tpm/tpm_tis_isa.c | 2 +-
hw/tpm/tpm_tis_sysbus.c | 2 +-
6 files changed, 35 insertions(+), 5 deletions(-)
create mode 100644 hw/tpm/tpm_prop.h
diff --git a/hw/tpm/tpm_prop.h b/hw/tpm/tpm_prop.h
new file mode 100644
index 0000000000..85e1ae5718
--- /dev/null
+++ b/hw/tpm/tpm_prop.h
@@ -0,0 +1,31 @@
+/*
+ * TPM utility functions
+ *
+ * Copyright (c) 2010 - 2015 IBM Corporation
+ * Authors:
+ * Stefan Berger <stefanb@us.ibm.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>
+ */
+
+#ifndef HW_TPM_PROP_H
+#define HW_TPM_PROP_H
+
+#include "sysemu/tpm_backend.h"
+#include "hw/qdev-properties.h"
+
+#define DEFINE_PROP_TPMBE(_n, _s, _f) \
+ DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *)
+
+#endif /* HW_TPM_PROP_H */
diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
index d524935576..cf61d830d7 100644
--- a/hw/tpm/tpm_util.h
+++ b/hw/tpm/tpm_util.h
@@ -66,9 +66,6 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error)
stl_be_p(b + 6, error);
}
-#define DEFINE_PROP_TPMBE(_n, _s, _f) \
- DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *)
-
void tpm_util_show_buffer(const unsigned char *buffer,
size_t buffer_size, const char *string);
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 664ff70ef9..1cac4d671d 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -25,6 +25,7 @@
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
#include "sysemu/reset.h"
+#include "tpm_prop.h"
#include "tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
index ab1a86ad6e..65672048c7 100644
--- a/hw/tpm/tpm_spapr.c
+++ b/hw/tpm/tpm_spapr.c
@@ -21,6 +21,7 @@
#include "sysemu/tpm_backend.h"
#include "tpm_util.h"
+#include "tpm_prop.h"
#include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_vio.h"
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
index 42f909ff1e..5faf6231c0 100644
--- a/hw/tpm/tpm_tis_isa.c
+++ b/hw/tpm/tpm_tis_isa.c
@@ -27,7 +27,7 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "hw/acpi/tpm.h"
-#include "tpm_util.h"
+#include "tpm_prop.h"
#include "tpm_tis.h"
typedef struct TPMStateISA {
diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
index edca1dae0d..4a3bc70625 100644
--- a/hw/tpm/tpm_tis_sysbus.c
+++ b/hw/tpm/tpm_tis_sysbus.c
@@ -26,7 +26,7 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "hw/acpi/tpm.h"
-#include "tpm_util.h"
+#include "tpm_prop.h"
#include "hw/sysbus.h"
#include "tpm_tis.h"
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 10/11] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h"
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (8 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 09/11] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:03 ` [RFC PATCH v2 11/11] tpm: Move backend code under the 'backends/' directory Philippe Mathieu-Daudé
` (2 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
We are going to split the TPM backends from the TPM emulated
hardware in the next commit. Make the TPM util helpers accessible
by moving local "tpm_util.h" to global "sysemu/tpm_util.h".
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
docs/specs/tpm.rst | 4 ++--
{hw/tpm => include/sysemu}/tpm_util.h | 6 +++---
hw/tpm/tpm_crb.c | 2 +-
hw/tpm/tpm_emulator.c | 2 +-
hw/tpm/tpm_passthrough.c | 2 +-
hw/tpm/tpm_spapr.c | 2 +-
hw/tpm/tpm_tis_common.c | 2 +-
hw/tpm/tpm_util.c | 2 +-
8 files changed, 11 insertions(+), 11 deletions(-)
rename {hw/tpm => include/sysemu}/tpm_util.h (95%)
diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 9e48e3b981..0200fdac68 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -234,7 +234,7 @@ PCRs.
QEMU files related to the TPM passthrough device:
- ``hw/tpm/tpm_passthrough.c``
- ``hw/tpm/tpm_util.c``
- - ``hw/tpm/tpm_util.h``
+ - ``include/sysemu/tpm_util.h``
Command line to start QEMU with the TPM passthrough device using the host's
@@ -294,7 +294,7 @@ command.
QEMU files related to the TPM emulator device:
- ``hw/tpm/tpm_emulator.c``
- ``hw/tpm/tpm_util.c``
- - ``hw/tpm/tpm_util.h``
+ - ``include/sysemu/tpm_util.h``
The following commands start the swtpm with a UnixIO control channel over
a socket interface. They do not need to be run as root.
diff --git a/hw/tpm/tpm_util.h b/include/sysemu/tpm_util.h
similarity index 95%
rename from hw/tpm/tpm_util.h
rename to include/sysemu/tpm_util.h
index cf61d830d7..63e872c3b2 100644
--- a/hw/tpm/tpm_util.h
+++ b/include/sysemu/tpm_util.h
@@ -19,8 +19,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
-#ifndef TPM_TPM_UTIL_H
-#define TPM_TPM_UTIL_H
+#ifndef SYSEMU_TPM_UTIL_H
+#define SYSEMU_TPM_UTIL_H
#include "sysemu/tpm.h"
#include "qemu/bswap.h"
@@ -69,4 +69,4 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error)
void tpm_util_show_buffer(const unsigned char *buffer,
size_t buffer_size, const char *string);
-#endif /* TPM_TPM_UTIL_H */
+#endif /* SYSEMU_TPM_UTIL_H */
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 1cac4d671d..60247295d4 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -24,9 +24,9 @@
#include "hw/acpi/tpm.h"
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
+#include "sysemu/tpm_util.h"
#include "sysemu/reset.h"
#include "tpm_prop.h"
-#include "tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
index 3a0fc442f3..9605339f93 100644
--- a/hw/tpm/tpm_emulator.c
+++ b/hw/tpm/tpm_emulator.c
@@ -32,8 +32,8 @@
#include "qemu/sockets.h"
#include "io/channel-socket.h"
#include "sysemu/tpm_backend.h"
+#include "sysemu/tpm_util.h"
#include "tpm_int.h"
-#include "tpm_util.h"
#include "tpm_ioctl.h"
#include "migration/blocker.h"
#include "migration/vmstate.h"
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index f67244b5d4..7403807ec4 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -28,10 +28,10 @@
#include "qemu/module.h"
#include "qemu/sockets.h"
#include "sysemu/tpm_backend.h"
+#include "sysemu/tpm_util.h"
#include "tpm_int.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-tpm.h"
-#include "tpm_util.h"
#include "trace.h"
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
index 65672048c7..cb4dfd1e6a 100644
--- a/hw/tpm/tpm_spapr.c
+++ b/hw/tpm/tpm_spapr.c
@@ -20,7 +20,7 @@
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
-#include "tpm_util.h"
+#include "sysemu/tpm_util.h"
#include "tpm_prop.h"
#include "hw/ppc/spapr.h"
diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
index 94704870f6..64206a6a3b 100644
--- a/hw/tpm/tpm_tis_common.c
+++ b/hw/tpm/tpm_tis_common.c
@@ -33,7 +33,7 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/tpm_backend.h"
-#include "tpm_util.h"
+#include "sysemu/tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
index c0a0f3d71f..d0ec2a8235 100644
--- a/hw/tpm/tpm_util.c
+++ b/hw/tpm/tpm_util.c
@@ -23,11 +23,11 @@
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
-#include "tpm_util.h"
#include "tpm_int.h"
#include "exec/memory.h"
#include "hw/qdev-properties.h"
#include "sysemu/tpm_backend.h"
+#include "sysemu/tpm_util.h"
#include "trace.h"
/* tpm backend property */
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC PATCH v2 11/11] tpm: Move backend code under the 'backends/' directory
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (9 preceding siblings ...)
2020-06-11 16:03 ` [PATCH v2 10/11] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h" Philippe Mathieu-Daudé
@ 2020-06-11 16:03 ` Philippe Mathieu-Daudé
2020-06-11 16:21 ` [PATCH v2 00/11] tpm: Split hw/ vs backends/ Stefan Berger
2020-06-23 9:39 ` Paolo Bonzini
12 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11 16:03 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Marc-André Lureau,
Paolo Bonzini, David Gibson, Philippe Mathieu-Daudé,
Stefan Berger
TPM subsytem is split into backends (see commit f4ede81eed2)
and frontends (see i.e. 3676bc69b35). Keep the emulated
hardware 'frontends' under hw/tpm/, but move the backends
in the backends/tpm/ directory.
Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
RFC due to a FIXME in tpm_tis_common.c, it uses
TRACE_TPM_UTIL_SHOW_BUFFER which is now generated
by backends/tpm/trace-events...
docs/specs/tpm.rst | 8 +++---
Makefile | 2 +-
Makefile.objs | 1 +
{hw => backends}/tpm/tpm_int.h | 6 ++---
{hw => backends}/tpm/tpm_ioctl.h | 0
{hw => backends}/tpm/tpm_emulator.c | 0
{hw => backends}/tpm/tpm_passthrough.c | 0
{hw => backends}/tpm/tpm_util.c | 0
hw/tpm/tpm_tis_common.c | 1 +
tests/qtest/tpm-emu.c | 2 +-
backends/Kconfig | 1 +
backends/tpm/Kconfig | 14 +++++++++++
backends/tpm/Makefile.objs | 3 +++
backends/tpm/trace-events | 33 +++++++++++++++++++++++++
hw/tpm/Kconfig | 15 ------------
hw/tpm/Makefile.objs | 3 ---
hw/tpm/trace-events | 34 +-------------------------
17 files changed, 63 insertions(+), 60 deletions(-)
rename {hw => backends}/tpm/tpm_int.h (96%)
rename {hw => backends}/tpm/tpm_ioctl.h (100%)
rename {hw => backends}/tpm/tpm_emulator.c (100%)
rename {hw => backends}/tpm/tpm_passthrough.c (100%)
rename {hw => backends}/tpm/tpm_util.c (100%)
create mode 100644 backends/Kconfig
create mode 100644 backends/tpm/Kconfig
create mode 100644 backends/tpm/trace-events
diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 0200fdac68..ed6c0d785d 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -232,8 +232,8 @@ Integrity Measurement Architecture (IMA), are not expecting to share
PCRs.
QEMU files related to the TPM passthrough device:
- - ``hw/tpm/tpm_passthrough.c``
- - ``hw/tpm/tpm_util.c``
+ - ``backends/tpm/tpm_passthrough.c``
+ - ``backends/tpm/tpm_util.c``
- ``include/sysemu/tpm_util.h``
@@ -292,8 +292,8 @@ instrumented to initialize a TPM 1.2 or TPM 2 device using this
command.
QEMU files related to the TPM emulator device:
- - ``hw/tpm/tpm_emulator.c``
- - ``hw/tpm/tpm_util.c``
+ - ``backends/tpm/tpm_emulator.c``
+ - ``backends/tpm/tpm_util.c``
- ``include/sysemu/tpm_util.h``
The following commands start the swtpm with a UnixIO control channel over
diff --git a/Makefile b/Makefile
index d1af126ea1..0ab6e12dd6 100644
--- a/Makefile
+++ b/Makefile
@@ -418,7 +418,7 @@ MINIKCONF_ARGS = \
CONFIG_LINUX=$(CONFIG_LINUX) \
CONFIG_PVRDMA=$(CONFIG_PVRDMA)
-MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
+MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/backends/Kconfig $(SRC_PATH)/hw/Kconfig
MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
diff --git a/Makefile.objs b/Makefile.objs
index 99774cfd25..84fc651f53 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -125,6 +125,7 @@ trace-events-subdirs =
trace-events-subdirs += accel/kvm
trace-events-subdirs += accel/tcg
trace-events-subdirs += backends
+trace-events-subdirs += backends/tpm
trace-events-subdirs += crypto
trace-events-subdirs += monitor
ifeq ($(CONFIG_USER_ONLY),y)
diff --git a/hw/tpm/tpm_int.h b/backends/tpm/tpm_int.h
similarity index 96%
rename from hw/tpm/tpm_int.h
rename to backends/tpm/tpm_int.h
index 9f72879d89..ba6109306e 100644
--- a/hw/tpm/tpm_int.h
+++ b/backends/tpm/tpm_int.h
@@ -9,8 +9,8 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#ifndef TPM_TPM_INT_H
-#define TPM_TPM_INT_H
+#ifndef BACKENDS_TPM_INT_H
+#define BACKENDS_TPM_INT_H
#include "qemu/option.h"
#include "sysemu/tpm.h"
@@ -85,4 +85,4 @@ typedef struct TPMSizedBuffer {
void tpm_sized_buffer_reset(TPMSizedBuffer *tsb);
-#endif /* TPM_TPM_INT_H */
+#endif /* BACKENDS_TPM_INT_H */
diff --git a/hw/tpm/tpm_ioctl.h b/backends/tpm/tpm_ioctl.h
similarity index 100%
rename from hw/tpm/tpm_ioctl.h
rename to backends/tpm/tpm_ioctl.h
diff --git a/hw/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
similarity index 100%
rename from hw/tpm/tpm_emulator.c
rename to backends/tpm/tpm_emulator.c
diff --git a/hw/tpm/tpm_passthrough.c b/backends/tpm/tpm_passthrough.c
similarity index 100%
rename from hw/tpm/tpm_passthrough.c
rename to backends/tpm/tpm_passthrough.c
diff --git a/hw/tpm/tpm_util.c b/backends/tpm/tpm_util.c
similarity index 100%
rename from hw/tpm/tpm_util.c
rename to backends/tpm/tpm_util.c
diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
index 64206a6a3b..4093b5f246 100644
--- a/hw/tpm/tpm_tis_common.c
+++ b/hw/tpm/tpm_tis_common.c
@@ -36,6 +36,7 @@
#include "sysemu/tpm_util.h"
#include "tpm_ppi.h"
#include "trace.h"
+#include "../backends/tpm/trace.h" /* FIXME TRACE_TPM_UTIL_SHOW_BUFFER */
#include "tpm_tis.h"
diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c
index c43ac4aef8..337647846f 100644
--- a/tests/qtest/tpm-emu.c
+++ b/tests/qtest/tpm-emu.c
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
-#include "hw/tpm/tpm_ioctl.h"
+#include "backends/tpm/tpm_ioctl.h"
#include "io/channel-socket.h"
#include "qapi/error.h"
#include "tpm-emu.h"
diff --git a/backends/Kconfig b/backends/Kconfig
new file mode 100644
index 0000000000..f35abc1609
--- /dev/null
+++ b/backends/Kconfig
@@ -0,0 +1 @@
+source tpm/Kconfig
diff --git a/backends/tpm/Kconfig b/backends/tpm/Kconfig
new file mode 100644
index 0000000000..5d91eb89c2
--- /dev/null
+++ b/backends/tpm/Kconfig
@@ -0,0 +1,14 @@
+config TPM_BACKEND
+ bool
+ depends on TPM
+
+config TPM_PASSTHROUGH
+ bool
+ default y
+ # FIXME: should check for x86 host as well
+ depends on TPM_BACKEND && LINUX
+
+config TPM_EMULATOR
+ bool
+ default y
+ depends on TPM_BACKEND
diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs
index 8cf5772824..db2731f634 100644
--- a/backends/tpm/Makefile.objs
+++ b/backends/tpm/Makefile.objs
@@ -1 +1,4 @@
common-obj-y += tpm_backend.o
+common-obj-y += tpm_util.o
+common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
+common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
diff --git a/backends/tpm/trace-events b/backends/tpm/trace-events
new file mode 100644
index 0000000000..0a2591fb2d
--- /dev/null
+++ b/backends/tpm/trace-events
@@ -0,0 +1,33 @@
+# See docs/devel/tracing.txt for syntax documentation.
+
+# tpm_passthrough.c
+tpm_passthrough_handle_request(void *cmd) "processing command %p"
+tpm_passthrough_reset(void) "reset"
+
+# tpm_util.c
+tpm_util_get_buffer_size_hdr_len(uint32_t len, size_t expected) "tpm_resp->hdr.len = %u, expected = %zu"
+tpm_util_get_buffer_size_len(uint32_t len, size_t expected) "tpm_resp->len = %u, expected = %zu"
+tpm_util_get_buffer_size_hdr_len2(uint32_t len, size_t expected) "tpm2_resp->hdr.len = %u, expected = %zu"
+tpm_util_get_buffer_size_len2(uint32_t len, size_t expected) "tpm2_resp->len = %u, expected = %zu"
+tpm_util_get_buffer_size(size_t len) "buffersize of device: %zu"
+tpm_util_show_buffer(const char *direction, size_t len, const char *buf) "direction: %s len: %zu\n%s"
+
+# tpm_emulator.c
+tpm_emulator_set_locality(uint8_t locty) "setting locality to %d"
+tpm_emulator_handle_request(void) "processing TPM command"
+tpm_emulator_probe_caps(uint64_t caps) "capabilities: 0x%"PRIx64
+tpm_emulator_set_buffer_size(uint32_t buffersize, uint32_t minsize, uint32_t maxsize) "buffer size: %u, min: %u, max: %u"
+tpm_emulator_startup_tpm_resume(bool is_resume, size_t buffersize) "is_resume: %d, buffer size: %zu"
+tpm_emulator_get_tpm_established_flag(uint8_t flag) "got established flag: %d"
+tpm_emulator_cancel_cmd_not_supt(void) "Backend does not support CANCEL_TPM_CMD"
+tpm_emulator_handle_device_opts_tpm12(void) "TPM Version 1.2"
+tpm_emulator_handle_device_opts_tpm2(void) "TPM Version 2"
+tpm_emulator_handle_device_opts_unspec(void) "TPM Version Unspecified"
+tpm_emulator_handle_device_opts_startup_error(void) "Startup error"
+tpm_emulator_get_state_blob(uint8_t type, uint32_t size, uint32_t flags) "got state blob type %d, %u bytes, flags 0x%08x"
+tpm_emulator_set_state_blob(uint8_t type, uint32_t size, uint32_t flags) "set state blob type %d, %u bytes, flags 0x%08x"
+tpm_emulator_set_state_blobs(void) "setting state blobs"
+tpm_emulator_set_state_blobs_error(const char *msg) "error while setting state blobs: %s"
+tpm_emulator_set_state_blobs_done(void) "Done setting state blobs"
+tpm_emulator_pre_save(void) ""
+tpm_emulator_inst_init(void) ""
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index 5028fd8880..29e82f3c92 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -1,7 +1,3 @@
-config TPM_BACKEND
- bool
- depends on TPM
-
config TPM_TIS_ISA
bool
depends on TPM && ISA_BUS
@@ -22,17 +18,6 @@ config TPM_CRB
depends on TPM && PC
select TPM_BACKEND
-config TPM_PASSTHROUGH
- bool
- default y
- # FIXME: should check for x86 host as well
- depends on TPM_BACKEND && LINUX
-
-config TPM_EMULATOR
- bool
- default y
- depends on TPM_BACKEND
-
config TPM_SPAPR
bool
default y
diff --git a/hw/tpm/Makefile.objs b/hw/tpm/Makefile.objs
index f1ec4beb95..6fc05be67c 100644
--- a/hw/tpm/Makefile.objs
+++ b/hw/tpm/Makefile.objs
@@ -1,9 +1,6 @@
-common-obj-$(CONFIG_TPM) += tpm_util.o
obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
common-obj-$(CONFIG_TPM_TIS_ISA) += tpm_tis_isa.o
common-obj-$(CONFIG_TPM_TIS_SYSBUS) += tpm_tis_sysbus.o
common-obj-$(CONFIG_TPM_TIS) += tpm_tis_common.o
common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
-common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
-common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
obj-$(CONFIG_TPM_SPAPR) += tpm_spapr.o
diff --git a/hw/tpm/trace-events b/hw/tpm/trace-events
index 439e514787..de9bf1e01b 100644
--- a/hw/tpm/trace-events
+++ b/hw/tpm/trace-events
@@ -4,38 +4,6 @@
tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x%016" PRIx64 " len:%u val: 0x%" PRIx32
tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x%016" PRIx64 " len:%u val: 0x%" PRIx32
-# tpm_passthrough.c
-tpm_passthrough_handle_request(void *cmd) "processing command %p"
-tpm_passthrough_reset(void) "reset"
-
-# tpm_util.c
-tpm_util_get_buffer_size_hdr_len(uint32_t len, size_t expected) "tpm_resp->hdr.len = %u, expected = %zu"
-tpm_util_get_buffer_size_len(uint32_t len, size_t expected) "tpm_resp->len = %u, expected = %zu"
-tpm_util_get_buffer_size_hdr_len2(uint32_t len, size_t expected) "tpm2_resp->hdr.len = %u, expected = %zu"
-tpm_util_get_buffer_size_len2(uint32_t len, size_t expected) "tpm2_resp->len = %u, expected = %zu"
-tpm_util_get_buffer_size(size_t len) "buffersize of device: %zu"
-tpm_util_show_buffer(const char *direction, size_t len, const char *buf) "direction: %s len: %zu\n%s"
-
-# tpm_emulator.c
-tpm_emulator_set_locality(uint8_t locty) "setting locality to %d"
-tpm_emulator_handle_request(void) "processing TPM command"
-tpm_emulator_probe_caps(uint64_t caps) "capabilities: 0x%"PRIx64
-tpm_emulator_set_buffer_size(uint32_t buffersize, uint32_t minsize, uint32_t maxsize) "buffer size: %u, min: %u, max: %u"
-tpm_emulator_startup_tpm_resume(bool is_resume, size_t buffersize) "is_resume: %d, buffer size: %zu"
-tpm_emulator_get_tpm_established_flag(uint8_t flag) "got established flag: %d"
-tpm_emulator_cancel_cmd_not_supt(void) "Backend does not support CANCEL_TPM_CMD"
-tpm_emulator_handle_device_opts_tpm12(void) "TPM Version 1.2"
-tpm_emulator_handle_device_opts_tpm2(void) "TPM Version 2"
-tpm_emulator_handle_device_opts_unspec(void) "TPM Version Unspecified"
-tpm_emulator_handle_device_opts_startup_error(void) "Startup error"
-tpm_emulator_get_state_blob(uint8_t type, uint32_t size, uint32_t flags) "got state blob type %d, %u bytes, flags 0x%08x"
-tpm_emulator_set_state_blob(uint8_t type, uint32_t size, uint32_t flags) "set state blob type %d, %u bytes, flags 0x%08x"
-tpm_emulator_set_state_blobs(void) "setting state blobs"
-tpm_emulator_set_state_blobs_error(const char *msg) "error while setting state blobs: %s"
-tpm_emulator_set_state_blobs_done(void) "Done setting state blobs"
-tpm_emulator_pre_save(void) ""
-tpm_emulator_inst_init(void) ""
-
# tpm_tis.c
tpm_tis_raise_irq(uint32_t irqmask) "Raising IRQ for flag 0x%08x"
tpm_tis_new_active_locality(uint8_t locty) "Active locality is now %d"
@@ -56,7 +24,7 @@ tpm_tis_pre_save(uint8_t locty, uint32_t rw_offset) "locty: %d, rw_offset = %u"
# tpm_ppi.c
tpm_ppi_memset(uint8_t *ptr, size_t size) "memset: %p %zu"
-# hw/tpm/tpm_spapr.c
+# tpm_spapr.c
tpm_spapr_show_buffer(const char *direction, size_t len, const char *buf) "direction: %s len: %zu\n%s"
tpm_spapr_do_crq(uint8_t raw1, uint8_t raw2) "1st 2 bytes in CRQ: 0x%02x 0x%02x"
tpm_spapr_do_crq_crq_result(void) "SPAPR_VTPM_INIT_CRQ_RESULT"
--
2.21.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 01/11] docs/specs/tpm: Correct header path name
2020-06-11 16:02 ` [PATCH v2 01/11] docs/specs/tpm: Correct header path name Philippe Mathieu-Daudé
@ 2020-06-11 16:19 ` Stefan Berger
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Berger @ 2020-06-11 16:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth,
Marc-André Lureau, David Gibson
On 6/11/20 12:02 PM, Philippe Mathieu-Daudé wrote:
> Commit 8dc6701722 introduce the documentation but an
> incorrect path name was used. Fix that.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> docs/specs/tpm.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
> index 5e61238bc5..9e48e3b981 100644
> --- a/docs/specs/tpm.rst
> +++ b/docs/specs/tpm.rst
> @@ -199,8 +199,8 @@ to be used with the passthrough backend or the swtpm backend.
>
> QEMU files related to TPM backends:
> - ``backends/tpm.c``
> + - ``include/sysemu/tpm.h``
> - ``include/sysemu/tpm_backend.h``
> - - ``include/sysemu/tpm_backend_int.h``
>
> The QEMU TPM passthrough device
> -------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 02/11] backends: Add TPM files into their own directory
2020-06-11 16:02 ` [PATCH v2 02/11] backends: Add TPM files into their own directory Philippe Mathieu-Daudé
@ 2020-06-11 16:20 ` Stefan Berger
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Berger @ 2020-06-11 16:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth,
Marc-André Lureau, David Gibson
On 6/11/20 12:02 PM, Philippe Mathieu-Daudé wrote:
> As we will have various TPM backend files, it is cleaner
> to use a single directory.
>
> Suggested-by: Stefan Berger <stefanb@linux.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> backends/{tpm.c => tpm/tpm_backend.c} | 0
> MAINTAINERS | 2 +-
> backends/Makefile.objs | 2 +-
> backends/tpm/Makefile.objs | 1 +
> 4 files changed, 3 insertions(+), 2 deletions(-)
> rename backends/{tpm.c => tpm/tpm_backend.c} (100%)
> create mode 100644 backends/tpm/Makefile.objs
>
> diff --git a/backends/tpm.c b/backends/tpm/tpm_backend.c
> similarity index 100%
> rename from backends/tpm.c
> rename to backends/tpm/tpm_backend.c
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3abe3faa4e..9deb15b268 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2385,7 +2385,7 @@ F: hw/tpm/*
> F: include/hw/acpi/tpm.h
> F: include/sysemu/tpm*
> F: qapi/tpm.json
> -F: backends/tpm.c
> +F: backends/tpm/
> F: tests/qtest/*tpm*
> T: git https://github.com/stefanberger/qemu-tpm.git tpm-next
>
> diff --git a/backends/Makefile.objs b/backends/Makefile.objs
> index 28a847cd57..22d204cb48 100644
> --- a/backends/Makefile.objs
> +++ b/backends/Makefile.objs
> @@ -1,7 +1,7 @@
> common-obj-y += rng.o rng-egd.o rng-builtin.o
> common-obj-$(CONFIG_POSIX) += rng-random.o
>
> -common-obj-$(CONFIG_TPM) += tpm.o
> +common-obj-$(CONFIG_TPM) += tpm/
>
> common-obj-y += hostmem.o hostmem-ram.o
> common-obj-$(CONFIG_POSIX) += hostmem-file.o
> diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs
> new file mode 100644
> index 0000000000..8cf5772824
> --- /dev/null
> +++ b/backends/tpm/Makefile.objs
> @@ -0,0 +1 @@
> +common-obj-y += tpm_backend.o
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 00/11] tpm: Split hw/ vs backends/
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (10 preceding siblings ...)
2020-06-11 16:03 ` [RFC PATCH v2 11/11] tpm: Move backend code under the 'backends/' directory Philippe Mathieu-Daudé
@ 2020-06-11 16:21 ` Stefan Berger
2020-06-23 9:39 ` Paolo Bonzini
12 siblings, 0 replies; 17+ messages in thread
From: Stefan Berger @ 2020-06-11 16:21 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth,
Marc-André Lureau, David Gibson
On 6/11/20 12:02 PM, Philippe Mathieu-Daudé wrote:
> Hi,
>
> Yesterday I started to review some vTPM patches and got very
> confused by the files under hw/tpm/. In particular after
> running:
>
> $ git grep TYPE_TPM_BACKEND
> backends/tpm.c:188: .name = TYPE_TPM_BACKEND,
> hw/tpm/tpm_emulator.c:985: .parent = TYPE_TPM_BACKEND,
> hw/tpm/tpm_passthrough.c:393: .parent = TYPE_TPM_BACKEND,
> include/sysemu/tpm_backend.h:21:#define TYPE_TPM_BACKEND "tpm-backend"
>
> As there is no particular reason to keep this mixed, clean it up.
THANK YOU for the cleanup.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig
2020-06-11 16:02 ` [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig Philippe Mathieu-Daudé
@ 2020-06-11 16:22 ` Stefan Berger
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Berger @ 2020-06-11 16:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth,
Marc-André Lureau, David Gibson
On 6/11/20 12:02 PM, Philippe Mathieu-Daudé wrote:
> The TPMDEV describe TPM backends. Use the TPM_BACKEND config
> name which is self-explicit.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> hw/tpm/Kconfig | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
> index 4794e7fe28..5028fd8880 100644
> --- a/hw/tpm/Kconfig
> +++ b/hw/tpm/Kconfig
> @@ -1,4 +1,4 @@
> -config TPMDEV
> +config TPM_BACKEND
> bool
> depends on TPM
>
> @@ -15,26 +15,26 @@ config TPM_TIS_SYSBUS
> config TPM_TIS
> bool
> depends on TPM
> - select TPMDEV
> + select TPM_BACKEND
>
> config TPM_CRB
> bool
> depends on TPM && PC
> - select TPMDEV
> + select TPM_BACKEND
>
> config TPM_PASSTHROUGH
> bool
> default y
> # FIXME: should check for x86 host as well
> - depends on TPMDEV && LINUX
> + depends on TPM_BACKEND && LINUX
>
> config TPM_EMULATOR
> bool
> default y
> - depends on TPMDEV
> + depends on TPM_BACKEND
>
> config TPM_SPAPR
> bool
> default y
> depends on TPM && PSERIES
> - select TPMDEV
> + select TPM_BACKEND
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 00/11] tpm: Split hw/ vs backends/
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
` (11 preceding siblings ...)
2020-06-11 16:21 ` [PATCH v2 00/11] tpm: Split hw/ vs backends/ Stefan Berger
@ 2020-06-23 9:39 ` Paolo Bonzini
12 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2020-06-23 9:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Marc-André Lureau, Thomas Huth,
Stefan Berger, David Gibson
On 11/06/20 18:02, Philippe Mathieu-Daudé wrote:
> Hi,
>
> Yesterday I started to review some vTPM patches and got very
> confused by the files under hw/tpm/. In particular after
> running:
>
> $ git grep TYPE_TPM_BACKEND
> backends/tpm.c:188: .name = TYPE_TPM_BACKEND,
> hw/tpm/tpm_emulator.c:985: .parent = TYPE_TPM_BACKEND,
> hw/tpm/tpm_passthrough.c:393: .parent = TYPE_TPM_BACKEND,
> include/sysemu/tpm_backend.h:21:#define TYPE_TPM_BACKEND "tpm-backend"
>
> As there is no particular reason to keep this mixed, clean it up.
>
> Since v1:
> - Amended docs/ changes
> - Renamed Kconfig TPM_BACKEND variable
> - Move backend files under backends/tpm/ (Marc-André & Stefan)
> - Fix x86-64 build error (patchew)
>
> Philippe Mathieu-Daudé (11):
> docs/specs/tpm: Correct header path name
> backends: Add TPM files into their own directory
> hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig
> hw/tpm: Do not include 'qemu/osdep.h' in header
> hw/tpm: Include missing 'qemu/option.h' header
> hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources
> hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion
> hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h'
> hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header
> hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h"
> tpm: Move backend code under the 'backends/' directory
>
> docs/specs/tpm.rst | 14 +++++------
> Makefile | 2 +-
> Makefile.objs | 1 +
> {hw => backends}/tpm/tpm_int.h | 19 +++++++++++---
> {hw => backends}/tpm/tpm_ioctl.h | 0
> hw/tpm/tpm_ppi.h | 1 -
> hw/tpm/tpm_prop.h | 31 +++++++++++++++++++++++
> hw/tpm/tpm_tis.h | 1 -
> {hw/tpm => include/sysemu}/tpm_util.h | 19 +++-----------
> backends/{tpm.c => tpm/tpm_backend.c} | 0
> {hw => backends}/tpm/tpm_emulator.c | 2 +-
> {hw => backends}/tpm/tpm_passthrough.c | 2 +-
> {hw => backends}/tpm/tpm_util.c | 2 +-
> hw/tpm/tpm_crb.c | 4 +--
> hw/tpm/tpm_ppi.c | 1 +
> hw/tpm/tpm_spapr.c | 4 +--
> hw/tpm/tpm_tis_common.c | 4 +--
> hw/tpm/tpm_tis_isa.c | 3 ++-
> hw/tpm/tpm_tis_sysbus.c | 3 ++-
> tests/qtest/tpm-emu.c | 2 +-
> MAINTAINERS | 2 +-
> backends/Kconfig | 1 +
> backends/Makefile.objs | 2 +-
> backends/tpm/Kconfig | 14 +++++++++++
> backends/tpm/Makefile.objs | 4 +++
> backends/tpm/trace-events | 33 +++++++++++++++++++++++++
> hw/tpm/Kconfig | 21 +++-------------
> hw/tpm/Makefile.objs | 3 ---
> hw/tpm/trace-events | 34 +-------------------------
> 29 files changed, 132 insertions(+), 97 deletions(-)
> rename {hw => backends}/tpm/tpm_int.h (81%)
> rename {hw => backends}/tpm/tpm_ioctl.h (100%)
> create mode 100644 hw/tpm/tpm_prop.h
> rename {hw/tpm => include/sysemu}/tpm_util.h (80%)
> rename backends/{tpm.c => tpm/tpm_backend.c} (100%)
> rename {hw => backends}/tpm/tpm_emulator.c (99%)
> rename {hw => backends}/tpm/tpm_passthrough.c (99%)
> rename {hw => backends}/tpm/tpm_util.c (99%)
> create mode 100644 backends/Kconfig
> create mode 100644 backends/tpm/Kconfig
> create mode 100644 backends/tpm/Makefile.objs
> create mode 100644 backends/tpm/trace-events
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-06-23 9:41 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 16:02 [PATCH v2 00/11] tpm: Split hw/ vs backends/ Philippe Mathieu-Daudé
2020-06-11 16:02 ` [PATCH v2 01/11] docs/specs/tpm: Correct header path name Philippe Mathieu-Daudé
2020-06-11 16:19 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 02/11] backends: Add TPM files into their own directory Philippe Mathieu-Daudé
2020-06-11 16:20 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 03/11] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig Philippe Mathieu-Daudé
2020-06-11 16:22 ` Stefan Berger
2020-06-11 16:02 ` [PATCH v2 04/11] hw/tpm: Do not include 'qemu/osdep.h' in header Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 05/11] hw/tpm: Include missing 'qemu/option.h' header Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 06/11] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 07/11] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 08/11] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 09/11] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Philippe Mathieu-Daudé
2020-06-11 16:03 ` [PATCH v2 10/11] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h" Philippe Mathieu-Daudé
2020-06-11 16:03 ` [RFC PATCH v2 11/11] tpm: Move backend code under the 'backends/' directory Philippe Mathieu-Daudé
2020-06-11 16:21 ` [PATCH v2 00/11] tpm: Split hw/ vs backends/ Stefan Berger
2020-06-23 9:39 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.