summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2022-05-06 15:25:09 +0200
committerAlex Williamson <alex.williamson@redhat.com>2022-05-06 09:06:50 -0600
commit4168cdad398843ed53d650a27651868b4d3e21c9 (patch)
treeab9434cec745e2254613736e86a1db84dd581171
parent99510d271b173f21a7a1e8a238b5f35d9e88a147 (diff)
downloadfocaccia-qemu-4168cdad398843ed53d650a27651868b4d3e21c9.tar.gz
focaccia-qemu-4168cdad398843ed53d650a27651868b4d3e21c9.zip
sysemu: tpm: Add a stub function for TPM_IS_CRB
In a subsequent patch, VFIO will need to recognize if
a memory region owner is a TPM CRB device. Hence VFIO
needs to use TPM_IS_CRB() even if CONFIG_TPM is unset. So
let's add a stub function.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Suggested-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linnux.ibm.com>
Link: https://lore.kernel.org/r/20220506132510.1847942-2-eric.auger@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r--include/sysemu/tpm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 68b2206463..fb40e30ff6 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -80,6 +80,12 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
 #define tpm_init()  (0)
 #define tpm_cleanup()
 
+/* needed for an alignment check in non-tpm code */
+static inline Object *TPM_IS_CRB(Object *obj)
+{
+     return NULL;
+}
+
 #endif /* CONFIG_TPM */
 
 #endif /* QEMU_TPM_H */