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

hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header

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.

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

authored by

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

+35 -5
+1
hw/tpm/tpm_crb.c
··· 25 25 #include "migration/vmstate.h" 26 26 #include "sysemu/tpm_backend.h" 27 27 #include "sysemu/reset.h" 28 + #include "tpm_prop.h" 28 29 #include "tpm_util.h" 29 30 #include "tpm_ppi.h" 30 31 #include "trace.h"
+31
hw/tpm/tpm_prop.h
··· 1 + /* 2 + * TPM utility functions 3 + * 4 + * Copyright (c) 2010 - 2015 IBM Corporation 5 + * Authors: 6 + * Stefan Berger <stefanb@us.ibm.com> 7 + * 8 + * This library is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU Lesser General Public 10 + * License as published by the Free Software Foundation; either 11 + * version 2 of the License, or (at your option) any later version. 12 + * 13 + * This library is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 + * Lesser General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU Lesser General Public 19 + * License along with this library; if not, see <http://www.gnu.org/licenses/> 20 + */ 21 + 22 + #ifndef HW_TPM_PROP_H 23 + #define HW_TPM_PROP_H 24 + 25 + #include "sysemu/tpm_backend.h" 26 + #include "hw/qdev-properties.h" 27 + 28 + #define DEFINE_PROP_TPMBE(_n, _s, _f) \ 29 + DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) 30 + 31 + #endif /* HW_TPM_PROP_H */
+1
hw/tpm/tpm_spapr.c
··· 21 21 22 22 #include "sysemu/tpm_backend.h" 23 23 #include "tpm_util.h" 24 + #include "tpm_prop.h" 24 25 25 26 #include "hw/ppc/spapr.h" 26 27 #include "hw/ppc/spapr_vio.h"
+1 -1
hw/tpm/tpm_tis_isa.c
··· 27 27 #include "hw/qdev-properties.h" 28 28 #include "migration/vmstate.h" 29 29 #include "hw/acpi/tpm.h" 30 - #include "tpm_util.h" 30 + #include "tpm_prop.h" 31 31 #include "tpm_tis.h" 32 32 33 33 typedef struct TPMStateISA {
+1 -1
hw/tpm/tpm_tis_sysbus.c
··· 26 26 #include "hw/qdev-properties.h" 27 27 #include "migration/vmstate.h" 28 28 #include "hw/acpi/tpm.h" 29 - #include "tpm_util.h" 29 + #include "tpm_prop.h" 30 30 #include "hw/sysbus.h" 31 31 #include "tpm_tis.h" 32 32
-3
hw/tpm/tpm_util.h
··· 66 66 stl_be_p(b + 6, error); 67 67 } 68 68 69 - #define DEFINE_PROP_TPMBE(_n, _s, _f) \ 70 - DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) 71 - 72 69 void tpm_util_show_buffer(const unsigned char *buffer, 73 70 size_t buffer_size, const char *string); 74 71