* [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg
@ 2017-10-30 3:05 Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 1/5] accel/tcg: add missing target-independent stubs Philippe Mathieu-Daudé
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Thomas Huth, Yang Zhong
Cc: Philippe Mathieu-Daudé, qemu-devel
Hi,
This series add missing stubs (as suggested by Eduardo in [1]) to build
the i386/s390x targets with --disable-tcg (the only targets building without
TCG so far).
For git workflow ease, I split by offending commit (so one can branch from
this particular commit and cherry-pick the corresponding fix[es]).
Regards,
Phil.
[1]: http://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg06094.html
Philippe Mathieu-Daudé (5):
accel/tcg: add missing target-independent stubs
target/i386: tcg stubs
target/s390x: tcg stubs
accel/tcg: add a stub for tcg_region_init()
accel/tcg: add a stub for tcg_register_thread()
accel/stubs/tcg-stub.c | 27 +++++++++++++++++++++++++++
target/i386/tcg-stub.c | 13 +++++++++++++
target/s390x/tcg-stub.c | 13 +++++++++++++
target/i386/Makefile.objs | 1 +
target/s390x/Makefile.objs | 1 +
5 files changed, 55 insertions(+)
create mode 100644 target/i386/tcg-stub.c
create mode 100644 target/s390x/tcg-stub.c
--
2.15.0.rc2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 1/5] accel/tcg: add missing target-independent stubs
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
@ 2017-10-30 3:05 ` Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs Philippe Mathieu-Daudé
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Thomas Huth, Yang Zhong
Cc: Philippe Mathieu-Daudé, qemu-devel
missing since 44eff67341:
LINK x86_64-softmmu/qemu-system-x86_64
exec.o: In function `tlb_reset_dirty_range_all':
exec.c:1070: undefined reference to `tlb_reset_dirty'
exec.o: In function `tcg_commit':
exec.c:2704: undefined reference to `cpu_reloading_memory_map'
cpus.o: In function `tcg_cpu_exec':
cpus.c:1270: undefined reference to `cpu_exec'
cpus.o: In function `qemu_tcg_rr_cpu_thread_fn':
cpus.c:1374: undefined reference to `cpu_exec_step_atomic'
cpus.o: In function `qemu_tcg_cpu_thread_fn':
cpus.c:1490: undefined reference to `cpu_exec_step_atomic'
cpus.o: In function `qemu_tcg_init_vcpu':
cpus.c:1675: undefined reference to `parallel_cpus'
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/stubs/tcg-stub.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 5dd480b1a2..74ce45ea07 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -17,6 +17,25 @@
#include "exec/cpu-common.h"
#include "exec/exec-all.h"
+bool parallel_cpus;
+
void tb_flush(CPUState *cpu)
{
}
+
+void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
+{
+}
+
+int cpu_exec(CPUState *cpu)
+{
+ return -1;
+}
+
+void cpu_exec_step_atomic(CPUState *cpu)
+{
+}
+
+void cpu_reloading_memory_map(void)
+{
+}
--
2.15.0.rc2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 1/5] accel/tcg: add missing target-independent stubs Philippe Mathieu-Daudé
@ 2017-10-30 3:05 ` Philippe Mathieu-Daudé
2017-10-30 9:05 ` Eduardo Habkost
2017-10-30 3:05 ` [Qemu-devel] [PATCH 3/5] target/s390x: " Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Thomas Huth, Yang Zhong
Cc: Philippe Mathieu-Daudé, qemu-devel
missing since 55c3ceef61:
LINK x86_64-softmmu/qemu-system-x86_64
target/i386/cpu.o: In function `x86_cpu_common_class_init':
target/i386/cpu.c:4215: undefined reference to `tcg_x86_init'
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/i386/tcg-stub.c | 13 +++++++++++++
target/i386/Makefile.objs | 1 +
2 files changed, 14 insertions(+)
create mode 100644 target/i386/tcg-stub.c
diff --git a/target/i386/tcg-stub.c b/target/i386/tcg-stub.c
new file mode 100644
index 0000000000..e13d993a80
--- /dev/null
+++ b/target/i386/tcg-stub.c
@@ -0,0 +1,13 @@
+/*
+ * QEMU TCG x86 specific function 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 "cpu.h"
+
+void tcg_x86_init(void)
+{
+}
diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
index 6a26e9d9f0..2b3db1e5c2 100644
--- a/target/i386/Makefile.objs
+++ b/target/i386/Makefile.objs
@@ -3,6 +3,7 @@ obj-$(CONFIG_TCG) += translate.o
obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o
obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o
obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o
+obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o monitor.o
obj-$(CONFIG_KVM) += kvm.o hyperv.o
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
--
2.15.0.rc2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 3/5] target/s390x: tcg stubs
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 1/5] accel/tcg: add missing target-independent stubs Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs Philippe Mathieu-Daudé
@ 2017-10-30 3:05 ` Philippe Mathieu-Daudé
2017-10-30 7:57 ` Thomas Huth
2017-10-30 3:05 ` [Qemu-devel] [PATCH 4/5] accel/tcg: add a stub for tcg_region_init() Philippe Mathieu-Daudé
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Richard Henderson, Peter Maydell,
Eduardo Habkost, Emilio G . Cota, Paolo Bonzini, Thomas Huth,
Alexander Graf
Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-s390x
missing since 55c3ceef61:
LINK s390x-softmmu/qemu-system-s390x
target/s390x/cpu.o: In function `s390_cpu_class_init':
target/s390x/cpu.c:500: undefined reference to `s390x_translate_init'
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/s390x/tcg-stub.c | 13 +++++++++++++
target/s390x/Makefile.objs | 1 +
2 files changed, 14 insertions(+)
create mode 100644 target/s390x/tcg-stub.c
diff --git a/target/s390x/tcg-stub.c b/target/s390x/tcg-stub.c
new file mode 100644
index 0000000000..1e3ed46e89
--- /dev/null
+++ b/target/s390x/tcg-stub.c
@@ -0,0 +1,13 @@
+/*
+ * QEMU TCG support -- s390x specific function 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 "internal.h"
+
+void s390x_translate_init(void)
+{
+}
diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs
index 31932de9cf..31dd498d01 100644
--- a/target/s390x/Makefile.objs
+++ b/target/s390x/Makefile.objs
@@ -1,6 +1,7 @@
obj-y += cpu.o cpu_models.o cpu_features.o gdbstub.o interrupt.o helper.o
obj-$(CONFIG_TCG) += translate.o cc_helper.o excp_helper.o fpu_helper.o
obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o crypto_helper.o
+obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
obj-$(CONFIG_SOFTMMU) += machine.o ioinst.o arch_dump.o mmu_helper.o diag.o
obj-$(CONFIG_SOFTMMU) += sigp.o
obj-$(CONFIG_KVM) += kvm.o
--
2.15.0.rc2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 4/5] accel/tcg: add a stub for tcg_region_init()
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2017-10-30 3:05 ` [Qemu-devel] [PATCH 3/5] target/s390x: " Philippe Mathieu-Daudé
@ 2017-10-30 3:05 ` Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 5/5] accel/tcg: add a stub for tcg_register_thread() Philippe Mathieu-Daudé
2017-10-30 8:05 ` [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Thomas Huth
5 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Thomas Huth, Yang Zhong
Cc: Philippe Mathieu-Daudé, qemu-devel
missing since e8feb96fcc:
LINK x86_64-softmmu/qemu-system-x86_64
cpus.o: In function `qemu_tcg_init_vcpu':
cpus.c:1677: undefined reference to `tcg_region_init'
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/stubs/tcg-stub.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 74ce45ea07..842a9cd352 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -39,3 +39,7 @@ void cpu_exec_step_atomic(CPUState *cpu)
void cpu_reloading_memory_map(void)
{
}
+
+void tcg_region_init(void)
+{
+}
--
2.15.0.rc2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 5/5] accel/tcg: add a stub for tcg_register_thread()
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2017-10-30 3:05 ` [Qemu-devel] [PATCH 4/5] accel/tcg: add a stub for tcg_region_init() Philippe Mathieu-Daudé
@ 2017-10-30 3:05 ` Philippe Mathieu-Daudé
2017-10-30 8:05 ` [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Thomas Huth
5 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 3:05 UTC (permalink / raw)
To: Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Thomas Huth, Yang Zhong
Cc: Philippe Mathieu-Daudé, qemu-devel
missing since 3468b59e18:
LINK x86_64-softmmu/qemu-system-x86_64
cpus.o: In function `qemu_tcg_rr_cpu_thread_fn':
cpus.c:1310: undefined reference to `tcg_register_thread'
cpus.o: In function `qemu_tcg_cpu_thread_fn':
cpus.c:1458: undefined reference to `tcg_register_thread'
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/stubs/tcg-stub.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 842a9cd352..8ec3885594 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -43,3 +43,7 @@ void cpu_reloading_memory_map(void)
void tcg_region_init(void)
{
}
+
+void tcg_register_thread(void)
+{
+}
--
2.15.0.rc2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 3/5] target/s390x: tcg stubs
2017-10-30 3:05 ` [Qemu-devel] [PATCH 3/5] target/s390x: " Philippe Mathieu-Daudé
@ 2017-10-30 7:57 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2017-10-30 7:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
Richard Henderson, Richard Henderson, Peter Maydell,
Eduardo Habkost, Emilio G . Cota, Paolo Bonzini, Alexander Graf
Cc: qemu-devel, qemu-s390x
On 30.10.2017 04:05, Philippe Mathieu-Daudé wrote:
> missing since 55c3ceef61:
>
> LINK s390x-softmmu/qemu-system-s390x
> target/s390x/cpu.o: In function `s390_cpu_class_init':
> target/s390x/cpu.c:500: undefined reference to `s390x_translate_init'
>
> Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This is fixed already by 74d7fc7f6385158b8a5c524c61baaef1b66f3dac
("tcg: Avoid setting tcg_initialize if !CONFIG_TCG"), so please drop
this patch.
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2017-10-30 3:05 ` [Qemu-devel] [PATCH 5/5] accel/tcg: add a stub for tcg_register_thread() Philippe Mathieu-Daudé
@ 2017-10-30 8:05 ` Thomas Huth
2017-10-30 12:46 ` Philippe Mathieu-Daudé
5 siblings, 1 reply; 10+ messages in thread
From: Thomas Huth @ 2017-10-30 8:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Yang Zhong
Cc: qemu-devel
On 30.10.2017 04:05, Philippe Mathieu-Daudé wrote:
> Hi,
>
> This series add missing stubs (as suggested by Eduardo in [1]) to build
> the i386/s390x targets with --disable-tcg (the only targets building without
> TCG so far).
Compiling with --disable-tcg works fine for me with the latest master
branch as of today, on both x86 and s390x. Are you sure that these
patches are still required?
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs
2017-10-30 3:05 ` [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs Philippe Mathieu-Daudé
@ 2017-10-30 9:05 ` Eduardo Habkost
0 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2017-10-30 9:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Richard Henderson, Peter Maydell, Emilio G . Cota, Paolo Bonzini,
Thomas Huth, Yang Zhong, qemu-devel
On Mon, Oct 30, 2017 at 12:05:50AM -0300, Philippe Mathieu-Daudé wrote:
> missing since 55c3ceef61:
>
> LINK x86_64-softmmu/qemu-system-x86_64
> target/i386/cpu.o: In function `x86_cpu_common_class_init':
> target/i386/cpu.c:4215: undefined reference to `tcg_x86_init'
>
> Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/i386/tcg-stub.c | 13 +++++++++++++
> target/i386/Makefile.objs | 1 +
> 2 files changed, 14 insertions(+)
> create mode 100644 target/i386/tcg-stub.c
>
> diff --git a/target/i386/tcg-stub.c b/target/i386/tcg-stub.c
> new file mode 100644
> index 0000000000..e13d993a80
> --- /dev/null
> +++ b/target/i386/tcg-stub.c
> @@ -0,0 +1,13 @@
> +/*
> + * QEMU TCG x86 specific function 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 "cpu.h"
> +
> +void tcg_x86_init(void)
> +{
> +}
I'm not sure my suggestion was really a good one. Requiring a
separate stub file for each architecture looks like too much
boilerplate code, which defeats the purpose of eliminating the
#ifdefs. What if we just define inline stubs at target-*/cpu.h?
> diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
> index 6a26e9d9f0..2b3db1e5c2 100644
> --- a/target/i386/Makefile.objs
> +++ b/target/i386/Makefile.objs
> @@ -3,6 +3,7 @@ obj-$(CONFIG_TCG) += translate.o
> obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o
> obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o
> obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o
> +obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
> obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o monitor.o
> obj-$(CONFIG_KVM) += kvm.o hyperv.o
> obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
> --
> 2.15.0.rc2
>
--
Eduardo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg
2017-10-30 8:05 ` [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Thomas Huth
@ 2017-10-30 12:46 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-30 12:46 UTC (permalink / raw)
To: Thomas Huth, Richard Henderson, Peter Maydell, Eduardo Habkost,
Emilio G . Cota, Paolo Bonzini, Yang Zhong
Cc: qemu-devel
Hi Thomas,
On 10/30/2017 05:05 AM, Thomas Huth wrote:
> Compiling with --disable-tcg works fine for me with the latest master
> branch as of today, on both x86 and s390x. Are you sure that these
> patches are still required?
I guess I didn't pulled /master early enough so I missed Peter's merge.
Indeed a bug fix got applied so these patches are not required.
However they now allow less #ifdef'fery and might have value in git log
history, so I'll wait a bit for Eduardo and Paolo comments before
dropping it.
Regards,
Phil.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-10-30 13:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30 3:05 [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 1/5] accel/tcg: add missing target-independent stubs Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 2/5] target/i386: tcg stubs Philippe Mathieu-Daudé
2017-10-30 9:05 ` Eduardo Habkost
2017-10-30 3:05 ` [Qemu-devel] [PATCH 3/5] target/s390x: " Philippe Mathieu-Daudé
2017-10-30 7:57 ` Thomas Huth
2017-10-30 3:05 ` [Qemu-devel] [PATCH 4/5] accel/tcg: add a stub for tcg_region_init() Philippe Mathieu-Daudé
2017-10-30 3:05 ` [Qemu-devel] [PATCH 5/5] accel/tcg: add a stub for tcg_register_thread() Philippe Mathieu-Daudé
2017-10-30 8:05 ` [Qemu-devel] [PATCH 0/5] build fixes for --disable-tcg Thomas Huth
2017-10-30 12:46 ` 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.