All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] semihosting: Move it out of hw/
@ 2021-02-26 13:13 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marek Vasut, Peter Maydell, Aleksandar Rikalo, qemu-riscv,
	Sagar Karandikar, Bastian Koppelmann, Chris Wulff,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Alex Bennée, Max Filippov, Michael Walle, qemu-arm,
	Alistair Francis, Paolo Bonzini, Guan Xuetao,
	Philippe Mathieu-Daudé,
	Palmer Dabbelt, Aurelien Jarno

In order to reduce CONFIG_USER_ONLY uses in hw/, move
semihosting out of it, being a generic feature.

Philippe Mathieu-Daudé (2):
  semihosting: Move include/hw/semihosting/ -> include/semihosting/
  semihosting: Move hw/semihosting/ -> semihosting/

 meson.build                                       | 1 +
 include/{hw => }/semihosting/console.h            | 0
 include/{hw => }/semihosting/semihost.h           | 0
 {hw/semihosting => semihosting}/common-semi.h     | 0
 gdbstub.c                                         | 2 +-
 hw/mips/malta.c                                   | 2 +-
 linux-user/aarch64/cpu_loop.c                     | 2 +-
 linux-user/arm/cpu_loop.c                         | 2 +-
 linux-user/riscv/cpu_loop.c                       | 2 +-
 linux-user/semihost.c                             | 2 +-
 {hw/semihosting => semihosting}/arm-compat-semi.c | 6 +++---
 {hw/semihosting => semihosting}/config.c          | 2 +-
 {hw/semihosting => semihosting}/console.c         | 4 ++--
 softmmu/vl.c                                      | 2 +-
 stubs/semihost.c                                  | 2 +-
 target/arm/helper.c                               | 4 ++--
 target/arm/m_helper.c                             | 4 ++--
 target/arm/translate-a64.c                        | 2 +-
 target/arm/translate.c                            | 2 +-
 target/lm32/helper.c                              | 2 +-
 target/m68k/op_helper.c                           | 2 +-
 target/mips/cpu.c                                 | 2 +-
 target/mips/mips-semi.c                           | 4 ++--
 target/mips/translate.c                           | 2 +-
 target/nios2/helper.c                             | 2 +-
 target/riscv/cpu_helper.c                         | 2 +-
 target/unicore32/helper.c                         | 2 +-
 target/xtensa/translate.c                         | 2 +-
 target/xtensa/xtensa-semi.c                       | 2 +-
 Kconfig                                           | 1 +
 MAINTAINERS                                       | 4 ++--
 hw/Kconfig                                        | 1 -
 hw/meson.build                                    | 1 -
 {hw/semihosting => semihosting}/Kconfig           | 0
 {hw/semihosting => semihosting}/meson.build       | 0
 35 files changed, 35 insertions(+), 35 deletions(-)
 rename include/{hw => }/semihosting/console.h (100%)
 rename include/{hw => }/semihosting/semihost.h (100%)
 rename {hw/semihosting => semihosting}/common-semi.h (100%)
 rename {hw/semihosting => semihosting}/arm-compat-semi.c (99%)
 rename {hw/semihosting => semihosting}/config.c (99%)
 rename {hw/semihosting => semihosting}/console.c (98%)
 rename {hw/semihosting => semihosting}/Kconfig (100%)
 rename {hw/semihosting => semihosting}/meson.build (100%)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 0/2] semihosting: Move it out of hw/
@ 2021-02-26 13:13 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Paolo Bonzini, Guan Xuetao, Jiaxun Yang, Laurent Vivier,
	Chris Wulff, qemu-arm, Philippe Mathieu-Daudé,
	Aleksandar Rikalo, qemu-riscv, Max Filippov, Marek Vasut,
	Palmer Dabbelt, Alex Bennée, Aurelien Jarno, Peter Maydell,
	Michael Walle, Philippe Mathieu-Daudé

In order to reduce CONFIG_USER_ONLY uses in hw/, move
semihosting out of it, being a generic feature.

