All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: stefanb@linux.vnet.ibm.com, pbonzini@redhat.com
Cc: marcandre.lureau@redhat.com, thuth@redhat.com,
	qemu-devel@nongnu.org, Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PATCH] tpm: add stubs for qdev-prop-tpm
Date: Mon, 18 Dec 2017 13:16:35 +0100	[thread overview]
Message-ID: <20171218121635.25494-1-cohuck@redhat.com> (raw)

Building with --disable-tpm yields

../hw/core/qdev-properties-system.o: In function `set_tpm':
/home/cohuck/git/qemu/hw/core/qdev-properties-system.c:274: undefined reference to `qemu_find_tpm_be'
/home/cohuck/git/qemu/hw/core/qdev-properties-system.c:278: undefined reference to `tpm_backend_init'
../hw/core/qdev-properties-system.o: In function `release_tpm':
/home/cohuck/git/qemu/hw/core/qdev-properties-system.c:291: undefined reference to `tpm_backend_reset'

Add some proper stubs for those functions.

Fixes: 493b78303532 ("qdev: add DEFINE_PROP_TPMBE")
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 stubs/tpm.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stubs/tpm.c b/stubs/tpm.c
index c18aac1c73..97457e0646 100644
--- a/stubs/tpm.c
+++ b/stubs/tpm.c
@@ -7,6 +7,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/tpm.h"
 #include "qmp-commands.h"
+#include "sysemu/tpm_backend.h"
 
 int tpm_init(void)
 {
@@ -31,3 +32,17 @@ TpmModelList *qmp_query_tpm_models(Error **errp)
 {
     return NULL;
 }
+
+TPMBackend *qemu_find_tpm_be(const char *id)
+{
+    return NULL;
+}
+
+int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp)
+{
+    return -1;
+}
+
+void tpm_backend_reset(TPMBackend *s)
+{
+}
-- 
2.13.6

             reply	other threads:[~2017-12-18 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 12:16 Cornelia Huck [this message]
2017-12-18 12:27 ` [Qemu-devel] [PATCH] tpm: add stubs for qdev-prop-tpm Paolo Bonzini
2017-12-18 12:35   ` Cornelia Huck
2017-12-18 12:37     ` Marc-André Lureau
2017-12-18 15:58   ` Philippe Mathieu-Daudé

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=20171218121635.25494-1-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.