qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eric Auger <eric.auger@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Stefan Berger <stefanb@linnux.ibm.com>
Subject: [PULL 07/11] sysemu: tpm: Add a stub function for TPM_IS_CRB
Date: Fri, 06 May 2022 14:48:36 -0600	[thread overview]
Message-ID: <165187011323.4166595.4846048800121434051.stgit@omen> (raw)
In-Reply-To: <165186988363.4166595.3147442303200167674.stgit@omen>

From: Eric Auger <eric.auger@redhat.com>

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>
---
 include/sysemu/tpm.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 68b2206463c5..fb40e30ff60e 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 */




  parent reply	other threads:[~2022-05-06 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 20:46 [PULL 00/11] Series short description Alex Williamson
2022-05-06 20:46 ` [PULL 01/11] vfio: simplify the conditional statements in vfio_msi_enable Alex Williamson
2022-05-06 20:46 ` [PULL 02/11] vfio: move re-enabling INTX out of the common helper Alex Williamson
2022-05-06 20:47 ` [PULL 03/11] vfio: simplify the failure path in vfio_msi_enable Alex Williamson
2022-05-06 20:47 ` [PULL 04/11] Revert "vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration" Alex Williamson
2022-05-06 20:47 ` [PULL 05/11] vfio: defer to commit kvm irq routing when enable msi/msix Alex Williamson
2022-05-06 20:48 ` [PULL 06/11] vfio/common: Fix a small boundary issue of a trace Alex Williamson
2022-05-06 20:48 ` Alex Williamson [this message]
2022-05-19  0:46   ` [PULL 07/11] sysemu: tpm: Add a stub function for TPM_IS_CRB Stefan Berger
2022-05-19  1:17     ` Alex Williamson
2022-05-19  1:31       ` Stefan Berger
2022-05-06 20:48 ` [PULL 08/11] vfio/common: remove spurious tpm-crb-cmd misalignment warning Alex Williamson
2022-05-06 20:48 ` [PULL 09/11] hw/vfio/pci: fix vfio_pci_hot_reset_result trace point Alex Williamson
2022-05-06 20:49 ` [PULL 10/11] vfio/pci: Use vbasedev local variable in vfio_realize() Alex Williamson
2022-05-06 20:49 ` [PULL 11/11] vfio/common: Rename VFIOGuestIOMMU::iommu into ::iommu_mr Alex Williamson
2022-05-07  2:37 ` [PULL 00/11] Series short description Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165187011323.4166595.4846048800121434051.stgit@omen \
    --to=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linnux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).