Philippe Mathieu-Daudé (2):
  semihosting: Move include/hw/semihosting/ -> include/semihosting/
  semihosting: Move hw/semihosting/ -> semihosting/

 meson.build                                       | 1 +
 include/{hw => }/semihosting/console.h            | 0
 include/{hw => }/semihosting/semihost.h           | 0
 {hw/semihosting => semihosting}/common-semi.h     | 0
 gdbstub.c                                         | 2 +-
 hw/mips/malta.c                                   | 2 +-
 linux-user/aarch64/cpu_loop.c                     | 2 +-
 linux-user/arm/cpu_loop.c                         | 2 +-
 linux-user/riscv/cpu_loop.c                       | 2 +-
 linux-user/semihost.c                             | 2 +-
 {hw/semihosting => semihosting}/arm-compat-semi.c | 6 +++---
 {hw/semihosting => semihosting}/config.c          | 2 +-
 {hw/semihosting => semihosting}/console.c         | 4 ++--
 softmmu/vl.c                                      | 2 +-
 stubs/semihost.c                                  | 2 +-
 target/arm/helper.c                               | 4 ++--
 target/arm/m_helper.c                             | 4 ++--
 target/arm/translate-a64.c                        | 2 +-
 target/arm/translate.c                            | 2 +-
 target/lm32/helper.c                              | 2 +-
 target/m68k/op_helper.c                           | 2 +-
 target/mips/cpu.c                                 | 2 +-
 target/mips/mips-semi.c                           | 4 ++--
 target/mips/translate.c                           | 2 +-
 target/nios2/helper.c                             | 2 +-
 target/riscv/cpu_helper.c                         | 2 +-
 target/unicore32/helper.c                         | 2 +-
 target/xtensa/translate.c                         | 2 +-
 target/xtensa/xtensa-semi.c                       | 2 +-
 Kconfig                                           | 1 +
 MAINTAINERS                                       | 4 ++--
 hw/Kconfig                                        | 1 -
 hw/meson.build                                    | 1 -
 {hw/semihosting => semihosting}/Kconfig           | 0
 {hw/semihosting => semihosting}/meson.build       | 0
 35 files changed, 35 insertions(+), 35 deletions(-)
 rename include/{hw => }/semihosting/console.h (100%)
 rename include/{hw => }/semihosting/semihost.h (100%)
 rename {hw/semihosting => semihosting}/common-semi.h (100%)
 rename {hw/semihosting => semihosting}/arm-compat-semi.c (99%)
 rename {hw/semihosting => semihosting}/config.c (99%)
 rename {hw/semihosting => semihosting}/console.c (98%)
 rename {hw/semihosting => semihosting}/Kconfig (100%)
 rename {hw/semihosting => semihosting}/meson.build (100%)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] semihosting: Move include/hw/semihosting/ -> include/semihosting/
  2021-02-26 13:13 ` Philippe Mathieu-Daudé
@ 2021-02-26 13:13   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marek Vasut, Peter Maydell, Aleksandar Rikalo, qemu-riscv,
	Sagar Karandikar, Bastian Koppelmann, Chris Wulff,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Alex Bennée, Max Filippov, Michael Walle, qemu-arm,
	Alistair Francis, Paolo Bonzini, Guan Xuetao,
	Philippe Mathieu-Daudé,
	Palmer Dabbelt, Aurelien Jarno

We want to move the semihosting code out of hw/ in the next patch.

This patch contains the mechanical steps, created using:

  $ git mv include/hw/semihosting/ include/
  $ sed -i s,hw/semihosting,semihosting, $(git grep -l hw/semihosting)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/{hw => }/semihosting/console.h  | 0
 include/{hw => }/semihosting/semihost.h | 0
 gdbstub.c                               | 2 +-
 hw/mips/malta.c                         | 2 +-
 hw/semihosting/arm-compat-semi.c        | 6 +++---
 hw/semihosting/config.c                 | 2 +-
 hw/semihosting/console.c                | 4 ++--
 linux-user/aarch64/cpu_loop.c           | 2 +-
 linux-user/arm/cpu_loop.c               | 2 +-
 linux-user/riscv/cpu_loop.c             | 2 +-
 linux-user/semihost.c                   | 2 +-
 softmmu/vl.c                            | 2 +-
 stubs/semihost.c                        | 2 +-
 target/arm/helper.c                     | 4 ++--
 target/arm/m_helper.c                   | 4 ++--
 target/arm/translate-a64.c              | 2 +-
 target/arm/translate.c                  | 2 +-
 target/lm32/helper.c                    | 2 +-
 target/m68k/op_helper.c                 | 2 +-
 target/mips/cpu.c                       | 2 +-
 target/mips/mips-semi.c                 | 4 ++--
 target/mips/translate.c                 | 2 +-
 target/nios2/helper.c                   | 2 +-
 target/riscv/cpu_helper.c               | 2 +-
 target/unicore32/helper.c               | 2 +-
 target/xtensa/translate.c               | 2 +-
 target/xtensa/xtensa-semi.c             | 2 +-
 MAINTAINERS                             | 2 +-
 28 files changed, 32 insertions(+), 32 deletions(-)
 rename include/{hw => }/semihosting/console.h (100%)
 rename include/{hw => }/semihosting/semihost.h (100%)

diff --git a/include/hw/semihosting/console.h b/include/semihosting/console.h
similarity index 100%
rename from include/hw/semihosting/console.h
rename to include/semihosting/console.h
diff --git a/include/hw/semihosting/semihost.h b/include/semihosting/semihost.h
similarity index 100%
rename from include/hw/semihosting/semihost.h
rename to include/semihosting/semihost.h
diff --git a/gdbstub.c b/gdbstub.c
index 759bb00bcf0..552b38a73b2 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -49,7 +49,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/exec-all.h"
 #include "sysemu/replay.h"
 
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 9afc0b427bf..26e7b1bd9f6 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -58,7 +58,7 @@
 #include "qemu/error-report.h"
 #include "hw/misc/empty_slot.h"
 #include "sysemu/kvm.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "hw/mips/cps.h"
 #include "hw/qdev-clock.h"
 
diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c
index 23c6e3edcb6..94950b6c56d 100644
--- a/hw/semihosting/arm-compat-semi.c
+++ b/hw/semihosting/arm-compat-semi.c
@@ -34,9 +34,9 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
+#include "semihosting/common-semi.h"
 #include "qemu/log.h"
 #include "qemu/timer.h"
 #ifdef CONFIG_USER_ONLY
diff --git a/hw/semihosting/config.c b/hw/semihosting/config.c
index 9807f10cb00..3548e0f627f 100644
--- a/hw/semihosting/config.c
+++ b/hw/semihosting/config.c
@@ -22,7 +22,7 @@
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "chardev/char.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c
index 9b4fee92602..c9ebd6fdd05 100644
--- a/hw/semihosting/console.c
+++ b/hw/semihosting/console.c
@@ -17,8 +17,8 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
 #include "exec/gdbstub.h"
 #include "exec/exec-all.h"
 #include "qemu/log.h"
diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c
index 7c42f657068..ee72a1c20f0 100644
--- a/linux-user/aarch64/cpu_loop.c
+++ b/linux-user/aarch64/cpu_loop.c
@@ -22,7 +22,7 @@
 #include "qemu.h"
 #include "cpu_loop-common.h"
 #include "qemu/guest-random.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #include "target/arm/syndrome.h"
 
 #define get_user_code_u32(x, gaddr, env)                \
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c
index cadfb7fa439..989d03cd89d 100644
--- a/linux-user/arm/cpu_loop.c
+++ b/linux-user/arm/cpu_loop.c
@@ -22,7 +22,7 @@
 #include "qemu.h"
 #include "elf.h"
 #include "cpu_loop-common.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 #define get_user_code_u32(x, gaddr, env)                \
     ({ abi_long __r = get_user_u32((x), (gaddr));       \
diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c
index 9665dabb096..6767f941e8f 100644
--- a/linux-user/riscv/cpu_loop.c
+++ b/linux-user/riscv/cpu_loop.c
@@ -23,7 +23,7 @@
 #include "qemu.h"
 #include "cpu_loop-common.h"
 #include "elf.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 void cpu_loop(CPURISCVState *env)
 {
diff --git a/linux-user/semihost.c b/linux-user/semihost.c
index c0015ee7f6c..82013b8b48b 100644
--- a/linux-user/semihost.c
+++ b/linux-user/semihost.c
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/console.h"
 #include "qemu.h"
 #include <termios.h>
 
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b219ce1f357..b2d3cf28995 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -108,7 +108,7 @@
 #include "qapi/opts-visitor.h"
 #include "qapi/clone-visitor.h"
 #include "qom/object_interfaces.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "crypto/init.h"
 #include "sysemu/replay.h"
 #include "qapi/qapi-events-run-state.h"
diff --git a/stubs/semihost.c b/stubs/semihost.c
index 1d8b37f7b2f..1b30f38b03d 100644
--- a/stubs/semihost.c
+++ b/stubs/semihost.c
@@ -11,7 +11,7 @@
 #include "qemu/osdep.h"
 #include "qemu/option.h"
 #include "qemu/error-report.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/sysemu.h"
 
 /* Empty config */
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 0e1a3b94211..d763f376c6e 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -22,7 +22,7 @@
 #include "exec/exec-all.h"
 #include <zlib.h> /* For crc32 */
 #include "hw/irq.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/cpus.h"
 #include "sysemu/cpu-timers.h"
 #include "sysemu/kvm.h"
@@ -34,7 +34,7 @@
 #ifdef CONFIG_TCG
 #include "arm_ldst.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #endif
 
 #define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 731c435c00b..d63ae465e1e 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -21,7 +21,7 @@
 #include "qemu/qemu-print.h"
 #include "exec/exec-all.h"
 #include <zlib.h> /* For crc32 */
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/cpus.h"
 #include "sysemu/kvm.h"
 #include "qemu/range.h"
@@ -31,7 +31,7 @@
 #ifdef CONFIG_TCG
 #include "arm_ldst.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #endif
 
 static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index b23a8975d54..6d002e2c63f 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -28,7 +28,7 @@
 #include "internals.h"
 #include "qemu/host-utils.h"
 
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/gen-icount.h"
 
 #include "exec/helper-proto.h"
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 1653cca1aaa..62b1c2081b6 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -29,7 +29,7 @@
 #include "qemu/log.h"
 #include "qemu/bitops.h"
 #include "arm_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
diff --git a/target/lm32/helper.c b/target/lm32/helper.c
index 7c52ae76d6d..01cc3c53a50 100644
--- a/target/lm32/helper.c
+++ b/target/lm32/helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "qemu/host-utils.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/log.h"
 
 bool lm32_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 202498deb51..730cdf77444 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -21,7 +21,7 @@
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #if defined(CONFIG_USER_ONLY)
 
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index bf70c77295f..bd4dca571fc 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -31,7 +31,7 @@
 #include "exec/exec-all.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-clock.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "qapi/qapi-commands-machine-target.h"
 #include "fpu_helper.h"
 
diff --git a/target/mips/mips-semi.c b/target/mips/mips-semi.c
index 898251aa023..6de60fa6dd7 100644
--- a/target/mips/mips-semi.c
+++ b/target/mips/mips-semi.c
@@ -22,8 +22,8 @@
 #include "qemu/log.h"
 #include "exec/helper-proto.h"
 #include "exec/softmmu-semi.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
 
 typedef enum UHIOp {
     UHI_exit = 1,
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 70891c37cdd..0b6d82d228e 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -29,7 +29,7 @@
 #include "exec/translator.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #include "target/mips/trace.h"
 #include "trace-tcg.h"
diff --git a/target/nios2/helper.c b/target/nios2/helper.c
index 57c97bde3c6..53be8398e99 100644
--- a/target/nios2/helper.c
+++ b/target/nios2/helper.c
@@ -26,7 +26,7 @@
 #include "exec/cpu_ldst.h"
 #include "exec/log.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #if defined(CONFIG_USER_ONLY)
 
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 2f43939fb6d..83a6bcfad08 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv/cpu_helper.c
@@ -24,7 +24,7 @@
 #include "exec/exec-all.h"
 #include "tcg/tcg-op.h"
 #include "trace.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch)
 {
diff --git a/target/unicore32/helper.c b/target/unicore32/helper.c
index 54c26871fea..704393c27f9 100644
--- a/target/unicore32/helper.c
+++ b/target/unicore32/helper.c
@@ -14,7 +14,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/console.h"
 
 #undef DEBUG_UC32
 
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 944a157747c..0ae4efc48a1 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -37,7 +37,7 @@
 #include "qemu/log.h"
 #include "qemu/qemu-print.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/translator.h"
 
 #include "exec/helper-proto.h"
diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c
index 25f57a6500c..79f2b043f23 100644
--- a/target/xtensa/xtensa-semi.c
+++ b/target/xtensa/xtensa-semi.c
@@ -29,7 +29,7 @@
 #include "cpu.h"
 #include "chardev/char-fe.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 
diff --git a/MAINTAINERS b/MAINTAINERS
index 9b2aa18e1fe..aacd4408125 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3225,7 +3225,7 @@ Semihosting
 M: Alex Bennée <alex.bennee@linaro.org>
 S: Maintained
 F: hw/semihosting/
-F: include/hw/semihosting/
+F: include/semihosting/
 
 Multi-process QEMU
 M: Elena Ufimtseva <elena.ufimtseva@oracle.com>
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 1/2] semihosting: Move include/hw/semihosting/ -> include/semihosting/
@ 2021-02-26 13:13   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Paolo Bonzini, Guan Xuetao, Jiaxun Yang, Laurent Vivier,
	Chris Wulff, qemu-arm, Philippe Mathieu-Daudé,
	Aleksandar Rikalo, qemu-riscv, Max Filippov, Marek Vasut,
	Palmer Dabbelt, Alex Bennée, Aurelien Jarno, Peter Maydell,
	Michael Walle, Philippe Mathieu-Daudé

We want to move the semihosting code out of hw/ in the next patch.

This patch contains the mechanical steps, created using:

  $ git mv include/hw/semihosting/ include/
  $ sed -i s,hw/semihosting,semihosting, $(git grep -l hw/semihosting)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/{hw => }/semihosting/console.h  | 0
 include/{hw => }/semihosting/semihost.h | 0
 gdbstub.c                               | 2 +-
 hw/mips/malta.c                         | 2 +-
 hw/semihosting/arm-compat-semi.c        | 6 +++---
 hw/semihosting/config.c                 | 2 +-
 hw/semihosting/console.c                | 4 ++--
 linux-user/aarch64/cpu_loop.c           | 2 +-
 linux-user/arm/cpu_loop.c               | 2 +-
 linux-user/riscv/cpu_loop.c             | 2 +-
 linux-user/semihost.c                   | 2 +-
 softmmu/vl.c                            | 2 +-
 stubs/semihost.c                        | 2 +-
 target/arm/helper.c                     | 4 ++--
 target/arm/m_helper.c                   | 4 ++--
 target/arm/translate-a64.c              | 2 +-
 target/arm/translate.c                  | 2 +-
 target/lm32/helper.c                    | 2 +-
 target/m68k/op_helper.c                 | 2 +-
 target/mips/cpu.c                       | 2 +-
 target/mips/mips-semi.c                 | 4 ++--
 target/mips/translate.c                 | 2 +-
 target/nios2/helper.c                   | 2 +-
 target/riscv/cpu_helper.c               | 2 +-
 target/unicore32/helper.c               | 2 +-
 target/xtensa/translate.c               | 2 +-
 target/xtensa/xtensa-semi.c             | 2 +-
 MAINTAINERS                             | 2 +-
 28 files changed, 32 insertions(+), 32 deletions(-)
 rename include/{hw => }/semihosting/console.h (100%)
 rename include/{hw => }/semihosting/semihost.h (100%)

diff --git a/include/hw/semihosting/console.h b/include/semihosting/console.h
similarity index 100%
rename from include/hw/semihosting/console.h
rename to include/semihosting/console.h
diff --git a/include/hw/semihosting/semihost.h b/include/semihosting/semihost.h
similarity index 100%
rename from include/hw/semihosting/semihost.h
rename to include/semihosting/semihost.h
diff --git a/gdbstub.c b/gdbstub.c
index 759bb00bcf0..552b38a73b2 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -49,7 +49,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/exec-all.h"
 #include "sysemu/replay.h"
 
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 9afc0b427bf..26e7b1bd9f6 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -58,7 +58,7 @@
 #include "qemu/error-report.h"
 #include "hw/misc/empty_slot.h"
 #include "sysemu/kvm.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "hw/mips/cps.h"
 #include "hw/qdev-clock.h"
 
diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c
index 23c6e3edcb6..94950b6c56d 100644
--- a/hw/semihosting/arm-compat-semi.c
+++ b/hw/semihosting/arm-compat-semi.c
@@ -34,9 +34,9 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
+#include "semihosting/common-semi.h"
 #include "qemu/log.h"
 #include "qemu/timer.h"
 #ifdef CONFIG_USER_ONLY
diff --git a/hw/semihosting/config.c b/hw/semihosting/config.c
index 9807f10cb00..3548e0f627f 100644
--- a/hw/semihosting/config.c
+++ b/hw/semihosting/config.c
@@ -22,7 +22,7 @@
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "chardev/char.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c
index 9b4fee92602..c9ebd6fdd05 100644
--- a/hw/semihosting/console.c
+++ b/hw/semihosting/console.c
@@ -17,8 +17,8 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
 #include "exec/gdbstub.h"
 #include "exec/exec-all.h"
 #include "qemu/log.h"
diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c
index 7c42f657068..ee72a1c20f0 100644
--- a/linux-user/aarch64/cpu_loop.c
+++ b/linux-user/aarch64/cpu_loop.c
@@ -22,7 +22,7 @@
 #include "qemu.h"
 #include "cpu_loop-common.h"
 #include "qemu/guest-random.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #include "target/arm/syndrome.h"
 
 #define get_user_code_u32(x, gaddr, env)                \
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c
index cadfb7fa439..989d03cd89d 100644
--- a/linux-user/arm/cpu_loop.c
+++ b/linux-user/arm/cpu_loop.c
@@ -22,7 +22,7 @@
 #include "qemu.h"
 #include "elf.h"
 #include "cpu_loop-common.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 #define get_user_code_u32(x, gaddr, env)                \
     ({ abi_long __r = get_user_u32((x), (gaddr));       \
diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c
index 9665dabb096..6767f941e8f 100644
--- a/linux-user/riscv/cpu_loop.c
+++ b/linux-user/riscv/cpu_loop.c
@@ -23,7 +23,7 @@
 #include "qemu.h"
 #include "cpu_loop-common.h"
 #include "elf.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 void cpu_loop(CPURISCVState *env)
 {
diff --git a/linux-user/semihost.c b/linux-user/semihost.c
index c0015ee7f6c..82013b8b48b 100644
--- a/linux-user/semihost.c
+++ b/linux-user/semihost.c
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/console.h"
 #include "qemu.h"
 #include <termios.h>
 
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b219ce1f357..b2d3cf28995 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -108,7 +108,7 @@
 #include "qapi/opts-visitor.h"
 #include "qapi/clone-visitor.h"
 #include "qom/object_interfaces.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "crypto/init.h"
 #include "sysemu/replay.h"
 #include "qapi/qapi-events-run-state.h"
diff --git a/stubs/semihost.c b/stubs/semihost.c
index 1d8b37f7b2f..1b30f38b03d 100644
--- a/stubs/semihost.c
+++ b/stubs/semihost.c
@@ -11,7 +11,7 @@
 #include "qemu/osdep.h"
 #include "qemu/option.h"
 #include "qemu/error-report.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/sysemu.h"
 
 /* Empty config */
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 0e1a3b94211..d763f376c6e 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -22,7 +22,7 @@
 #include "exec/exec-all.h"
 #include <zlib.h> /* For crc32 */
 #include "hw/irq.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/cpus.h"
 #include "sysemu/cpu-timers.h"
 #include "sysemu/kvm.h"
@@ -34,7 +34,7 @@
 #ifdef CONFIG_TCG
 #include "arm_ldst.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #endif
 
 #define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 731c435c00b..d63ae465e1e 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -21,7 +21,7 @@
 #include "qemu/qemu-print.h"
 #include "exec/exec-all.h"
 #include <zlib.h> /* For crc32 */
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "sysemu/cpus.h"
 #include "sysemu/kvm.h"
 #include "qemu/range.h"
@@ -31,7 +31,7 @@
 #ifdef CONFIG_TCG
 #include "arm_ldst.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 #endif
 
 static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index b23a8975d54..6d002e2c63f 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -28,7 +28,7 @@
 #include "internals.h"
 #include "qemu/host-utils.h"
 
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/gen-icount.h"
 
 #include "exec/helper-proto.h"
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 1653cca1aaa..62b1c2081b6 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -29,7 +29,7 @@
 #include "qemu/log.h"
 #include "qemu/bitops.h"
 #include "arm_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
diff --git a/target/lm32/helper.c b/target/lm32/helper.c
index 7c52ae76d6d..01cc3c53a50 100644
--- a/target/lm32/helper.c
+++ b/target/lm32/helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "qemu/host-utils.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/log.h"
 
 bool lm32_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 202498deb51..730cdf77444 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -21,7 +21,7 @@
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #if defined(CONFIG_USER_ONLY)
 
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index bf70c77295f..bd4dca571fc 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -31,7 +31,7 @@
 #include "exec/exec-all.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-clock.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "qapi/qapi-commands-machine-target.h"
 #include "fpu_helper.h"
 
diff --git a/target/mips/mips-semi.c b/target/mips/mips-semi.c
index 898251aa023..6de60fa6dd7 100644
--- a/target/mips/mips-semi.c
+++ b/target/mips/mips-semi.c
@@ -22,8 +22,8 @@
 #include "qemu/log.h"
 #include "exec/helper-proto.h"
 #include "exec/softmmu-semi.h"
-#include "hw/semihosting/semihost.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/semihost.h"
+#include "semihosting/console.h"
 
 typedef enum UHIOp {
     UHI_exit = 1,
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 70891c37cdd..0b6d82d228e 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -29,7 +29,7 @@
 #include "exec/translator.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #include "target/mips/trace.h"
 #include "trace-tcg.h"
diff --git a/target/nios2/helper.c b/target/nios2/helper.c
index 57c97bde3c6..53be8398e99 100644
--- a/target/nios2/helper.c
+++ b/target/nios2/helper.c
@@ -26,7 +26,7 @@
 #include "exec/cpu_ldst.h"
 #include "exec/log.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 
 #if defined(CONFIG_USER_ONLY)
 
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 2f43939fb6d..83a6bcfad08 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv/cpu_helper.c
@@ -24,7 +24,7 @@
 #include "exec/exec-all.h"
 #include "tcg/tcg-op.h"
 #include "trace.h"
-#include "hw/semihosting/common-semi.h"
+#include "semihosting/common-semi.h"
 
 int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch)
 {
diff --git a/target/unicore32/helper.c b/target/unicore32/helper.c
index 54c26871fea..704393c27f9 100644
--- a/target/unicore32/helper.c
+++ b/target/unicore32/helper.c
@@ -14,7 +14,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/console.h"
+#include "semihosting/console.h"
 
 #undef DEBUG_UC32
 
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 944a157747c..0ae4efc48a1 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -37,7 +37,7 @@
 #include "qemu/log.h"
 #include "qemu/qemu-print.h"
 #include "exec/cpu_ldst.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "exec/translator.h"
 
 #include "exec/helper-proto.h"
diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c
index 25f57a6500c..79f2b043f23 100644
--- a/target/xtensa/xtensa-semi.c
+++ b/target/xtensa/xtensa-semi.c
@@ -29,7 +29,7 @@
 #include "cpu.h"
 #include "chardev/char-fe.h"
 #include "exec/helper-proto.h"
-#include "hw/semihosting/semihost.h"
+#include "semihosting/semihost.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 
diff --git a/MAINTAINERS b/MAINTAINERS
index 9b2aa18e1fe..aacd4408125 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3225,7 +3225,7 @@ Semihosting
 M: Alex Bennée <alex.bennee@linaro.org>
 S: Maintained
 F: hw/semihosting/
-F: include/hw/semihosting/
+F: include/semihosting/
 
 Multi-process QEMU
 M: Elena Ufimtseva <elena.ufimtseva@oracle.com>
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] semihosting: Move hw/semihosting/ -> semihosting/
  2021-02-26 13:13 ` Philippe Mathieu-Daudé
