Skip to content

Commit 0f7d214

Browse files
philmdstefanberger
authored andcommitted
hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h"
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". Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Stefan Berger <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Berger <[email protected]>
1 parent a350061 commit 0f7d214

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

docs/specs/tpm.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ PCRs.
234234
QEMU files related to the TPM passthrough device:
235235
- ``hw/tpm/tpm_passthrough.c``
236236
- ``hw/tpm/tpm_util.c``
237-
- ``hw/tpm/tpm_util.h``
237+
- ``include/sysemu/tpm_util.h``
238238

239239

240240
Command line to start QEMU with the TPM passthrough device using the host's
@@ -294,7 +294,7 @@ command.
294294
QEMU files related to the TPM emulator device:
295295
- ``hw/tpm/tpm_emulator.c``
296296
- ``hw/tpm/tpm_util.c``
297-
- ``hw/tpm/tpm_util.h``
297+
- ``include/sysemu/tpm_util.h``
298298

299299
The following commands start the swtpm with a UnixIO control channel over
300300
a socket interface. They do not need to be run as root.

hw/tpm/tpm_crb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#include "hw/acpi/tpm.h"
2525
#include "migration/vmstate.h"
2626
#include "sysemu/tpm_backend.h"
27+
#include "sysemu/tpm_util.h"
2728
#include "sysemu/reset.h"
2829
#include "tpm_prop.h"
29-
#include "tpm_util.h"
3030
#include "tpm_ppi.h"
3131
#include "trace.h"
3232

hw/tpm/tpm_emulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "qemu/sockets.h"
3333
#include "io/channel-socket.h"
3434
#include "sysemu/tpm_backend.h"
35+
#include "sysemu/tpm_util.h"
3536
#include "tpm_int.h"
36-
#include "tpm_util.h"
3737
#include "tpm_ioctl.h"
3838
#include "migration/blocker.h"
3939
#include "migration/vmstate.h"

hw/tpm/tpm_passthrough.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "qemu/module.h"
2929
#include "qemu/sockets.h"
3030
#include "sysemu/tpm_backend.h"
31+
#include "sysemu/tpm_util.h"
3132
#include "tpm_int.h"
3233
#include "qapi/clone-visitor.h"
3334
#include "qapi/qapi-visit-tpm.h"
34-
#include "tpm_util.h"
3535
#include "trace.h"
3636

3737
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"

hw/tpm/tpm_spapr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "migration/vmstate.h"
2121

2222
#include "sysemu/tpm_backend.h"
23-
#include "tpm_util.h"
23+
#include "sysemu/tpm_util.h"
2424
#include "tpm_prop.h"
2525

2626
#include "hw/ppc/spapr.h"

hw/tpm/tpm_tis_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "hw/qdev-properties.h"
3434
#include "migration/vmstate.h"
3535
#include "sysemu/tpm_backend.h"
36-
#include "tpm_util.h"
36+
#include "sysemu/tpm_util.h"
3737
#include "tpm_ppi.h"
3838
#include "trace.h"
3939

hw/tpm/tpm_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#include "qemu/error-report.h"
2424
#include "qapi/error.h"
2525
#include "qapi/visitor.h"
26-
#include "tpm_util.h"
2726
#include "tpm_int.h"
2827
#include "exec/memory.h"
2928
#include "hw/qdev-properties.h"
3029
#include "sysemu/tpm_backend.h"
30+
#include "sysemu/tpm_util.h"
3131
#include "trace.h"
3232

3333
/* tpm backend property */

hw/tpm/tpm_util.h renamed to include/sysemu/tpm_util.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* License along with this library; if not, see <http://www.gnu.org/licenses/>
2020
*/
2121

22-
#ifndef TPM_TPM_UTIL_H
23-
#define TPM_TPM_UTIL_H
22+
#ifndef SYSEMU_TPM_UTIL_H
23+
#define SYSEMU_TPM_UTIL_H
2424

2525
#include "sysemu/tpm.h"
2626
#include "qemu/bswap.h"
@@ -69,4 +69,4 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error)
6969
void tpm_util_show_buffer(const unsigned char *buffer,
7070
size_t buffer_size, const char *string);
7171

72-
#endif /* TPM_TPM_UTIL_H */
72+
#endif /* SYSEMU_TPM_UTIL_H */

0 commit comments

Comments
 (0)