* [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm
@ 2017-10-24 12:20 Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 1/4] tpm: add missing include Philippe Mathieu-Daudé
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 12:20 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Juan Quintela, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
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 a build fix instead of via trivial.
v2:
- added Richard W.M. Jones Tested-by tag
- remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger)
Regards,
Phil.
PD: I missed Amarnath Valluri in my first series, you might want to add yourself
a R: tag in MAINTAINTERS.
Philippe Mathieu-Daudé (4):
tpm: add missing include
tpm: add stubs
tpm: remove unnecessary #ifdef CONFIG_TPM
vl: remove unnecessary #ifdef CONFIG_TPM
Makefile.objs | 2 +-
include/sysemu/tpm.h | 1 +
stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++
tpm.c | 4 ----
vl.c | 2 --
MAINTAINERS | 1 +
stubs/Makefile.objs | 1 +
7 files changed, 37 insertions(+), 7 deletions(-)
create mode 100644 stubs/tpm.c
--
2.15.0.rc1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH v2 1/4] tpm: add missing include
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
@ 2017-10-24 12:20 ` Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 2/4] tpm: add stubs Philippe Mathieu-Daudé
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 12:20 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Juan Quintela, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
else file including "sysemu/tpm.h" fails 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>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
---
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] 16+ messages in thread
* [Qemu-devel] [PATCH v2 2/4] tpm: add stubs
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 1/4] tpm: add missing include Philippe Mathieu-Daudé
@ 2017-10-24 12:20 ` Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:06 ` Valluri, Amarnath
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 12:20 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Juan Quintela, Eric Blake,
Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however this
function is not available when compiling with --disable-tpm.
Provides necessary stubs to keep code clean of #ifdef'fery.
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>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
---
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..c18aac1c73
--- /dev/null
+++ b/stubs/tpm.c
@@ -0,0 +1,33 @@
+/*
+ * TPM stubs
+ *
+ * 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] 16+ messages in thread
* [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 1/4] tpm: add missing include Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 2/4] tpm: add stubs Philippe Mathieu-Daudé
@ 2017-10-24 12:20 ` Philippe Mathieu-Daudé
2017-10-24 17:35 ` Stefan Berger
` (2 more replies)
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 4/4] vl: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
5 siblings, 3 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 12:20 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Juan Quintela, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
Makefile.objs now checks for $(CONFIG_TPM).
Suggested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tpm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tpm.c b/tpm.c
index 45520f555d..ab5d29e91e 100644
--- a/tpm.c
+++ b/tpm.c
@@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model)
tpm_models[model] = true;
}
-#ifdef CONFIG_TPM
-
static const TPMBackendClass *
tpm_be_find_by_type(enum TpmType type)
{
@@ -192,8 +190,6 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg)
return 0;
}
-#endif /* CONFIG_TPM */
-
/*
* Walk the list of active TPM backends and collect information about them
* following the schema description in qapi-schema.json.
--
2.15.0.rc1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH v2 4/4] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
@ 2017-10-24 12:20 ` Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:03 ` Valluri, Amarnath
2017-10-24 12:39 ` [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Richard W.M. Jones
2017-10-24 18:19 ` Amarnath Valluri
5 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 12:20 UTC (permalink / raw)
To: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Juan Quintela, Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
a stub is now provided.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
---
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] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 4/4] vl: " Philippe Mathieu-Daudé
@ 2017-10-24 12:39 ` Richard W.M. Jones
2017-10-24 13:23 ` Philippe Mathieu-Daudé
2017-10-24 18:19 ` Amarnath Valluri
5 siblings, 1 reply; 16+ messages in thread
From: Richard W.M. Jones @ 2017-10-24 12:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Marc-André Lureau, Stefan Berger,
Amarnath Valluri, Juan Quintela, Peter Maydell, qemu-devel,
qemu-trivial, Marc-André Lureau, Dr . David Alan Gilbert,
Peter Xu
On Tue, Oct 24, 2017 at 09:20:41AM -0300, Philippe Mathieu-Daudé wrote:
> 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 a build fix instead of via trivial.
>
> v2:
> - added Richard W.M. Jones Tested-by tag
> - remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger)
Can confirm v2 works as well.
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] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm
2017-10-24 12:39 ` [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Richard W.M. Jones
@ 2017-10-24 13:23 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-24 13:23 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: BALATON Zoltan, Marc-André Lureau, Stefan Berger,
Amarnath Valluri, Juan Quintela, Peter Maydell, qemu-devel,
qemu-trivial, Marc-André Lureau, Dr . David Alan Gilbert,
Peter Xu
>> v2:
>> - added Richard W.M. Jones Tested-by tag
>> - remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger)
>
> Can confirm v2 works as well.
Thanks for testing!
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
@ 2017-10-24 17:35 ` Stefan Berger
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:04 ` Valluri, Amarnath
2 siblings, 0 replies; 16+ messages in thread
From: Stefan Berger @ 2017-10-24 17:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Amarnath Valluri, Juan Quintela, Peter Maydell
Cc: qemu-devel, qemu-trivial, Peter Xu, Dr . David Alan Gilbert,
Marc-André Lureau
On 10/24/2017 08:20 AM, Philippe Mathieu-Daudé wrote:
> Makefile.objs now checks for $(CONFIG_TPM).
>
> Suggested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> ---
> tpm.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/tpm.c b/tpm.c
> index 45520f555d..ab5d29e91e 100644
> --- a/tpm.c
> +++ b/tpm.c
> @@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model)
> tpm_models[model] = true;
> }
>
> -#ifdef CONFIG_TPM
> -
> static const TPMBackendClass *
> tpm_be_find_by_type(enum TpmType type)
> {
> @@ -192,8 +190,6 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg)
> return 0;
> }
>
> -#endif /* CONFIG_TPM */
> -
> /*
> * Walk the list of active TPM backends and collect information about them
> * following the schema description in qapi-schema.json.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2017-10-24 12:39 ` [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Richard W.M. Jones
@ 2017-10-24 18:19 ` Amarnath Valluri
2017-10-25 13:30 ` Philippe Mathieu-Daudé
5 siblings, 1 reply; 16+ messages in thread
From: Amarnath Valluri @ 2017-10-24 18:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Juan Quintela, Peter Maydell, qemu-devel,
qemu-trivial, Marc-André Lureau, Dr . David Alan Gilbert,
Peter Xu
On Tue, 2017-10-24 at 09:20 -0300, Philippe Mathieu-Daudé wrote:
> 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 a build fix instead of via trivial.
>
> v2:
> - added Richard W.M. Jones Tested-by tag
> - remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger)
>
> Regards,
>
> Phil.
>
> PD: I missed Amarnath Valluri in my first series, you might want to add yourself
> a R: tag in MAINTAINTERS.
>
> Philippe Mathieu-Daudé (4):
> tpm: add missing include
> tpm: add stubs
> tpm: remove unnecessary #ifdef CONFIG_TPM
> vl: remove unnecessary #ifdef CONFIG_TPM
>
> Makefile.objs | 2 +-
> include/sysemu/tpm.h | 1 +
> stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++
> tpm.c | 4 ----
> vl.c | 2 --
> MAINTAINERS | 1 +
> stubs/Makefile.objs | 1 +
> 7 files changed, 37 insertions(+), 7 deletions(-)
> create mode 100644 stubs/tpm.c
>
+1, Nice cleanup in my opinion, now it looks much cleaner.
- Amarnath
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/4] tpm: add stubs
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 2/4] tpm: add stubs Philippe Mathieu-Daudé
@ 2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:06 ` Valluri, Amarnath
1 sibling, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2017-10-24 23:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Eric Blake, Peter Maydell,
qemu-devel, qemu-trivial, Marc-André Lureau,
Dr . David Alan Gilbert, Peter Xu
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however this
> function is not available when compiling with --disable-tpm.
>
> Provides necessary stubs to keep code clean of #ifdef'fery.
>
> 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>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2017-10-24 17:35 ` Stefan Berger
@ 2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:04 ` Valluri, Amarnath
2 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2017-10-24 23:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Peter Maydell, qemu-devel,
qemu-trivial, Marc-André Lureau, Dr . David Alan Gilbert,
Peter Xu
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Makefile.objs now checks for $(CONFIG_TPM).
>
> Suggested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 4/4] vl: " Philippe Mathieu-Daudé
@ 2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:03 ` Valluri, Amarnath
1 sibling, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2017-10-24 23:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: BALATON Zoltan, Richard W . M . Jones, Marc-André Lureau,
Stefan Berger, Amarnath Valluri, Peter Maydell, qemu-devel,
qemu-trivial, Marc-André Lureau, Dr . David Alan Gilbert,
Peter Xu
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> a stub is now provided.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm
2017-10-24 18:19 ` Amarnath Valluri
@ 2017-10-25 13:30 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-25 13:30 UTC (permalink / raw)
To: amarnath.valluri
Cc: Peter Maydell, Stefan Berger, qemu-devel, Juan Quintela,
Richard W . M . Jones, Peter Xu, qemu-trivial,
Marc-André Lureau, Marc-André Lureau,
Dr . David Alan Gilbert
Hi Amarnath,
On 10/24/2017 03:19 PM, Amarnath Valluri wrote:
> On Tue, 2017-10-24 at 09:20 -0300, Philippe Mathieu-Daudé wrote:
>> This fixes building with --disable-tpm as reported by Zoltan:
>> http://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg05369.html
[...]
> +1, Nice cleanup in my opinion, now it looks much cleaner.
Thanks, however I'm not sure what a +1 means, is it equivalent to an
Acked-by or a Reviewed-by tag? If so it would be better to write them
explicitly.
Regards,
Phil.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] vl: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 4/4] vl: " Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
@ 2017-10-26 7:03 ` Valluri, Amarnath
1 sibling, 0 replies; 16+ messages in thread
From: Valluri, Amarnath @ 2017-10-26 7:03 UTC (permalink / raw)
To: f4bug; +Cc: dgilbert, qemu-devel, qemu-trivial, peterx, marcandre.lureau
On Tue, 2017-10-24 at 09:20 -0300, Philippe Mathieu-Daudé wrote:
> a stub is now provided.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Amarnath Valluri <amarnath.valluri@intel.com>
> ---
> vl.c | 2 --
> 1 file changed, 2 deletions(-)
> Reviewed-by:
> 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))
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2017-10-24 17:35 ` Stefan Berger
2017-10-24 23:20 ` Juan Quintela
@ 2017-10-26 7:04 ` Valluri, Amarnath
2 siblings, 0 replies; 16+ messages in thread
From: Valluri, Amarnath @ 2017-10-26 7:04 UTC (permalink / raw)
To: f4bug; +Cc: dgilbert, qemu-devel, qemu-trivial, peterx, marcandre.lureau
On Tue, 2017-10-24 at 09:20 -0300, Philippe Mathieu-Daudé wrote:
> Makefile.objs now checks for $(CONFIG_TPM).
>
> Suggested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
Reviewed-by: Amarnath Valluri <amarnath.valluri@intel.com>
> tpm.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/tpm.c b/tpm.c
> index 45520f555d..ab5d29e91e 100644
> --- a/tpm.c
> +++ b/tpm.c
> @@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model)
> tpm_models[model] = true;
> }
>
> -#ifdef CONFIG_TPM
> -
> static const TPMBackendClass *
> tpm_be_find_by_type(enum TpmType type)
> {
> @@ -192,8 +190,6 @@ int tpm_config_parse(QemuOptsList *opts_list,
> const char *optarg)
> return 0;
> }
>
> -#endif /* CONFIG_TPM */
> -
> /*
> * Walk the list of active TPM backends and collect information
> about them
> * following the schema description in qapi-schema.json.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/4] tpm: add stubs
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 2/4] tpm: add stubs Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
@ 2017-10-26 7:06 ` Valluri, Amarnath
1 sibling, 0 replies; 16+ messages in thread
From: Valluri, Amarnath @ 2017-10-26 7:06 UTC (permalink / raw)
To: f4bug; +Cc: dgilbert, qemu-devel, qemu-trivial, peterx, marcandre.lureau
On Tue, 2017-10-24 at 09:20 -0300, Philippe Mathieu-Daudé wrote:
> Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however
> this
> function is not available when compiling with --disable-tpm.
>
> Provides necessary stubs to keep code clean of #ifdef'fery.
>
> 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>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
> ---
Reviewed-by: Amarnath Valluri <amarnath.valluri@intel.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-10-26 7:06 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 12:20 [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 1/4] tpm: add missing include Philippe Mathieu-Daudé
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 2/4] tpm: add stubs Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:06 ` Valluri, Amarnath
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 3/4] tpm: remove unnecessary #ifdef CONFIG_TPM Philippe Mathieu-Daudé
2017-10-24 17:35 ` Stefan Berger
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:04 ` Valluri, Amarnath
2017-10-24 12:20 ` [Qemu-devel] [PATCH v2 4/4] vl: " Philippe Mathieu-Daudé
2017-10-24 23:20 ` Juan Quintela
2017-10-26 7:03 ` Valluri, Amarnath
2017-10-24 12:39 ` [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm Richard W.M. Jones
2017-10-24 13:23 ` Philippe Mathieu-Daudé
2017-10-24 18:19 ` Amarnath Valluri
2017-10-25 13:30 ` Philippe Mathieu-Daudé
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.