@ 2021-02-26 13:13   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marek Vasut, Peter Maydell, Aleksandar Rikalo, qemu-riscv,
	Sagar Karandikar, Bastian Koppelmann, Chris Wulff,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Alex Bennée, Max Filippov, Michael Walle, qemu-arm,
	Alistair Francis, Paolo Bonzini, Guan Xuetao,
	Philippe Mathieu-Daudé,
	Palmer Dabbelt, Aurelien Jarno

With the exception of hw/core/, the hw/ directory only contains
device models used in system emulation. Semihosting is also used
by user emulation. As a generic feature, move it out of hw/ directory.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build                                       | 1 +
 {hw/semihosting => semihosting}/common-semi.h     | 0
 {hw/semihosting => semihosting}/arm-compat-semi.c | 0
 {hw/semihosting => semihosting}/config.c          | 0
 {hw/semihosting => semihosting}/console.c         | 0
 Kconfig                                           | 1 +
 MAINTAINERS                                       | 2 +-
 hw/Kconfig                                        | 1 -
 hw/meson.build                                    | 1 -
 {hw/semihosting => semihosting}/Kconfig           | 0
 {hw/semihosting => semihosting}/meson.build       | 0
 11 files changed, 3 insertions(+), 3 deletions(-)
 rename {hw/semihosting => semihosting}/common-semi.h (100%)
 rename {hw/semihosting => semihosting}/arm-compat-semi.c (100%)
 rename {hw/semihosting => semihosting}/config.c (100%)
 rename {hw/semihosting => semihosting}/console.c (100%)
 rename {hw/semihosting => semihosting}/Kconfig (100%)
 rename {hw/semihosting => semihosting}/meson.build (100%)

