qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h'

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".

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20200612085444.8362-10-philmd@redhat.com
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

authored by

Philippe Mathieu-Daudé and committed by
Stefan Berger
eccc0b0f f670a562

+11 -10
+11
hw/tpm/tpm_int.h
··· 13 13 #define TPM_TPM_INT_H 14 14 15 15 #include "qemu/option.h" 16 + #include "sysemu/tpm.h" 16 17 17 18 #define TPM_STANDARD_CMDLINE_OPTS \ 18 19 { \ ··· 73 74 #define TPM_RC_INSUFFICIENT 0x9a 74 75 #define TPM_RC_FAILURE 0x101 75 76 #define TPM_RC_LOCALITY 0x907 77 + 78 + int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version, 79 + size_t *buffersize); 80 + 81 + typedef struct TPMSizedBuffer { 82 + uint32_t size; 83 + uint8_t *buffer; 84 + } TPMSizedBuffer; 85 + 86 + void tpm_sized_buffer_reset(TPMSizedBuffer *tsb); 76 87 77 88 #endif /* TPM_TPM_INT_H */
-10
hw/tpm/tpm_util.h
··· 66 66 stl_be_p(b + 6, error); 67 67 } 68 68 69 - int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version, 70 - size_t *buffersize); 71 - 72 69 #define DEFINE_PROP_TPMBE(_n, _s, _f) \ 73 70 DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) 74 - 75 - typedef struct TPMSizedBuffer { 76 - uint32_t size; 77 - uint8_t *buffer; 78 - } TPMSizedBuffer; 79 - 80 - void tpm_sized_buffer_reset(TPMSizedBuffer *tsb); 81 71 82 72 void tpm_util_show_buffer(const unsigned char *buffer, 83 73 size_t buffer_size, const char *string);