* [Qemu-devel] [PATCH 0/3] tpm: add stubs to fix compiling with --disable-tpm
@ 2017-10-23 21:33 Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 1/3] tpm: add missing include Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-23 21:33 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau
This fixes building with --disable-tpm as reported by Zoltan:
http://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg05369.html
Cc'ing Peter in case this enters as build fix instead of via trivial.
Regards,
Phil.
Philippe Mathieu-Daudé (3):
tpm: add missing include
tpm: add stubs
vl: remove unnecessary #ifdef CONFIG_TPM
Makefile.objs | 2 +-
include/sysemu/tpm.h | 1 +
stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++
vl.c | 2 --
MAINTAINERS | 1 +
stubs/Makefile.objs | 1 +
6 files changed, 37 insertions(+), 3 deletions(-)
create mode 100644 stubs/tpm.c
--
2.15.0.rc1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 1/3] tpm: add missing include
2017-10-23 21:33 [Qemu-devel] [PATCH 0/3] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
@ 2017-10-23 21:33 ` Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 2/3] tpm: add stubs Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-23 21:33 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau
else files including "sysemu/tpm.h" fail to compile:
In file included from qemu/stubs/tpm.c:2:0:
qemu/include/sysemu/tpm.h:36:19: error: implicit declaration of function ‘object_resolve_path_type’ [-Werror=implicit-function-declaration]
Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/sysemu/tpm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index c8afa179e5..d7a2bd8556 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -13,6 +13,7 @@
#define QEMU_TPM_H
#include "qemu/option.h"
+#include "qom/object.h"
typedef struct TPMState TPMState;
--
2.15.0.rc1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/3] tpm: add stubs
2017-10-23 21:33 [Qemu-devel] [PATCH 0/3] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 1/3] tpm: add missing include Philippe Mathieu-Daudé
@ 2017-10-23 21:33 ` Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-23 21:33 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau
this fixes compile with --disable-tpm
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20171023102903.256AF7456A0@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Makefile.objs | 2 +-
stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++
MAINTAINERS | 1 +
stubs/Makefile.objs | 1 +
4 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 stubs/tpm.c
diff --git a/Makefile.objs b/Makefile.objs
index d4f973a8fc..285c6f3c15 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -62,7 +62,7 @@ bt-host.o-cflags := $(BLUEZ_CFLAGS)
common-obj-y += dma-helpers.o
common-obj-y += vl.o
vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
-common-obj-y += tpm.o
+common-obj-$(CONFIG_TPM) += tpm.o
common-obj-$(CONFIG_SLIRP) += slirp/
diff --git a/stubs/tpm.c b/stubs/tpm.c
new file mode 100644
index 0000000000..6b90557e42
--- /dev/null
+++ b/stubs/tpm.c
@@ -0,0 +1,33 @@
+/*
+ * TPM configuration
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "qemu/osdep.h"
+#include "sysemu/tpm.h"
+#include "qmp-commands.h"
+
+int tpm_init(void)
+{
+ return 0;
+}
+
+void tpm_cleanup(void)
+{
+}
+
+TPMInfoList *qmp_query_tpm(Error **errp)
+{
+ return NULL;
+}
+
+TpmTypeList *qmp_query_tpm_types(Error **errp)
+{
+ return NULL;
+}
+
+TpmModelList *qmp_query_tpm_models(Error **errp)
+{
+ return NULL;
+}
diff --git a/MAINTAINERS b/MAINTAINERS
index 12175425a7..2650063242 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1544,6 +1544,7 @@ TPM
M: Stefan Berger <stefanb@linux.vnet.ibm.com>
S: Maintained
F: tpm.c
+F: stubs/tpm.c
F: hw/tpm/*
F: include/hw/acpi/tpm.h
F: include/sysemu/tpm*
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index c7594796c3..8cfe34328a 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -28,6 +28,7 @@ stub-obj-y += runstate-check.o
stub-obj-y += set-fd-handler.o
stub-obj-y += slirp.o
stub-obj-y += sysbus.o
+stub-obj-y += tpm.o
stub-obj-y += trace-control.o
stub-obj-y += uuid.o
stub-obj-y += vm-stop.o
--
2.15.0.rc1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-23 21:33 [Qemu-devel] [PATCH 0/3] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 1/3] tpm: add missing include Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 2/3] tpm: add stubs Philippe Mathieu-Daudé
@ 2017-10-23 21:33 ` Philippe Mathieu-Daudé
2017-10-23 21:37 ` Richard W.M. Jones
2017-10-23 21:47 ` Stefan Berger
2 siblings, 2 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-23 21:33 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau
a stub is now provided.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
vl.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/vl.c b/vl.c
index 0723835bbf..ec299099ff 100644
--- a/vl.c
+++ b/vl.c
@@ -4624,11 +4624,9 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
-#ifdef CONFIG_TPM
if (tpm_init() < 0) {
exit(1);
}
-#endif
/* init the bluetooth world */
if (foreach_device_config(DEV_BT, bt_parse))
--
2.15.0.rc1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-23 21:33 ` [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
@ 2017-10-23 21:37 ` Richard W.M. Jones
2017-10-24 2:33 ` Philippe Mathieu-Daudé
2017-10-23 21:47 ` Stefan Berger
1 sibling, 1 reply; 8+ messages in thread
From: Richard W.M. Jones @ 2017-10-23 21:37 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Marc-André Lureau, Stefan Berger,
Peter Maydell, qemu-devel, qemu-trivial, Marc-André Lureau
The series fixes the build for me, thanks :-)
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-23 21:33 ` [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2017-10-23 21:37 ` Richard W.M. Jones
@ 2017-10-23 21:47 ` Stefan Berger
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Berger @ 2017-10-23 21:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Peter Maydell
Cc: qemu-devel, qemu-trivial, Marc-André Lureau
On 10/23/2017 05:33 PM, Philippe Mathieu-Daudé wrote:
> a stub is now provided.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> vl.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 0723835bbf..ec299099ff 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4624,11 +4624,9 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
>
> -#ifdef CONFIG_TPM
> if (tpm_init() < 0) {
> exit(1);
> }
> -#endif
>
> /* init the bluetooth world */
> if (foreach_device_config(DEV_BT, bt_parse))
Now you should be able to also remove the #ifdef CONFIG_TPM from ./tpm.c.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-23 21:37 ` Richard W.M. Jones
@ 2017-10-24 2:33 ` Philippe Mathieu-Daudé
2017-10-24 7:29 ` Richard W.M. Jones
0 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 2:33 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: BALATON Zoltan, Marc-André Lureau, Stefan Berger,
Peter Maydell, qemu-devel, qemu-trivial, Marc-André Lureau
Hi Richard,
On 10/23/2017 06:37 PM, Richard W.M. Jones wrote:
> The series fixes the build for me, thanks :-)
Good, does this mean I can add your Tested-by: tag?
Regards,
Phil.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 2:33 ` Philippe Mathieu-Daudé
@ 2017-10-24 7:29 ` Richard W.M. Jones
0 siblings, 0 replies; 8+ messages in thread
From: Richard W.M. Jones @ 2017-10-24 7:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Marc-André Lureau, Stefan Berger,
Peter Maydell, qemu-devel, qemu-trivial, Marc-André Lureau
On Mon, Oct 23, 2017 at 11:33:31PM -0300, Philippe Mathieu-Daudé wrote:
> Hi Richard,
>
> On 10/23/2017 06:37 PM, Richard W.M. Jones wrote:
> > The series fixes the build for me, thanks :-)
>
> Good, does this mean I can add your Tested-by: tag?
Sure,
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-10-24 7:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-23 21:33 [Qemu-devel] [PATCH 0/3] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 1/3] tpm: add missing include Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 2/3] tpm: add stubs Philippe Mathieu-Daudé
2017-10-23 21:33 ` [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2017-10-23 21:37 ` Richard W.M. Jones
2017-10-24 2:33 ` Philippe Mathieu-Daudé
2017-10-24 7:29 ` Richard W.M. Jones
2017-10-23 21:47 ` Stefan Berger
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.