diff --git a/meson.build b/meson.build
index 05a67c20d93..f2f9bb92520 100644
--- a/meson.build
+++ b/meson.build
@@ -1934,6 +1934,7 @@
 subdir('monitor')
 subdir('net')
 subdir('replay')
+subdir('semihosting')
 subdir('hw')
 subdir('accel')
 subdir('plugins')
diff --git a/hw/semihosting/common-semi.h b/semihosting/common-semi.h
similarity index 100%
rename from hw/semihosting/common-semi.h
rename to semihosting/common-semi.h
diff --git a/hw/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
similarity index 100%
rename from hw/semihosting/arm-compat-semi.c
rename to semihosting/arm-compat-semi.c
diff --git a/hw/semihosting/config.c b/semihosting/config.c
similarity index 100%
rename from hw/semihosting/config.c
rename to semihosting/config.c
diff --git a/hw/semihosting/console.c b/semihosting/console.c
similarity index 100%
rename from hw/semihosting/console.c
rename to semihosting/console.c
diff --git a/Kconfig b/Kconfig
index bf694c42afe..d52ebd839b3 100644
--- a/Kconfig
+++ b/Kconfig
@@ -2,3 +2,4 @@ source Kconfig.host
 source backends/Kconfig
 source accel/Kconfig
 source hw/Kconfig
