semihosting: Move it out of hw/
Subsystems (2)
cover semihosting: Move it out of hw/
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%)Signature · 1 line
2.26.2
PATCH 1/2 semihosting: Move include/hw/semihosting/ -> include/semihosting/
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)
---
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%)include/semihosting/console.h renamed from include/hw/semihosting/console.h +0 -0
include/semihosting/semihost.h renamed from include/hw/semihosting/semihost.h +0 -0
gdbstub.c +1 -1
@@ -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"
hw/mips/malta.c +1 -1
@@ -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"
hw/semihosting/arm-compat-semi.c +3 -3
@@ -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
hw/semihosting/config.c +1 -1
@@ -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"
hw/semihosting/console.c +2 -2
@@ -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"
linux-user/aarch64/cpu_loop.c +1 -1
@@ -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) \
linux-user/arm/cpu_loop.c +1 -1
@@ -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)); \
linux-user/riscv/cpu_loop.c +1 -1
@@ -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) {
linux-user/semihost.c +1 -1
@@ -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>
softmmu/vl.c +1 -1
@@ -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"
stubs/semihost.c +1 -1
@@ -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 */
target/arm/helper.c +2 -2
@@ -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 */
target/arm/m_helper.c +2 -2
@@ -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,
target/arm/translate-a64.c +1 -1
@@ -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"
target/arm/translate.c +1 -1
@@ -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"
target/lm32/helper.c +1 -1
@@ -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,
target/m68k/op_helper.c +1 -1
@@ -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 )
target/mips/cpu.c +1 -1
@@ -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"
target/mips/mips-semi.c +2 -2
@@ -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,
target/mips/translate.c +1 -1
@@ -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"
target/nios2/helper.c +1 -1
@@ -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 )
target/riscv/cpu_helper.c +1 -1
@@ -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) {
target/unicore32/helper.c +1 -1
@@ -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
target/xtensa/translate.c +1 -1
@@ -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"
target/xtensa/xtensa-semi.c +1 -1
@@ -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"
MAINTAINERS +1 -1
@@ -3225,7 +3225,7 @@ Semihosting M: Alex Bennée <[email protected]> S: Maintained F: hw/semihosting/ -F: include/hw/semihosting/ +F: include/semihosting/ Multi-process QEMU M: Elena Ufimtseva <[email protected]>
Signature · 1 line
2.26.2
PATCH 2/2 semihosting: Move hw/semihosting/ -> semihosting/
In reply to 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.
---
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%)meson.build +1 -0
@@ -1934,6 +1934,7 @@ subdir('monitor') subdir('net') subdir('replay') +subdir('semihosting') subdir('hw') subdir('accel') subdir('plugins')
semihosting/common-semi.h renamed from hw/semihosting/common-semi.h +0 -0
semihosting/arm-compat-semi.c renamed from hw/semihosting/arm-compat-semi.c +0 -0
semihosting/config.c renamed from hw/semihosting/config.c +0 -0
semihosting/console.c renamed from hw/semihosting/console.c +0 -0
Kconfig +1 -0
@@ -2,3 +2,4 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig source hw/Kconfig +source semihosting/Kconfig
MAINTAINERS +1 -1
@@ -3224,7 +3224,7 @@ F: qapi/rdma.json Semihosting M: Alex Bennée <[email protected]> S: Maintained -F: hw/semihosting/ +F: semihosting/ F: include/semihosting/ Multi-process QEMU
hw/Kconfig +0 -1
@@ -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
hw/meson.build +0 -1
@@ -30,7 +30,6 @@ subdir('rtc') subdir('scsi') subdir('sd') -subdir('semihosting') subdir('smbios') subdir('ssi') subdir('timer')
semihosting/Kconfig renamed from hw/semihosting/Kconfig +0 -0
semihosting/meson.build renamed from hw/semihosting/meson.build +0 -0
Signature · 1 line
2.26.2
Cc'ing Claudio.
Quoted 52 lines · Philippe Mathieu-Daudé
In order to reduce
CONFIG_USER_ONLYuses in hw/, move semihosting out of it, being a generic feature.Philippe Mathieu-Daudé (2):
semihosting: Moveinclude/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%)
Hi Philippe,
Quoted 5 lines · Philippe Mathieu-Daudé
Cc'ing Claudio.
Quoted 2 lines · Philippe Mathieu-Daudé
In order to reduce
CONFIG_USER_ONLYuses 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
Quoted 52 lines
Quoted 50 lines
Philippe Mathieu-Daudé (2):
semihosting: Moveinclude/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%)
Alex Bennée
AppliedQuoted 2 lines · Philippe Mathieu-Daudé
In order to reduce
CONFIG_USER_ONLYuses in hw/, move semihosting out of it, being a generic feature.
Queued to semihosting/next, thanks.
Signature · 1 line
Alex Bennée