+source semihosting/Kconfig
diff --git a/MAINTAINERS b/MAINTAINERS
index aacd4408125..9046b54cb2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3224,7 +3224,7 @@ F: qapi/rdma.json
 Semihosting
 M: Alex Bennée <alex.bennee@linaro.org>
 S: Maintained
-F: hw/semihosting/
+F: semihosting/
 F: include/semihosting/
 
 Multi-process QEMU
diff --git a/hw/Kconfig b/hw/Kconfig
index 8ea26479c48..ff40bd3f7bb 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -31,7 +31,6 @@ source remote/Kconfig
 source rtc/Kconfig
 source scsi/Kconfig
 source sd/Kconfig
-source semihosting/Kconfig
 source smbios/Kconfig
 source ssi/Kconfig
 source timer/Kconfig
diff --git a/hw/meson.build b/hw/meson.build
index e615d72d4df..8ba79b1a528 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -30,7 +30,6 @@
 subdir('rtc')
 subdir('scsi')
 subdir('sd')
-subdir('semihosting')
 subdir('smbios')
 subdir('ssi')
 subdir('timer')
diff --git a/hw/semihosting/Kconfig b/semihosting/Kconfig
similarity index 100%
rename from hw/semihosting/Kconfig
rename to semihosting/Kconfig
diff --git a/hw/semihosting/meson.build b/semihosting/meson.build
similarity index 100%
rename from hw/semihosting/meson.build
rename to semihosting/meson.build
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] semihosting: Move hw/semihosting/ -> semihosting/
@ 2021-02-26 13:13   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-26 13:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Paolo Bonzini, Guan Xuetao, Jiaxun Yang, Laurent Vivier,
	Chris Wulff, qemu-arm, Philippe Mathieu-Daudé,
	Aleksandar Rikalo, qemu-riscv, Max Filippov, Marek Vasut,
	Palmer Dabbelt, Alex Bennée, Aurelien Jarno, Peter Maydell,
	Michael Walle, Philippe Mathieu-Daudé

With the exception of hw/core/, the hw/ directory only contains
device models used in system emulation. Semihosting is also used
by user emulation. As a generic feature, move it out of hw/ directory.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build                                       | 1 +
 {hw/semihosting => semihosting}/common-semi.h     | 0
 {hw/semihosting => semihosting}/arm-compat-semi.c | 0
 {hw/semihosting => semihosting}/config.c          | 0
 {hw/semihosting => semihosting}/console.c         | 0
 Kconfig                                           | 1 +
 MAINTAINERS                                       | 2 +-
 hw/Kconfig                                        | 1 -
 hw/meson.build                                    | 1 -
 {hw/semihosting => semihosting}/Kconfig           | 0
 {hw/semihosting => semihosting}/meson.build       | 0
 11 files changed, 3 insertions(+), 3 deletions(-)
 rename {hw/semihosting => semihosting}/common-semi.h (100%)
 rename {hw/semihosting => semihosting}/arm-compat-semi.c (100%)
 rename {hw/semihosting => semihosting}/config.c (100%)
 rename {hw/semihosting => semihosting}/console.c (100%)
 rename {hw/semihosting => semihosting}/Kconfig (100%)
 rename {hw/semihosting => semihosting}/meson.build (100%)

diff --git a/meson.build b/meson.build
index 05a67c20d93..f2f9bb92520 100644
--- a/meson.build
+++ b/meson.build
@@ -1934,6 +1934,7 @@
 subdir('monitor')
 subdir('net')
 subdir('replay')
+subdir('semihosting')
 subdir('hw')
 subdir('accel')
 subdir('plugins')
diff --git a/hw/semihosting/common-semi.h b/semihosting/common-semi.h
similarity index 100%
rename from hw/semihosting/common-semi.h
rename to semihosting/common-semi.h
diff --git a/hw/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
similarity index 100%
rename from hw/semihosting/arm-compat-semi.c
rename to semihosting/arm-compat-semi.c
diff --git a/hw/semihosting/config.c b/semihosting/config.c
similarity index 100%
rename from hw/semihosting/config.c
rename to semihosting/config.c
diff --git a/hw/semihosting/console.c b/semihosting/console.c
similarity index 100%
rename from hw/semihosting/console.c
rename to semihosting/console.c
diff --git a/Kconfig b/Kconfig
index bf694c42afe..d52ebd839b3 100644
--- a/Kconfig
+++ b/Kconfig
@@ -2,3 +2,4 @@ source Kconfig.host
 source backends/Kconfig
 source accel/Kconfig
 source hw/Kconfig
+source semihosting/Kconfig
diff --git a/MAINTAINERS b/MAINTAINERS
index aacd4408125..9046b54cb2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3224,7 +3224,7 @@ F: qapi/rdma.json
 Semihosting
 M: Alex Bennée <alex.bennee@linaro.org>
 S: Maintained
-F: hw/semihosting/
+F: semihosting/
 F: include/semihosting/
 
 Multi-process QEMU
diff --git a/hw/Kconfig b/hw/Kconfig
index 8ea26479c48..ff40bd3f7bb 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -31,7 +31,6 @@ source remote/Kconfig
 source rtc/Kconfig
 source scsi/Kconfig
 source sd/Kconfig
-source semihosting/Kconfig
 source smbios/Kconfig
 source ssi/Kconfig
 source timer/Kconfig
diff --git a/hw/meson.build b/hw/meson.build
index e615d72d4df..8ba79b1a528 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -30,7 +30,6 @@
 subdir('rtc')
 subdir('scsi')
 subdir('sd')
-subdir('semihosting')
 subdir('smbios')
 subdir('ssi')
 subdir('timer')
diff --git a/hw/semihosting/Kconfig b/semihosting/Kconfig
similarity index 100%
rename from hw/semihosting/Kconfig
rename to semihosting/Kconfig
diff --git a/hw/semihosting/meson.build b/semihosting/meson.build
similarity index 100%
rename from hw/semihosting/meson.build
rename to semihosting/meson.build
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] semihosting: Move it out of hw/
  2021-02-26 13:13 ` Philippe Mathieu-Daudé
@ 2021-03-02 14:10   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-02 14:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Claudio Fontana
  Cc: Marek Vasut, Peter Maydell, Aleksandar Rikalo, qemu-riscv,
	Sagar Karandikar, Bastian Koppelmann, Chris Wulff,
	Laurent Vivier, Max Filippov, Michael Walle, qemu-arm,
	Alistair Francis, Paolo Bonzini, Guan Xuetao, Alex Bennée,
	Palmer Dabbelt, Aurelien Jarno

Cc'ing Claudio.

On 2/26/21 2:13 PM, Philippe Mathieu-Daudé wrote:
> In order to reduce CONFIG_USER_ONLY uses in hw/, move
> semihosting out of it, being a generic feature.
> 
> Philippe Mathieu-Daudé (2):
>   semihosting: Move include/hw/semihosting/ -> include/semihosting/
>   semihosting: Move hw/semihosting/ -> semihosting/
> 
>  meson.build                                       | 1 +
>  include/{hw => }/semihosting/console.h            | 0
>  include/{hw => }/semihosting/semihost.h           | 0
>  {hw/semihosting => semihosting}/common-semi.h     | 0
>  gdbstub.c                                         | 2 +-
>  hw/mips/malta.c                                   | 2 +-
>  linux-user/aarch64/cpu_loop.c                     | 2 +-
>  linux-user/arm/cpu_loop.c                         | 2 +-
>  linux-user/riscv/cpu_loop.c                       | 2 +-
>  linux-user/semihost.c                             | 2 +-
>  {hw/semihosting => semihosting}/arm-compat-semi.c | 6 +++---
>  {hw/semihosting => semihosting}/config.c          | 2 +-
>  {hw/semihosting => semihosting}/console.c         | 4 ++--
>  softmmu/vl.c                                      | 2 +-
>  stubs/semihost.c                                  | 2 +-
>  target/arm/helper.c                               | 4 ++--
>  target/arm/m_helper.c                             | 4 ++--
>  target/arm/translate-a64.c                        | 2 +-
>  target/arm/translate.c                            | 2 +-
>  target/lm32/helper.c                              | 2 +-
>  target/m68k/op_helper.c                           | 2 +-
>  target/mips/cpu.c                                 | 2 +-
>  target/mips/mips-semi.c                           | 4 ++--
>  target/mips/translate.c                           | 2 +-
>  target/nios2/helper.c                             | 2 +-
>  target/riscv/cpu_helper.c                         | 2 +-
>  target/unicore32/helper.c                         | 2 +-
>  target/xtensa/translate.c                         | 2 +-
>  target/xtensa/xtensa-semi.c                       | 2 +-
>  Kconfig                                           | 1 +
>  MAINTAINERS                                       | 4 ++--
>  hw/Kconfig                                        | 1 -
>  hw/meson.build                                    | 1 -
>  {hw/semihosting => semihosting}/Kconfig           | 0
>  {hw/semihosting => semihosting}/meson.build       | 0
>  35 files changed, 35 insertions(+), 35 deletions(-)
>  rename include/{hw => }/semihosting/console.h (100%)
>  rename include/{hw => }/semihosting/semihost.h (100%)
>  rename {hw/semihosting => semihosting}/common-semi.h (100%)
>  rename {hw/semihosting => semihosting}/arm-compat-semi.c (99%)
>  rename {hw/semihosting => semihosting}/config.c (99%)
>  rename {hw/semihosting => semihosting}/console.c (98%)
>  rename {hw/semihosting => semihosting}/Kconfig (100%)
>  rename {hw/semihosting => semihosting}/meson.build (100%)
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] semihosting: Move it out of hw/
@ 2021-03-02 14:10   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-02 14:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Claudio Fontana
  Cc: Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Paolo Bonzini, Guan Xuetao, Jiaxun Yang, Laurent Vivier,
	Chris Wulff, qemu-arm, Aleksandar Rikalo, qemu-riscv,
	Max Filippov, Marek Vasut, Palmer Dabbelt, Alex Bennée,
	Aurelien Jarno, Peter Maydell, Michael Walle

Cc'ing Claudio.

On 2/26/21 2:13 PM, Philippe Mathieu-Daudé wrote:
> In order to reduce CONFIG_USER_ONLY uses in hw/, move
> semihosting out of it, being a generic feature.
> 
> Philippe Mathieu-Daudé (2):
>   semihosting: Move include/hw/semihosting/ -> include/semihosting/
>   semihosting: Move hw/semihosting/ -> semihosting/
> 
>  meson.build                                       | 1 +
>  include/{hw => }/semihosting/console.h            | 0
>  include/{hw => }/semihosting/semihost.h           | 0
>  {hw/semihosting => semihosting}/common-semi.h     | 0
>  gdbstub.c                                         | 2 +-
>  hw/mips/malta.c                                   | 2 +-
>  linux-user/aarch64/cpu_loop.c                     | 2 +-
>  linux-user/arm/cpu_loop.c                         | 2 +-
>  linux-user/riscv/cpu_loop.c                       | 2 +-
>  linux-user/semihost.c                             | 2 +-
>  {hw/semihosting => semihosting}/arm-compat-semi.c | 6 +++---
>  {hw/semihosting => semihosting}/config.c          | 2 +-
>  {hw/semihosting => semihosting}/console.c         | 4 ++--
>  softmmu/vl.c                                      | 2 +-
>  stubs/semihost.c                                  | 2 +-
>  target/arm/helper.c                               | 4 ++--
>  target/arm/m_helper.c                             | 4 ++--
>  target/arm/translate-a64.c                        | 2 +-
>  target/arm/translate.c                            | 2 +-
>  target/lm32/helper.c                              | 2 +-
>  target/m68k/op_helper.c                           | 2 +-
>  target/mips/cpu.c                                 | 2 +-
>  target/mips/mips-semi.c                           | 4 ++--
>  target/mips/translate.c                           | 2 +-
>  target/nios2/helper.c                             | 2 +-
>  target/riscv/cpu_helper.c                         | 2 +-
>  target/unicore32/helper.c                         | 2 +-
>  target/xtensa/translate.c                         | 2 +-
>  target/xtensa/xtensa-semi.c                       | 2 +-
>  Kconfig                                           | 1 +
>  MAINTAINERS                                       | 4 ++--
>  hw/Kconfig                                        | 1 -
>  hw/meson.build                                    | 1 -
>  {hw/semihosting => semihosting}/Kconfig           | 0
>  {hw/semihosting => semihosting}/meson.build       | 0
>  35 files changed, 35 insertions(+), 35 deletions(-)
>  rename include/{hw => }/semihosting/console.h (100%)
>  rename include/{hw => }/semihosting/semihost.h (100%)
>  rename {hw/semihosting => semihosting}/common-semi.h (100%)
>  rename {hw/semihosting => semihosting}/arm-compat-semi.c (99%)
>  rename {hw/semihosting => semihosting}/config.c (99%)
>  rename {hw/semihosting => semihosting}/console.c (98%)
>  rename {hw/semihosting => semihosting}/Kconfig (100%)
>  rename {hw/semihosting => semihosting}/meson.build (100%)
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] semihosting: Move it out of hw/
  2021-03-02 14:10   ` Philippe Mathieu-Daudé
  (?)
@ 2021-03-02 14:46   ` Claudio Fontana
  -1 siblings, 0 replies; 11+ messages in thread
From: Claudio Fontana @ 2021-03-02 14:46 UTC (permalink / raw)
  To: qemu-devel

Hi Philippe,

On 3/2/21 3:10 PM, Philippe Mathieu-Daudé wrote:
> Cc'ing Claudio.
> 
> On 2/26/21 2:13 PM, Philippe Mathieu-Daudé wrote:
>> In order to reduce CONFIG_USER_ONLY uses in hw/, move
>> semihosting out of it, being a generic feature.

I have nothing against it, just what does this buy us?

Maybe I am just missing the point..

Ciao,

Claudio

>>
>> Philippe Mathieu-Daudé (2):
>>   semihosting: Move include/hw/semihosting/ -> include/semihosting/
>>   semihosting: Move hw/semihosting/ -> semihosting/
>>
>>  meson.build                                       | 1 +
>>  include/{hw => }/semihosting/console.h            | 0
>>  include/{hw => }/semihosting/semihost.h           | 0
>>  {hw/semihosting => semihosting}/common-semi.h     | 0
>>  gdbstub.c                                         | 2 +-
>>  hw/mips/malta.c                                   | 2 +-
>>  linux-user/aarch64/cpu_loop.c                     | 2 +-
>>  linux-user/arm/cpu_loop.c                         | 2 +-
>>  linux-user/riscv/cpu_loop.c                       | 2 +-
>>  linux-user/semihost.c                             | 2 +-
>>  {hw/semihosting => semihosting}/arm-compat-semi.c | 6 +++---
>>  {hw/semihosting => semihosting}/config.c          | 2 +-
>>  {hw/semihosting => semihosting}/console.c         | 4 ++--
>>  softmmu/vl.c                                      | 2 +-
>>  stubs/semihost.c                                  | 2 +-
>>  target/arm/helper.c                               | 4 ++--
>>  target/arm/m_helper.c                             | 4 ++--
>>  target/arm/translate-a64.c                        | 2 +-
>>  target/arm/translate.c                            | 2 +-
>>  target/lm32/helper.c                              | 2 +-
>>  target/m68k/op_helper.c                           | 2 +-
>>  target/mips/cpu.c                                 | 2 +-
>>  target/mips/mips-semi.c                           | 4 ++--
>>  target/mips/translate.c                           | 2 +-
>>  target/nios2/helper.c                             | 2 +-
>>  target/riscv/cpu_helper.c                         | 2 +-
>>  target/unicore32/helper.c                         | 2 +-
>>  target/xtensa/translate.c                         | 2 +-
>>  target/xtensa/xtensa-semi.c                       | 2 +-
>>  Kconfig                                           | 1 +
>>  MAINTAINERS                                       | 4 ++--
>>  hw/Kconfig                                        | 1 -
>>  hw/meson.build                                    | 1 -
>>  {hw/semihosting => semihosting}/Kconfig           | 0
>>  {hw/semihosting => semihosting}/meson.build       | 0
>>  35 files changed, 35 insertions(+), 35 deletions(-)
>>  rename include/{hw => }/semihosting/console.h (100%)
>>  rename include/{hw => }/semihosting/semihost.h (100%)
>>  rename {hw/semihosting => semihosting}/common-semi.h (100%)
>>  rename {hw/semihosting => semihosting}/arm-compat-semi.c (99%)
>>  rename {hw/semihosting => semihosting}/config.c (99%)
>>  rename {hw/semihosting => semihosting}/console.c (98%)
>>  rename {hw/semihosting => semihosting}/Kconfig (100%)
>>  rename {hw/semihosting => semihosting}/meson.build (100%)
>>
> 
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] semihosting: Move it out of hw/
  2021-02-26 13:13 ` Philippe Mathieu-Daudé
@ 2021-03-05 10:13   ` Alex Bennée
  -1 siblings, 0 replies; 11+ messages in thread
From: Alex Bennée @ 2021-03-05 10:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Marek Vasut, Peter Maydell, Aleksandar Rikalo, qemu-riscv,
	Sagar Karandikar, Bastian Koppelmann, Chris Wulff, qemu-devel,
	Laurent Vivier, Max Filippov, Michael Walle, qemu-arm,
	Alistair Francis, Paolo Bonzini, Guan Xuetao,
	Philippe Mathieu-Daudé,
	Palmer Dabbelt, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> In order to reduce CONFIG_USER_ONLY uses in hw/, move
> semihosting out of it, being a generic feature.

Queued to semihosting/next, thanks.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] semihosting: Move it out of hw/
@ 2021-03-05 10:13   ` Alex Bennée
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Bennée @ 2021-03-05 10:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Alistair Francis, Sagar Karandikar,
	Bastian Koppelmann, Paolo Bonzini, Guan Xuetao, Jiaxun Yang,
	Laurent Vivier, Chris Wulff, qemu-arm,
	Philippe Mathieu-Daudé,
	Aleksandar Rikalo, qemu-riscv, Max Filippov, Marek Vasut,
	Palmer Dabbelt, Aurelien Jarno, Peter Maydell, Michael Walle


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> In order to reduce CONFIG_USER_ONLY uses in hw/, move
> semihosting out of it, being a generic feature.

Queued to semihosting/next, thanks.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-05 10:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 13:13 [PATCH 0/2] semihosting: Move it out of hw/ Philippe Mathieu-Daudé
2021-02-26 13:13 ` Philippe Mathieu-Daudé
2021-02-26 13:13 ` [PATCH 1/2] semihosting: Move include/hw/semihosting/ -> include/semihosting/ Philippe Mathieu-Daudé
2021-02-26 13:13   ` Philippe Mathieu-Daudé
2021-02-26 13:13 ` [PATCH 2/2] semihosting: Move hw/semihosting/ -> semihosting/ Philippe Mathieu-Daudé
2021-02-26 13:13   ` Philippe Mathieu-Daudé
2021-03-02 14:10 ` [PATCH 0/2] semihosting: Move it out of hw/ Philippe Mathieu-Daudé
2021-03-02 14:10   ` Philippe Mathieu-Daudé
2021-03-02 14:46   ` Claudio Fontana
2021-03-05 10:13 ` Alex Bennée
2021-03-05 10:13   ` Alex Bennée

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.