Skip to contentSkip to conversation

misc: Rename 'softmmu' -> 'system'

PATCH Applied Philippe Mathieu-Daudé 8 participants 28 messages Oct 4, 2023 – Oct 6, 2023

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover misc: Rename 'softmmu' -> 'system'

This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'.

Now that Richard posted its "tcg: Allow softmmu for user-only" series, this is particularly relevant:
https://lore.kernel.org/qemu-devel/[email protected]/

Philippe Mathieu-Daudé (13):
softmmu/trace-events: Fix a typo
travis-ci: Correct invalid mentions of 'softmmu' by 'system'
cpu: Correct invalid mentions of 'softmmu' by 'system-mode'
fuzz: Correct invalid mentions of 'softmmu' by 'system'
tcg: Correct invalid mentions of 'softmmu' by 'system-mode'
accel: Rename accel_softmmu* -> accel_system*
gdbstub: Rename 'softmmu' -> 'system'
semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user() target/i386: Rename i386_softmmu_kvm_ss -> i386_kvm_ss hw/virtio/meson: Rename softmmu_virtio_ss -> system_virtio_ss
meson: Rename softmmu_mods -> system_mods
meson: Rename target_softmmu_arch -> target_system_arch
system: Rename softmmu/ directory as system/

 MAINTAINERS                                   | 44 +++++++++----------
 docs/devel/build-system.rst                   |  4 +-
 docs/devel/qtest.rst                          |  2 +-
 docs/devel/testing.rst                        |  2 +-
 tests/tcg/s390x/pgm-specification.mak         |  2 +-
 meson.build                                   | 22 +++++-----
 accel/{accel-softmmu.h => accel-system.h}     |  6 +--
 gdbstub/internals.h                           |  4 +-
 include/qemu/atomic128.h                      |  4 +-
 .../{softmmu-uaccess.h => uaccess.h}          | 24 +++++-----
 include/sysemu/runstate-action.h              |  2 +-
 include/tcg/tcg-op-common.h                   |  2 +-
 softmmu/trace.h                               |  1 -
 {softmmu => system}/timers-state.h            |  0
 system/trace.h                                |  1 +
 tests/qtest/fuzz/fuzz.h                       |  4 +-
 accel/accel-common.c                          |  2 +-
 accel/{accel-softmmu.c => accel-system.c}     |  6 +--
 accel/tcg/user-exec.c                         |  2 +-
 cpu.c                                         |  2 +-
 gdbstub/{softmmu.c => system.c}               |  2 +-
 hw/core/cpu-common.c                          |  4 +-
 semihosting/arm-compat-semi.c                 |  4 +-
 semihosting/config.c                          |  2 +-
 semihosting/guestfd.c                         |  2 +-
 semihosting/syscalls.c                        |  2 +-
 semihosting/uaccess.c                         | 14 +++---
 stubs/semihost.c                              |  4 +-
 {softmmu => system}/arch_init.c               |  0
 {softmmu => system}/async-teardown.c          |  0
 {softmmu => system}/balloon.c                 |  0
 {softmmu => system}/bootdevice.c              |  0
 {softmmu => system}/cpu-throttle.c            |  0
 {softmmu => system}/cpu-timers.c              |  0
 {softmmu => system}/cpus.c                    |  0
 {softmmu => system}/datadir.c                 |  0
 {softmmu => system}/device_tree.c             |  0
 {softmmu => system}/dirtylimit.c              |  0
 {softmmu => system}/dma-helpers.c             |  0
 {softmmu => system}/globals.c                 |  0
 {softmmu => system}/icount.c                  |  0
 {softmmu => system}/ioport.c                  |  0
 {softmmu => system}/main.c                    |  0
 {softmmu => system}/memory.c                  |  2 +-
 {softmmu => system}/memory_mapping.c          |  0
 {softmmu => system}/physmem.c                 |  6 ++-
 {softmmu => system}/qdev-monitor.c            |  0
 {softmmu => system}/qemu-seccomp.c            |  0
 {softmmu => system}/qtest.c                   |  0
 {softmmu => system}/rtc.c                     |  0
 {softmmu => system}/runstate-action.c         |  0
 {softmmu => system}/runstate-hmp-cmds.c       |  0
 {softmmu => system}/runstate.c                |  0
 {softmmu => system}/tpm-hmp-cmds.c            |  0
 {softmmu => system}/tpm.c                     |  0
 {softmmu => system}/vl.c                      |  0
 {softmmu => system}/watchpoint.c              |  0
 target/m68k/m68k-semi.c                       |  2 +-
 target/mips/tcg/sysemu/mips-semi.c            |  2 +-
 target/nios2/nios2-semi.c                     |  2 +-
 target/riscv/vector_helper.c                  |  2 +-
 tcg/region.c                                  |  4 +-
 tcg/tcg.c                                     | 11 ++---
 tests/qtest/fuzz/fuzz.c                       |  2 +-
 tests/tcg/multiarch/system/memory.c           |  4 +-
 tcg/aarch64/tcg-target.c.inc                  |  4 +-
 tcg/arm/tcg-target.c.inc                      |  2 +-
 tcg/i386/tcg-target.c.inc                     |  2 +-
 tcg/loongarch64/tcg-target.c.inc              |  4 +-
 tcg/mips/tcg-target.c.inc                     |  4 +-
 tcg/ppc/tcg-target.c.inc                      |  4 +-
 tcg/riscv/tcg-target.c.inc                    |  4 +-
 tcg/s390x/tcg-target.c.inc                    |  4 +-
 tcg/sparc64/tcg-target.c.inc                  |  4 +-
 .travis.yml                                   |  4 +-
 accel/meson.build                             |  2 +-
 accel/stubs/meson.build                       | 10 ++---
 gdbstub/meson.build                           | 10 ++---
 gdbstub/trace-events                          |  2 +-
 hw/virtio/meson.build                         | 22 +++++-----
 scripts/checkpatch.pl                         |  2 +-
 scripts/coverity-scan/COMPONENTS.md           |  2 +-
 scripts/get_maintainer.pl                     |  2 +-
 {softmmu => system}/meson.build               |  0
 {softmmu => system}/trace-events              |  2 +-
 target/alpha/meson.build                      |  2 +-
 target/arm/meson.build                        |  2 +-
 target/avr/meson.build                        |  2 +-
 target/cris/meson.build                       |  2 +-
 target/hppa/meson.build                       |  2 +-
 target/i386/kvm/meson.build                   | 10 ++---
 target/i386/meson.build                       |  2 +-
 target/loongarch/meson.build                  |  2 +-
 target/m68k/meson.build                       |  2 +-
 target/microblaze/meson.build                 |  2 +-
 target/mips/meson.build                       |  2 +-
 target/nios2/meson.build                      |  2 +-
 target/openrisc/meson.build                   |  2 +-
 target/ppc/meson.build                        |  2 +-
 target/riscv/meson.build                      |  2 +-
 target/rx/meson.build                         |  2 +-
 target/s390x/meson.build                      |  2 +-
 target/sh4/meson.build                        |  2 +-
 target/sparc/meson.build                      |  2 +-
 target/tricore/meson.build                    |  2 +-
 target/xtensa/meson.build                     |  2 +-
 tcg/meson.build                               |  6 +--
 tests/tcg/Makefile.target                     |  2 +-
 tests/tcg/multiarch/gdbstub/interrupt.py      |  2 +-
 tests/tcg/multiarch/gdbstub/memory.py         |  2 +-
 tests/tcg/s390x/pgm-specification-softmmu.S   |  2 +-
 tests/tcg/s390x/softmmu.ld                    |  2 +-
 tests/tcg/xtensa/Makefile.softmmu-target      |  2 +-
 tests/tcg/xtensaeb/Makefile.softmmu-target    |  2 +-
 tests/unit/meson.build                        |  2 +-
 115 files changed, 188 insertions(+), 181 deletions(-)
 rename accel/{accel-softmmu.h => accel-system.h} (77%)
 rename include/semihosting/{softmmu-uaccess.h => uaccess.h} (75%)
 delete mode 100644 softmmu/trace.h
 rename {softmmu => system}/timers-state.h (100%)
 create mode 100644 system/trace.h
 rename accel/{accel-softmmu.c => accel-system.c} (96%)
 rename gdbstub/{softmmu.c => system.c} (99%)
 rename {softmmu => system}/arch_init.c (100%)
 rename {softmmu => system}/async-teardown.c (100%)
 rename {softmmu => system}/balloon.c (100%)
 rename {softmmu => system}/bootdevice.c (100%)
 rename {softmmu => system}/cpu-throttle.c (100%)
 rename {softmmu => system}/cpu-timers.c (100%)
 rename {softmmu => system}/cpus.c (100%)
 rename {softmmu => system}/datadir.c (100%)
 rename {softmmu => system}/device_tree.c (100%)
 rename {softmmu => system}/dirtylimit.c (100%)
 rename {softmmu => system}/dma-helpers.c (100%)
 rename {softmmu => system}/globals.c (100%)
 rename {softmmu => system}/icount.c (100%)
 rename {softmmu => system}/ioport.c (100%)
 rename {softmmu => system}/main.c (100%)
 rename {softmmu => system}/memory.c (99%)
 rename {softmmu => system}/memory_mapping.c (100%)
 rename {softmmu => system}/physmem.c (99%)
 rename {softmmu => system}/qdev-monitor.c (100%)
 rename {softmmu => system}/qemu-seccomp.c (100%)
 rename {softmmu => system}/qtest.c (100%)
 rename {softmmu => system}/rtc.c (100%)
 rename {softmmu => system}/runstate-action.c (100%)
 rename {softmmu => system}/runstate-hmp-cmds.c (100%)
 rename {softmmu => system}/runstate.c (100%)
 rename {softmmu => system}/tpm-hmp-cmds.c (100%)
 rename {softmmu => system}/tpm.c (100%)
 rename {softmmu => system}/vl.c (100%)
 rename {softmmu => system}/watchpoint.c (100%)
 rename {softmmu => system}/meson.build (100%)
 rename {softmmu => system}/trace-events (99%)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/13 softmmu/trace-events: Fix a typo

Commit 8af3f5c6d6 ("softmmu: add trace point when bdrv_flush_all fails") added calls to trace_vm_stop_flush_all() in 'cpus.c'.

---
 softmmu/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/trace-events +1 -1
index 22606dc27b..69c9044151 100644
@@ -21,7 +21,7 @@ flatview_destroy(void *view, void *root) "%p (root %p)"
 flatview_destroy_rcu(void *view, void *root) "%p (root %p)"
 global_dirty_changed(unsigned int bitmask) "bitmask 0x%"PRIx32
 
-# softmmu.c
+# cpus.c
 vm_stop_flush_all(int ret) "ret %d"
 
 # vl.c
Signature · 1 line
2.41.0
#2 lore raw

PATCH 2/13 travis-ci: Correct invalid mentions of 'softmmu' by 'system'

In reply to Philippe Mathieu-Daudé
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.travis.yml +2 -2
index b958eca5de..76859d48da 100644
@@ -34,7 +34,7 @@ env:
     - BASE_CONFIG="--disable-docs --disable-tools"
     - TEST_BUILD_CMD=""
     - TEST_CMD="make check V=1"
-    # This is broadly a list of "mainline" softmmu targets which have support across the major distros
+    # This is broadly a list of "mainline" system targets which have support across the major distros
     - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
     - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
     - CCACHE_MAXSIZE=1G
@@ -197,7 +197,7 @@ jobs:
               $(exit $BUILD_RC);
           fi
 
-    - name: "[s390x] GCC (other-softmmu)"
+    - name: "[s390x] GCC (other-system)"
       arch: s390x
       dist: focal
       addons:
Signature · 1 line
2.41.0
#3 lore raw

PATCH 3/13 cpu: Correct invalid mentions of 'softmmu' by 'system-mode'

In reply to Philippe Mathieu-Daudé
---
 cpu.c                | 2 +-
 hw/core/cpu-common.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
cpu.c +1 -1
index 0769b0b153..8cb6790142 100644
@@ -209,7 +209,7 @@ static Property cpu_common_props[] = {
                      prctl_unalign_sigbus, false),
 #else
     /*
-     * Create a memory property for softmmu CPU object, so users can
+     * Create a memory property for system CPU object, so users can
      * wire up its memory.  The default if no link is set up is to use
      * the system address space.
      */
hw/core/cpu-common.c +2 -2
index ced66c2b34..f04d59c8d5 100644
@@ -228,8 +228,8 @@ static void cpu_common_initfn(Object *obj)
     cpu->cpu_index = UNASSIGNED_CPU_INDEX;
     cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;
     cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
-    /* *-user doesn't have configurable SMP topology */
-    /* the default value is changed by qemu_init_vcpu() for softmmu */
+    /* user-mode doesn't have configurable SMP topology */
+    /* the default value is changed by qemu_init_vcpu() for system-mode */
     cpu->nr_cores = 1;
     cpu->nr_threads = 1;
     cpu->cflags_next_tb = -1;
Signature · 1 line
2.41.0
#4 lore raw

PATCH 4/13 fuzz: Correct invalid mentions of 'softmmu' by 'system'

In reply to Philippe Mathieu-Daudé
---
 tests/qtest/fuzz/fuzz.h | 4 ++--
 softmmu/memory.c        | 2 +-
 tests/qtest/fuzz/fuzz.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
tests/qtest/fuzz/fuzz.h +2 -2
index 21d1362d65..7da0bc3d7e 100644
@@ -49,13 +49,13 @@ typedef struct FuzzTarget {
 
 
     /*
-     * Returns the arguments that are passed to qemu/softmmu init(). Freed by
+     * Returns the arguments that are passed to qemu/system init(). Freed by
      * the caller.
      */
     GString *(*get_init_cmdline)(struct FuzzTarget *);
 
     /*
-     * will run once, prior to running qemu/softmmu init.
+     * will run once, prior to running qemu/system init.
      * eg: set up shared-memory for communication with the child-process
      * Can be NULL
      */
softmmu/memory.c +1 -1
index 234bd7b116..fa1c99f9ba 100644
@@ -3638,7 +3638,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
 }
 
 /*
- * Support softmmu builds with CONFIG_FUZZ using a weak symbol and a stub for
+ * Support system builds with CONFIG_FUZZ using a weak symbol and a stub for
  * the fuzz_dma_read_cb callback
  */
 #ifdef CONFIG_FUZZ
tests/qtest/fuzz/fuzz.c +1 -1
index 3bedb81b32..9b9c9f9c36 100644
@@ -207,7 +207,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
         fuzz_target->pre_vm_init();
     }
 
-    /* Run QEMU's softmmu main with the fuzz-target dependent arguments */
+    /* Run QEMU's system main with the fuzz-target dependent arguments */
     cmd_line = fuzz_target->get_init_cmdline(fuzz_target);
     g_string_append_printf(cmd_line, " %s -qtest /dev/null ",
                            getenv("QTEST_LOG") ? "" : "-qtest-log none");
Signature · 1 line
2.41.0
Reviewed-by on v1 4/13
#5 lore raw

Re: [PATCH 04/13] fuzz: Correct invalid mentions of 'softmmu' by 'system'

Thank you

Quoted 56 lines · Philippe Mathieu-Daudé
---
 tests/qtest/fuzz/fuzz.h | 4 ++--
 softmmu/memory.c        | 2 +-
 tests/qtest/fuzz/fuzz.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
tests/qtest/fuzz/fuzz.h +2 -2
index 21d1362d65..7da0bc3d7e 100644
@@ -49,13 +49,13 @@ typedef struct FuzzTarget {
 
 
     /*
-     * Returns the arguments that are passed to qemu/softmmu init(). Freed by
+     * Returns the arguments that are passed to qemu/system init(). Freed by
      * the caller.
      */
     GString *(*get_init_cmdline)(struct FuzzTarget *);
 
     /*
-     * will run once, prior to running qemu/softmmu init.
+     * will run once, prior to running qemu/system init.
      * eg: set up shared-memory for communication with the child-process
      * Can be NULL
      */
softmmu/memory.c +1 -1
index 234bd7b116..fa1c99f9ba 100644
@@ -3638,7 +3638,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
 }
 
 /*
- * Support softmmu builds with CONFIG_FUZZ using a weak symbol and a stub for
+ * Support system builds with CONFIG_FUZZ using a weak symbol and a stub for
  * the fuzz_dma_read_cb callback
  */
 #ifdef CONFIG_FUZZ
tests/qtest/fuzz/fuzz.c +1 -1
index 3bedb81b32..9b9c9f9c36 100644
@@ -207,7 +207,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
         fuzz_target->pre_vm_init();
     }
 
-    /* Run QEMU's softmmu main with the fuzz-target dependent arguments */
+    /* Run QEMU's system main with the fuzz-target dependent arguments */
     cmd_line = fuzz_target->get_init_cmdline(fuzz_target);
     g_string_append_printf(cmd_line, " %s -qtest /dev/null ",
                            getenv("QTEST_LOG") ? "" : "-qtest-log none");
Signature · 1 line
2.41.0
#6 lore raw

PATCH 5/13 tcg: Correct invalid mentions of 'softmmu' by 'system-mode'

In reply to Philippe Mathieu-Daudé
---
 docs/devel/testing.rst                      |  2 +-
 tests/tcg/s390x/pgm-specification.mak       |  2 +-
 include/qemu/atomic128.h                    |  4 ++--
 include/tcg/tcg-op-common.h                 |  2 +-
 accel/tcg/user-exec.c                       |  2 +-
 target/riscv/vector_helper.c                |  2 +-
 tcg/region.c                                |  4 ++--
 tcg/tcg.c                                   | 11 ++++++-----
 tests/tcg/multiarch/system/memory.c         |  4 ++--
 tcg/aarch64/tcg-target.c.inc                |  4 ++--
 tcg/arm/tcg-target.c.inc                    |  2 +-
 tcg/i386/tcg-target.c.inc                   |  2 +-
 tcg/loongarch64/tcg-target.c.inc            |  4 ++--
 tcg/mips/tcg-target.c.inc                   |  4 ++--
 tcg/ppc/tcg-target.c.inc                    |  4 ++--
 tcg/riscv/tcg-target.c.inc                  |  4 ++--
 tcg/s390x/tcg-target.c.inc                  |  4 ++--
 tcg/sparc64/tcg-target.c.inc                |  4 ++--
 tcg/meson.build                             |  6 +++---
 tests/tcg/Makefile.target                   |  2 +-
 tests/tcg/multiarch/gdbstub/interrupt.py    |  2 +-
 tests/tcg/multiarch/gdbstub/memory.py       |  2 +-
 tests/tcg/s390x/pgm-specification-softmmu.S |  2 +-
 tests/tcg/s390x/softmmu.ld                  |  2 +-
 tests/tcg/xtensa/Makefile.softmmu-target    |  2 +-
 tests/tcg/xtensaeb/Makefile.softmmu-target  |  2 +-
 26 files changed, 43 insertions(+), 42 deletions(-)
docs/devel/testing.rst +1 -1
index 5d1fc0aa95..f3e2472189 100644
@@ -1458,7 +1458,7 @@ TCG test dependencies
 ~~~~~~~~~~~~~~~~~~~~~
 
 The TCG tests are deliberately very light on dependencies and are
-either totally bare with minimal gcc lib support (for softmmu tests)
+either totally bare with minimal gcc lib support (for system-mode tests)
 or just glibc (for linux-user tests). This is because getting a cross
 compiler to work with additional libraries can be challenging.
 
tests/tcg/s390x/pgm-specification.mak +1 -1
index 2999aee26e..73dc47af0d 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 # List of specification exception tests.
-# Shared between the softmmu and the user makefiles.
+# Shared between the system and the user makefiles.
 PGM_SPECIFICATION_TESTS = \
 	br-odd \
 	cgrl-unaligned \
include/qemu/atomic128.h +2 -2
index 34554bf0ac..88af6d4ea3 100644
@@ -43,8 +43,8 @@
  * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
  *
  * This interpretation is not especially helpful for QEMU.
- * For softmmu, all RAM is always read/write from the hypervisor.
- * For user-only, if the guest doesn't implement such an __atomic_read
+ * For system-mode, all RAM is always read/write from the hypervisor.
+ * For user-mode, if the guest doesn't implement such an __atomic_read
  * then the host need not worry about it either.
  *
  * Moreover, using libatomic is not an option, because its interface is
include/tcg/tcg-op-common.h +1 -1
index a53b15933b..2048f92b5e 100644
@@ -265,7 +265,7 @@ void tcg_gen_exit_tb(const TranslationBlock *tb, unsigned idx);
  *
  * See tcg/README for more info about this TCG operation.
  *
- * NOTE: In softmmu emulation, direct jumps with goto_tb are only safe within
+ * NOTE: In system emulation, direct jumps with goto_tb are only safe within
  * the pages this TB resides in because we don't take care of direct jumps when
  * address mapping changes, e.g. in tlb_flush(). In user mode, there's only a
  * static address translation, so the destination address is always valid, TBs
accel/tcg/user-exec.c +1 -1
index ab48cb41e4..6c1e8ec5a5 100644
@@ -939,7 +939,7 @@ void *page_get_target_data(target_ulong address)
 void page_reset_target_data(target_ulong start, target_ulong last) { }
 #endif /* TARGET_PAGE_DATA_SIZE */
 
-/* The softmmu versions of these helpers are in cputlb.c.  */
+/* The system-mode versions of these helpers are in cputlb.c.  */
 
 static void *cpu_mmu_lookup(CPUArchState *env, vaddr addr,
                             MemOp mop, uintptr_t ra, MMUAccessType type)
target/riscv/vector_helper.c +1 -1
index cba02c1320..c9b39fb67f 100644
@@ -100,7 +100,7 @@ static inline target_ulong adjust_addr(CPURISCVState *env, target_ulong addr)
 /*
  * This function checks watchpoint before real load operation.
  *
- * In softmmu mode, the TLB API probe_access is enough for watchpoint check.
+ * In system mode, the TLB API probe_access is enough for watchpoint check.
  * In user mode, there is no watchpoint support now.
  *
  * It will trigger an exception if there is no mapping in TLB
tcg/region.c +2 -2
index a078899096..86692455c0 100644
@@ -733,7 +733,7 @@ static int alloc_code_gen_buffer(size_t size, int splitwx, Error **errp)
  * and then assigning regions to TCG threads so that the threads can translate
  * code in parallel without synchronization.
  *
- * In softmmu the number of TCG threads is bounded by max_cpus, so we use at
+ * In system-mode the number of TCG threads is bounded by max_cpus, so we use at
  * least max_cpus regions in MTTCG. In !MTTCG we use a single region.
  * Note that the TCG options from the command-line (i.e. -accel accel=tcg,[...])
  * must have been parsed before calling this function, since it calls
@@ -749,7 +749,7 @@ static int alloc_code_gen_buffer(size_t size, int splitwx, Error **errp)
  *
  * However, this user-mode limitation is unlikely to be a significant problem
  * in practice. Multi-threaded guests share most if not all of their translated
- * code, which makes parallel code generation less appealing than in softmmu.
+ * code, which makes parallel code generation less appealing than in system-mode
  */
 void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus)
 {
tcg/tcg.c +6 -5
index ea94d0fbff..2f56456b25 100644
@@ -751,12 +751,13 @@ static void alloc_tcg_plugin_context(TCGContext *s)
  * In user-mode we just point tcg_ctx to tcg_init_ctx. See the documentation
  * of tcg_region_init() for the reasoning behind this.
  *
- * In softmmu each caller registers its context in tcg_ctxs[]. Note that in
- * softmmu tcg_ctxs[] does not track tcg_ctx_init, since the initial context
+ * In system-mode each caller registers its context in tcg_ctxs[]. Note that in
+ * system-mode tcg_ctxs[] does not track tcg_ctx_init, since the initial context
  * is not used anymore for translation once this function is called.
  *
- * Not tracking tcg_init_ctx in tcg_ctxs[] in softmmu keeps code that iterates
- * over the array (e.g. tcg_code_size() the same for both softmmu and user-mode.
+ * Not tracking tcg_init_ctx in tcg_ctxs[] in system-mode keeps code that
+ * iterates over the array (e.g. tcg_code_size() the same for both system/user
+ * modes.
  */
 #ifdef CONFIG_USER_ONLY
 void tcg_register_thread(void)
@@ -1340,7 +1341,7 @@ static void tcg_context_init(unsigned max_cpus)
      * In user-mode we simply share the init context among threads, since we
      * use a single region. See the documentation tcg_region_init() for the
      * reasoning behind this.
-     * In softmmu we will have at most max_cpus TCG threads.
+     * In system-mode we will have at most max_cpus TCG threads.
      */
 #ifdef CONFIG_USER_ONLY
     tcg_ctxs = &tcg_ctx;
tests/tcg/multiarch/system/memory.c +2 -2
index e29786ae55..6eb2eb16f7 100644
@@ -1,14 +1,14 @@
 /*
  * Memory Test
  *
- * This is intended to test the softmmu code and ensure we properly
+ * This is intended to test the system-mode code and ensure we properly
  * behave across normal and unaligned accesses across several pages.
  * We are not replicating memory tests for stuck bits and other
  * hardware level failures but looking for issues with different size
  * accesses when access is:
  *
  *   - unaligned at various sizes (if -DCHECK_UNALIGNED set)
- *   - spanning a (softmmu) page
+ *   - spanning a (system) page
  *   - sign extension when loading
  */
 
tcg/aarch64/tcg-target.c.inc +2 -2
index 06ea3c7652..88a243a310 100644
@@ -1643,8 +1643,8 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
 #define MIN_TLB_MASK_TABLE_OFS  -512
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/arm/tcg-target.c.inc +1 -1
index b1d56362a7..ec3f9250c2 100644
@@ -353,7 +353,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
 #define ALL_VECTOR_REGS   0xffff0000u
 
 /*
- * r0-r3 will be overwritten when reading the tlb entry (softmmu only);
+ * r0-r3 will be overwritten when reading the tlb entry (system-mode only);
  * r14 will be overwritten by the BLNE branching to the slow path.
  */
 #ifdef CONFIG_SOFTMMU
tcg/i386/tcg-target.c.inc +1 -1
index 4e47151241..788d608150 100644
@@ -2276,7 +2276,7 @@ static void tcg_out_qemu_st_direct(TCGContext *s, TCGReg datalo, TCGReg datahi,
     int movop = OPC_MOVL_EvGv;
 
     /*
-     * Do big-endian stores with movbe or softmmu.
+     * Do big-endian stores with movbe or system-mode.
      * User-only without movbe will have its swapping done generically.
      */
     if (memop & MO_BSWAP) {
tcg/loongarch64/tcg-target.c.inc +2 -2
index b701df50db..879a05ace4 100644
@@ -891,8 +891,8 @@ bool tcg_target_has_memory_bswap(MemOp memop)
 #define MIN_TLB_MASK_TABLE_OFS  -(1 << 11)
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/mips/tcg-target.c.inc +2 -2
index f52bda4828..e2892edc6a 100644
@@ -1258,8 +1258,8 @@ bool tcg_target_has_memory_bswap(MemOp memop)
 #define MIN_TLB_MASK_TABLE_OFS  -32768
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/ppc/tcg-target.c.inc +2 -2
index 90d76c2c2c..5c873b2161 100644
@@ -2091,8 +2091,8 @@ bool tcg_target_has_memory_bswap(MemOp memop)
 #define MIN_TLB_MASK_TABLE_OFS  -32768
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/riscv/tcg-target.c.inc +2 -2
index c2bcdea33f..d6dbcaf3cb 100644
@@ -1227,8 +1227,8 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
 #define MIN_TLB_MASK_TABLE_OFS  -(1 << 11)
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/s390x/tcg-target.c.inc +2 -2
index 7552f63a05..4ef9ac3d5b 100644
@@ -1750,8 +1750,8 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
 #define MIN_TLB_MASK_TABLE_OFS  -(1 << 19)
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/sparc64/tcg-target.c.inc +2 -2
index 01ac26c192..19d9df4a09 100644
@@ -1033,8 +1033,8 @@ bool tcg_target_has_memory_bswap(MemOp memop)
 #define MIN_TLB_MASK_TABLE_OFS  -(1 << 12)
 
 /*
- * For softmmu, perform the TLB load and compare.
- * For useronly, perform any required alignment tests.
+ * For system-mode, perform the TLB load and compare.
+ * For user-mode, perform any required alignment tests.
  * In both cases, return a TCGLabelQemuLdst structure if the slow path
  * is required and fill in @h with the host address for the fast path.
  */
tcg/meson.build +3 -3
index 4be4a616ca..895a11d3fa 100644
@@ -34,12 +34,12 @@ tcg_user = declare_dependency(link_with: libtcg_user,
                               dependencies: tcg_ss.dependencies())
 user_ss.add(tcg_user)
 
-libtcg_softmmu = static_library('tcg_softmmu',
+libtcg_system = static_library('tcg_system',
                                 tcg_ss.sources() + genh,
                                 name_suffix: 'fa',
                                 c_args: '-DCONFIG_SOFTMMU',
                                 build_by_default: false)
 
-tcg_softmmu = declare_dependency(link_with: libtcg_softmmu,
+tcg_system = declare_dependency(link_with: libtcg_system,
                                  dependencies: tcg_ss.dependencies())
-system_ss.add(tcg_softmmu)
+system_ss.add(tcg_system)
tests/tcg/Makefile.target +1 -1
index 462289f47c..f3a189c9d4 100644
@@ -120,7 +120,7 @@ endif
 %: %.S
 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 else
-# For softmmu targets we include a different Makefile fragment as the
+# For system targets we include a different Makefile fragment as the
 # build options for bare programs are usually pretty different. They
 # are expected to provide their own build recipes.
 EXTRA_CFLAGS += -ffreestanding
tests/tcg/multiarch/gdbstub/interrupt.py +1 -1
index e222ac94c5..c016e7afbb 100644
@@ -1,6 +1,6 @@
 from __future__ import print_function
 #
-# Test some of the softmmu debug features with the multiarch memory
+# Test some of the system debug features with the multiarch memory
 # test. It is a port of the original vmlinux focused test case but
 # using the "memory" test instead.
 #
tests/tcg/multiarch/gdbstub/memory.py +1 -1
index dd25e72281..fb1d06b7bb 100644
@@ -1,6 +1,6 @@
 from __future__ import print_function
 #
-# Test some of the softmmu debug features with the multiarch memory
+# Test some of the system debug features with the multiarch memory
 # test. It is a port of the original vmlinux focused test case but
 # using the "memory" test instead.
 #
tests/tcg/s390x/pgm-specification-softmmu.S +1 -1
index d534f4e505..86c340aeef 100644
@@ -1,5 +1,5 @@
 /*
- * Common softmmu code for specification exception testing.
+ * Common system code for specification exception testing.
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
tests/tcg/s390x/softmmu.ld +1 -1
index ea944eaa3c..c7a8864407 100644
@@ -1,5 +1,5 @@
 /*
- * Linker script for the softmmu test kernels.
+ * Linker script for the system test kernels.
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
tests/tcg/xtensa/Makefile.softmmu-target +1 -1
index 78bf72dfaa..a29571b367 100644
@@ -1,5 +1,5 @@
 #
-# Xtensa softmmu tests
+# Xtensa system tests
 #
 
 CORE=dc232b
tests/tcg/xtensaeb/Makefile.softmmu-target +1 -1
index 4204a96d53..95d0528c37 100644
@@ -1,5 +1,5 @@
 #
-# Xtensa softmmu tests
+# Xtensa system tests
 #
 
 include $(SRC_PATH)/tests/tcg/xtensa/Makefile.softmmu-target
Signature · 1 line
2.41.0
#7 lore raw

PATCH 6/13 accel: Rename accel_softmmu* -> accel_system*

In reply to Philippe Mathieu-Daudé

Rename accel.softmmu -> accel.system in file paths and the register_types() method.

Rename sysemu_stubs_ss -> system_stubs_ss in meson following the pattern used on other source set names.

---
 accel/{accel-softmmu.h => accel-system.h} |  6 +++---
 accel/accel-common.c                      |  2 +-
 accel/{accel-softmmu.c => accel-system.c} |  6 +++---
 accel/meson.build                         |  2 +-
 accel/stubs/meson.build                   | 10 +++++-----
 5 files changed, 13 insertions(+), 13 deletions(-)
 rename accel/{accel-softmmu.h => accel-system.h} (77%)
 rename accel/{accel-softmmu.c => accel-system.c} (96%)
accel/accel-system.h renamed from accel/accel-softmmu.h +3 -3
similarity index 77%
rename from accel/accel-softmmu.h
rename to accel/accel-system.h
index 5e192f1882..d41c62f21b 100644
@@ -7,9 +7,9 @@
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef ACCEL_SOFTMMU_H
-#define ACCEL_SOFTMMU_H
+#ifndef ACCEL_SYSTEM_H
+#define ACCEL_SYSTEM_H
 
 void accel_init_ops_interfaces(AccelClass *ac);
 
-#endif /* ACCEL_SOFTMMU_H */
+#endif /* ACCEL_SYSTEM_H */
accel/accel-common.c +1 -1
index df72cc989a..965318daa3 100644
@@ -30,7 +30,7 @@
 #include "hw/core/accel-cpu.h"
 
 #ifndef CONFIG_USER_ONLY
-#include "accel-softmmu.h"
+#include "accel-system.h"
 #endif /* !CONFIG_USER_ONLY */
 
 static const TypeInfo accel_type = {
accel/accel-system.c renamed from accel/accel-softmmu.c +3 -3
similarity index 96%
rename from accel/accel-softmmu.c
rename to accel/accel-system.c
index 9c804ba9e3..fa8f43757c 100644
@@ -28,7 +28,7 @@
 #include "hw/boards.h"
 #include "sysemu/cpus.h"
 #include "qemu/error-report.h"
-#include "accel-softmmu.h"
+#include "accel-system.h"
 
 int accel_init_machine(AccelState *accel, MachineState *ms)
 {
@@ -99,8 +99,8 @@ static const TypeInfo accel_ops_type_info = {
     .class_size = sizeof(AccelOpsClass),
 };
 
-static void accel_softmmu_register_types(void)
+static void accel_system_register_types(void)
 {
     type_register_static(&accel_ops_type_info);
 }
-type_init(accel_softmmu_register_types);
+type_init(accel_system_register_types);
accel/meson.build +1 -1
index 638a9a03ba..3376810921 100644
@@ -1,5 +1,5 @@
 specific_ss.add(files('accel-common.c', 'accel-blocker.c'))
-system_ss.add(files('accel-softmmu.c'))
+system_ss.add(files('accel-system.c'))
 user_ss.add(files('accel-user.c'))
 
 subdir('tcg')
accel/stubs/meson.build +5 -5
index 6b0f200efe..91a2d21925 100644
@@ -1,6 +1,6 @@
-sysemu_stubs_ss = ss.source_set()
-sysemu_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
-sysemu_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
-sysemu_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
+system_stubs_ss = ss.source_set()
+system_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
+system_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
+system_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
 
-specific_ss.add_all(when: ['CONFIG_SYSTEM_ONLY'], if_true: sysemu_stubs_ss)
+specific_ss.add_all(when: ['CONFIG_SYSTEM_ONLY'], if_true: system_stubs_ss)
Signature · 1 line
2.41.0
#8 lore raw

PATCH 7/13 gdbstub: Rename 'softmmu' -> 'system'

In reply to Philippe Mathieu-Daudé

We have gdbstub/user.c for user emulation code,
use gdbstub/system.c for system emulation part.

Rename s/softmmu/system/ in meson and few comments.

---
 gdbstub/internals.h             |  4 ++--
 gdbstub/{softmmu.c => system.c} |  2 +-
 gdbstub/meson.build             | 10 +++++-----
 gdbstub/trace-events            |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
 rename gdbstub/{softmmu.c => system.c} (99%)
gdbstub/internals.h +2 -2
index fee243081f..f7fd1bede5 100644
@@ -103,7 +103,7 @@ static inline int tohex(int v)
 }
 
 /*
- * Connection helpers for both softmmu and user backends
+ * Connection helpers for both system and user backends
  */
 
 void gdb_put_strbuf(void);
@@ -229,7 +229,7 @@ void gdb_breakpoint_remove_all(CPUState *cs);
  * @is_write: is it a write operation
  *
  * This function is specialised depending on the mode we are running
- * in. For softmmu guests we can switch the interpretation of the
+ * in. For system guests we can switch the interpretation of the
  * address to a physical address.
  */
 int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
gdbstub/system.c renamed from gdbstub/softmmu.c +1 -1
similarity index 99%
rename from gdbstub/softmmu.c
rename to gdbstub/system.c
index 9f0b8b5497..189975b1d6 100644
@@ -104,7 +104,7 @@ static void gdb_chr_event(void *opaque, QEMUChrEvent event)
 }
 
 /*
- * In softmmu mode we stop the VM and wait to send the syscall packet
+ * In system-mode we stop the VM and wait to send the syscall packet
  * until notification that the CPU has stopped. This must be done
  * because if the packet is sent now the reply from the syscall
  * request could be received while the CPU is still in the running
gdbstub/meson.build +5 -5
index a5a1f4e433..e5bccba34e 100644
@@ -1,6 +1,6 @@
 #
 # The main gdbstub still relies on per-build definitions of various
-# types. The bits pushed to softmmu/user.c try to use guest agnostic
+# types. The bits pushed to system/user.c try to use guest agnostic
 # types such as hwaddr.
 #
 
@@ -12,7 +12,7 @@ gdb_system_ss = ss.source_set()
 
 # We build two versions of gdbstub, one for each mode
 gdb_user_ss.add(files('gdbstub.c', 'user.c'))
-gdb_system_ss.add(files('gdbstub.c', 'softmmu.c'))
+gdb_system_ss.add(files('gdbstub.c', 'system.c'))
 
 gdb_user_ss = gdb_user_ss.apply(config_targetos, strict: false)
 gdb_system_ss = gdb_system_ss.apply(config_targetos, strict: false)
@@ -23,15 +23,15 @@ libgdb_user = static_library('gdb_user',
                              c_args: '-DCONFIG_USER_ONLY',
                              build_by_default: false)
 
-libgdb_softmmu = static_library('gdb_softmmu',
+libgdb_system = static_library('gdb_system',
                                 gdb_system_ss.sources() + genh,
                                 name_suffix: 'fa',
                                 build_by_default: false)
 
 gdb_user = declare_dependency(link_whole: libgdb_user)
 user_ss.add(gdb_user)
-gdb_softmmu = declare_dependency(link_whole: libgdb_softmmu)
-system_ss.add(gdb_softmmu)
+gdb_system = declare_dependency(link_whole: libgdb_system)
+system_ss.add(gdb_system)
 
 common_ss.add(files('syscalls.c'))
 
gdbstub/trace-events +1 -1
index 7bc79a73c4..4fd126a38c 100644
@@ -28,5 +28,5 @@ gdbstub_err_checksum_invalid(uint8_t ch) "got invalid command checksum digit: 0x
 gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command packet with incorrect checksum, expected=0x%02x, received=0x%02x"
 gdbstub_err_unexpected_runpkt(uint8_t ch) "unexpected packet (0x%02x) while target running"
 
-# softmmu.c
+# system.c
 gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr) "Watchpoint hit, type=\"%s\" cpu=%d, vaddr=0x%" PRIx64 ""
Signature · 1 line
2.41.0
Acked-by on v1 7/13
#9 lore raw

Re: [PATCH 07/13] gdbstub: Rename 'softmmu' -> 'system'

Quoted 6 lines · Philippe Mathieu-Daudé

We have gdbstub/user.c for user emulation code,
use gdbstub/system.c for system emulation part.

Rename s/softmmu/system/ in meson and few comments.

Quoted 97 lines
---
 gdbstub/internals.h             |  4 ++--
 gdbstub/{softmmu.c => system.c} |  2 +-
 gdbstub/meson.build             | 10 +++++-----
 gdbstub/trace-events            |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
 rename gdbstub/{softmmu.c => system.c} (99%)
gdbstub/internals.h +2 -2
index fee243081f..f7fd1bede5 100644
@@ -103,7 +103,7 @@ static inline int tohex(int v)
 }
 
 /*
- * Connection helpers for both softmmu and user backends
+ * Connection helpers for both system and user backends
  */
 
 void gdb_put_strbuf(void);
@@ -229,7 +229,7 @@ void gdb_breakpoint_remove_all(CPUState *cs);
  * @is_write: is it a write operation
  *
  * This function is specialised depending on the mode we are running
- * in. For softmmu guests we can switch the interpretation of the
+ * in. For system guests we can switch the interpretation of the
  * address to a physical address.
  */
 int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
gdbstub/system.c renamed from gdbstub/softmmu.c +1 -1
similarity index 99%
rename from gdbstub/softmmu.c
rename to gdbstub/system.c
index 9f0b8b5497..189975b1d6 100644
@@ -104,7 +104,7 @@ static void gdb_chr_event(void *opaque, QEMUChrEvent event)
 }
 
 /*
- * In softmmu mode we stop the VM and wait to send the syscall packet
+ * In system-mode we stop the VM and wait to send the syscall packet
  * until notification that the CPU has stopped. This must be done
  * because if the packet is sent now the reply from the syscall
  * request could be received while the CPU is still in the running
gdbstub/meson.build +5 -5
index a5a1f4e433..e5bccba34e 100644
@@ -1,6 +1,6 @@
 #
 # The main gdbstub still relies on per-build definitions of various
-# types. The bits pushed to softmmu/user.c try to use guest agnostic
+# types. The bits pushed to system/user.c try to use guest agnostic
 # types such as hwaddr.
 #
 
@@ -12,7 +12,7 @@ gdb_system_ss = ss.source_set()
 
 # We build two versions of gdbstub, one for each mode
 gdb_user_ss.add(files('gdbstub.c', 'user.c'))
-gdb_system_ss.add(files('gdbstub.c', 'softmmu.c'))
+gdb_system_ss.add(files('gdbstub.c', 'system.c'))
 
 gdb_user_ss = gdb_user_ss.apply(config_targetos, strict: false)
 gdb_system_ss = gdb_system_ss.apply(config_targetos, strict: false)
@@ -23,15 +23,15 @@ libgdb_user = static_library('gdb_user',
                              c_args: '-DCONFIG_USER_ONLY',
                              build_by_default: false)
 
-libgdb_softmmu = static_library('gdb_softmmu',
+libgdb_system = static_library('gdb_system',
                                 gdb_system_ss.sources() + genh,
                                 name_suffix: 'fa',
                                 build_by_default: false)
 
 gdb_user = declare_dependency(link_whole: libgdb_user)
 user_ss.add(gdb_user)
-gdb_softmmu = declare_dependency(link_whole: libgdb_softmmu)
-system_ss.add(gdb_softmmu)
+gdb_system = declare_dependency(link_whole: libgdb_system)
+system_ss.add(gdb_system)
 
 common_ss.add(files('syscalls.c'))
 
gdbstub/trace-events +1 -1
index 7bc79a73c4..4fd126a38c 100644
@@ -28,5 +28,5 @@ gdbstub_err_checksum_invalid(uint8_t ch) "got invalid command checksum digit: 0x
 gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command packet with incorrect checksum, expected=0x%02x, received=0x%02x"
 gdbstub_err_unexpected_runpkt(uint8_t ch) "unexpected packet (0x%02x) while target running"
 
-# softmmu.c
+# system.c
 gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr) "Watchpoint hit, type=\"%s\" cpu=%d, vaddr=0x%" PRIx64 ""
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#10 lore raw

PATCH 8/13 semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user()

In reply to Philippe Mathieu-Daudé

Add a check in 'softmmu-uaccess.h' that the header is only include in system emulation, and rename it as 'uaccess.h'.

Rename the API methods:

- softmmu_[un]lock_user*() -> uaccess_[un]lock_user*()
- softmmu_strlen_user() -> uaccess_strlen_user().

Update a pair of comments.

---
 .../{softmmu-uaccess.h => uaccess.h}          | 24 +++++++++++--------
 semihosting/arm-compat-semi.c                 |  4 ++--
 semihosting/config.c                          |  2 +-
 semihosting/guestfd.c                         |  2 +-
 semihosting/syscalls.c                        |  2 +-
 semihosting/uaccess.c                         | 14 +++++------
 stubs/semihost.c                              |  4 ++--
 target/m68k/m68k-semi.c                       |  2 +-
 target/mips/tcg/sysemu/mips-semi.c            |  2 +-
 target/nios2/nios2-semi.c                     |  2 +-
 10 files changed, 31 insertions(+), 27 deletions(-)
 rename include/semihosting/{softmmu-uaccess.h => uaccess.h} (75%)
include/semihosting/uaccess.h renamed from include/semihosting/softmmu-uaccess.h +14 -10
similarity index 75%
rename from include/semihosting/softmmu-uaccess.h
rename to include/semihosting/uaccess.h
index 4f08dfc098..3963eafc3e 100644
@@ -7,8 +7,12 @@
  * This code is licensed under the GPL
  */
 
-#ifndef SEMIHOSTING_SOFTMMU_UACCESS_H
-#define SEMIHOSTING_SOFTMMU_UACCESS_H
+#ifndef SEMIHOSTING_UACCESS_H
+#define SEMIHOSTING_UACCESS_H
+
+#ifdef CONFIG_USER_ONLY
+#error Cannot include semihosting/uaccess.h from user emulation
+#endif
 
 #include "cpu.h"
 
@@ -42,18 +46,18 @@
 
 #define put_user_ual(arg, p) put_user_u32(arg, p)
 
-void *softmmu_lock_user(CPUArchState *env, target_ulong addr,
+void *uaccess_lock_user(CPUArchState *env, target_ulong addr,
                         target_ulong len, bool copy);
-#define lock_user(type, p, len, copy) softmmu_lock_user(env, p, len, copy)
+#define lock_user(type, p, len, copy) uaccess_lock_user(env, p, len, copy)
 
-char *softmmu_lock_user_string(CPUArchState *env, target_ulong addr);
-#define lock_user_string(p) softmmu_lock_user_string(env, p)
+char *uaccess_lock_user_string(CPUArchState *env, target_ulong addr);
+#define lock_user_string(p) uaccess_lock_user_string(env, p)
 
-void softmmu_unlock_user(CPUArchState *env, void *p,
+void uaccess_unlock_user(CPUArchState *env, void *p,
                          target_ulong addr, target_ulong len);
-#define unlock_user(s, args, len) softmmu_unlock_user(env, s, args, len)
+#define unlock_user(s, args, len) uaccess_unlock_user(env, s, args, len)
 
-ssize_t softmmu_strlen_user(CPUArchState *env, target_ulong addr);
-#define target_strlen(p) softmmu_strlen_user(env, p)
+ssize_t uaccess_strlen_user(CPUArchState *env, target_ulong addr);
+#define target_strlen(p) uaccess_strlen_user(env, p)
 
 #endif /* SEMIHOSTING_SOFTMMU_UACCESS_H */
semihosting/arm-compat-semi.c +2 -2
index 564fe17f75..bb43f01265 100644
@@ -202,13 +202,13 @@ static LayoutInfo common_semi_find_bases(CPUState *cs)
  * The semihosting API has no concept of its errno being thread-safe,
  * as the API design predates SMP CPUs and was intended as a simple
  * real-hardware set of debug functionality. For QEMU, we make the
- * errno be per-thread in linux-user mode; in softmmu it is a simple
+ * errno be per-thread in linux-user mode; in system-mode it is a simple
  * global, and we assume that the guest takes care of avoiding any races.
  */
 #ifndef CONFIG_USER_ONLY
 static target_ulong syscall_err;
 
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #endif
 
 static inline uint32_t get_swi_errno(CPUState *cs)
semihosting/config.c +1 -1
index 8ca569735d..61e4016fc5 100644
@@ -12,7 +12,7 @@
  * linux-user targets. However in that use case no configuration of
  * the outputs and command lines is supported.
  *
- * The config module is common to all softmmu targets however as vl.c
+ * The config module is common to all system targets however as vl.c
  * needs to link against the helpers.
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
semihosting/guestfd.c +1 -1
index acb86b50dd..955c2efbd0 100644
@@ -15,7 +15,7 @@
 #ifdef CONFIG_USER_ONLY
 #include "qemu.h"
 #else
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #include CONFIG_DEVICES
 #endif
 
semihosting/syscalls.c +1 -1
index d27574a1e2..4060211d19 100644
@@ -15,7 +15,7 @@
 #ifdef CONFIG_USER_ONLY
 #include "qemu.h"
 #else
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #endif
 
 
semihosting/uaccess.c +7 -7
index 7505eb6d1b..5d889f9263 100644
@@ -9,9 +9,9 @@
 
 #include "qemu/osdep.h"
 #include "exec/exec-all.h"
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 
-void *softmmu_lock_user(CPUArchState *env, target_ulong addr,
+void *uaccess_lock_user(CPUArchState *env, target_ulong addr,
                         target_ulong len, bool copy)
 {
     void *p = malloc(len);
@@ -24,7 +24,7 @@ void *softmmu_lock_user(CPUArchState *env, target_ulong addr,
     return p;
 }
 
-ssize_t softmmu_strlen_user(CPUArchState *env, target_ulong addr)
+ssize_t uaccess_strlen_user(CPUArchState *env, target_ulong addr)
 {
     int mmu_idx = cpu_mmu_index(env, false);
     size_t len = 0;
@@ -72,16 +72,16 @@ ssize_t softmmu_strlen_user(CPUArchState *env, target_ulong addr)
     }
 }
 
-char *softmmu_lock_user_string(CPUArchState *env, target_ulong addr)
+char *uaccess_lock_user_string(CPUArchState *env, target_ulong addr)
 {
-    ssize_t len = softmmu_strlen_user(env, addr);
+    ssize_t len = uaccess_strlen_user(env, addr);
     if (len < 0) {
         return NULL;
     }
-    return softmmu_lock_user(env, addr, len + 1, true);
+    return uaccess_lock_user(env, addr, len + 1, true);
 }
 
-void softmmu_unlock_user(CPUArchState *env, void *p,
+void uaccess_unlock_user(CPUArchState *env, void *p,
                          target_ulong addr, target_ulong len)
 {
     if (len) {
stubs/semihost.c +2 -2
index aad7a70353..9343d385d7 100644
@@ -1,9 +1,9 @@
 /*
- * Semihosting Stubs for SoftMMU
+ * Semihosting Stubs for system emulation
  *
  * Copyright (c) 2019 Linaro Ltd
  *
- * Stubs for SoftMMU targets that don't actually do semihosting.
+ * Stubs for system targets that don't actually do semihosting.
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
target/m68k/m68k-semi.c +1 -1
index 80cd8d70db..b4ffb70f8b 100644
@@ -27,7 +27,7 @@
 #include "gdbstub/syscalls.h"
 #include "gdbstub/helpers.h"
 #include "semihosting/syscalls.h"
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #include "hw/boards.h"
 #include "qemu/log.h"
 
target/mips/tcg/sysemu/mips-semi.c +1 -1
index f3735df7b9..cc084eb1a2 100644
@@ -22,7 +22,7 @@
 #include "qemu/log.h"
 #include "gdbstub/syscalls.h"
 #include "gdbstub/helpers.h"
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #include "semihosting/semihost.h"
 #include "semihosting/console.h"
 #include "semihosting/syscalls.h"
target/nios2/nios2-semi.c +1 -1
index 9d0241c758..0b84fcb6b6 100644
@@ -26,7 +26,7 @@
 #include "gdbstub/syscalls.h"
 #include "gdbstub/helpers.h"
 #include "semihosting/syscalls.h"
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
 #include "qemu/log.h"
 
 #define HOSTED_EXIT  0
Signature · 1 line
2.41.0
#11 lore raw

PATCH 9/13 target/i386: Rename i386_softmmu_kvm_ss -> i386_kvm_ss

In reply to Philippe Mathieu-Daudé

Software MMU is TCG specific. Here 'softmmu' is misused for system emulation. Anyhow, since KVM is system emulation specific, just rename as 'i386_kvm_ss'.

---
 target/i386/kvm/meson.build | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
target/i386/kvm/meson.build +5 -5
index 5d9174bbb5..84d9143e60 100644
@@ -1,14 +1,14 @@
-i386_softmmu_kvm_ss = ss.source_set()
+i386_kvm_ss = ss.source_set()
 
-i386_softmmu_kvm_ss.add(files(
+i386_kvm_ss.add(files(
   'kvm.c',
   'kvm-cpu.c',
 ))
 
-i386_softmmu_kvm_ss.add(when: 'CONFIG_XEN_EMU', if_true: files('xen-emu.c'))
+i386_kvm_ss.add(when: 'CONFIG_XEN_EMU', if_true: files('xen-emu.c'))
 
-i386_softmmu_kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c'))
+i386_kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c'))
 
 i386_system_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))
 
-i386_system_ss.add_all(when: 'CONFIG_KVM', if_true: i386_softmmu_kvm_ss)
+i386_system_ss.add_all(when: 'CONFIG_KVM', if_true: i386_kvm_ss)
Signature · 1 line
2.41.0
#12 lore raw

PATCH 10/13 hw/virtio/meson: Rename softmmu_virtio_ss -> system_virtio_ss

In reply to Philippe Mathieu-Daudé

See commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss") for rationale.

---
 hw/virtio/meson.build | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
hw/virtio/meson.build +11 -11
index 13e7c6c272..aad506fe52 100644
@@ -1,18 +1,18 @@
-softmmu_virtio_ss = ss.source_set()
-softmmu_virtio_ss.add(files('virtio-bus.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
-softmmu_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c'))
+system_virtio_ss = ss.source_set()
+system_virtio_ss.add(files('virtio-bus.c'))
+system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
+system_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
+system_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
+system_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c'))
+system_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
+system_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c'))
 
 specific_virtio_ss = ss.source_set()
 specific_virtio_ss.add(files('virtio.c'))
 specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c'))
 
 if have_vhost
-  softmmu_virtio_ss.add(files('vhost.c'))
+  system_virtio_ss.add(files('vhost.c'))
   specific_virtio_ss.add(files('vhost-backend.c', 'vhost-iova-tree.c'))
   if have_vhost_user
     specific_virtio_ss.add(files('vhost-user.c'))
@@ -21,7 +21,7 @@ if have_vhost
     specific_virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c'))
   endif
 else
-  softmmu_virtio_ss.add(files('vhost-stub.c'))
+  system_virtio_ss.add(files('vhost-stub.c'))
 endif
 
 specific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c'))
@@ -67,7 +67,7 @@ virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MD', if_true: files('virtio-md-pci.c'))
 
 specific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
 
-system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
+system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss)
 system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
 system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
 system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
Signature · 1 line
2.41.0
#13 lore raw

PATCH 11/13 meson: Rename softmmu_mods -> system_mods

In reply to Philippe Mathieu-Daudé

See commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss") for rationale.

---
 meson.build | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meson.build +5 -5
index 21a1bc03f8..8890dc5748 100644
@@ -3496,7 +3496,7 @@ modinfo_generate = find_program('scripts/modinfo-generate.py')
 modinfo_files = []
 
 block_mods = []
-softmmu_mods = []
+system_mods = []
 foreach d, list : modules
   if not (d == 'block' ? have_block : have_system)
     continue
@@ -3510,7 +3510,7 @@ foreach d, list : modules
       if d == 'block'
         block_mods += sl
       else
-        softmmu_mods += sl
+        system_mods += sl
       endif
       if module_ss.sources() != []
         # FIXME: Should use sl.extract_all_objects(recursive: true) as
@@ -3554,7 +3554,7 @@ foreach d, list : target_modules
                                 include_directories: target_inc,
                                 c_args: c_args,
                                 pic: true)
-            softmmu_mods += sl
+            system_mods += sl
             # FIXME: Should use sl.extract_all_objects(recursive: true) too.
             modinfo_files += custom_target(module_name + '.modinfo',
                                            output: module_name + '.modinfo',
@@ -3597,7 +3597,7 @@ block_syms = custom_target('block.syms', output: 'block.syms',
                              capture: true,
                              command: [undefsym, nm, '@INPUT@'])
 qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
-                             input: [libqemuutil, softmmu_mods],
+                             input: [libqemuutil, system_mods],
                              capture: true,
                              command: [undefsym, nm, '@INPUT@'])
 
@@ -3682,7 +3682,7 @@ common_ss.add(hwcore)
 ###########
 
 emulator_modules = []
-foreach m : block_mods + softmmu_mods
+foreach m : block_mods + system_mods
   emulator_modules += shared_module(m.name(),
                 build_by_default: true,
                 name_prefix: '',
Signature · 1 line
2.41.0
#14 lore raw

PATCH 12/13 meson: Rename target_softmmu_arch -> target_system_arch

In reply to Philippe Mathieu-Daudé

Finish the convertion started with commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss"). If the $target_type is 'system', then use the target_system_arch[] source set :)

Mechanical change doing:

  $ sed -i -e s/target_softmmu_arch/target_system_arch/g \
      $(git grep -l target_softmmu_arch)
---
 docs/devel/build-system.rst   | 4 ++--
 meson.build                   | 4 ++--
 target/alpha/meson.build      | 2 +-
 target/arm/meson.build        | 2 +-
 target/avr/meson.build        | 2 +-
 target/cris/meson.build       | 2 +-
 target/hppa/meson.build       | 2 +-
 target/i386/meson.build       | 2 +-
 target/loongarch/meson.build  | 2 +-
 target/m68k/meson.build       | 2 +-
 target/microblaze/meson.build | 2 +-
 target/mips/meson.build       | 2 +-
 target/nios2/meson.build      | 2 +-
 target/openrisc/meson.build   | 2 +-
 target/ppc/meson.build        | 2 +-
 target/riscv/meson.build      | 2 +-
 target/rx/meson.build         | 2 +-
 target/s390x/meson.build      | 2 +-
 target/sh4/meson.build        | 2 +-
 target/sparc/meson.build      | 2 +-
 target/tricore/meson.build    | 2 +-
 target/xtensa/meson.build     | 2 +-
 22 files changed, 24 insertions(+), 24 deletions(-)
docs/devel/build-system.rst +2 -2
index 0f990bb3e9..21f78da7d1 100644
@@ -225,14 +225,14 @@ Target-dependent emulator sourcesets:
   The sourceset is only used for system emulators.
 
   Each subdirectory in ``target/`` instead should add one sourceset to each
-  of the ``target_arch`` and ``target_softmmu_arch``, which are used respectively
+  of the ``target_arch`` and ``target_system_arch``, which are used respectively
   for all emulators and for system emulators only.  For example::
 
     arm_ss = ss.source_set()
     arm_system_ss = ss.source_set()
     ...
     target_arch += {'arm': arm_ss}
-    target_softmmu_arch += {'arm': arm_system_ss}
+    target_system_arch += {'arm': arm_system_ss}
 
 Module sourcesets:
   There are two dictionaries for modules: ``modules`` is used for
meson.build +2 -2
index 8890dc5748..497a85eb9f 100644
@@ -3214,7 +3214,7 @@ modules = {}
 target_modules = {}
 hw_arch = {}
 target_arch = {}
-target_softmmu_arch = {}
+target_system_arch = {}
 target_user_arch = {}
 
 ###############
@@ -3734,7 +3734,7 @@ foreach target : target_dirs
   endif
   if target.endswith('-softmmu')
     target_type='system'
-    t = target_softmmu_arch[target_base_arch].apply(config_target, strict: false)
+    t = target_system_arch[target_base_arch].apply(config_target, strict: false)
     arch_srcs += t.sources()
     arch_deps += t.dependencies()
 
target/alpha/meson.build +1 -1
index 3f5253c002..d3502dd823 100644
@@ -15,4 +15,4 @@ alpha_system_ss = ss.source_set()
 alpha_system_ss.add(files('machine.c'))
 
 target_arch += {'alpha': alpha_ss}
-target_softmmu_arch += {'alpha': alpha_system_ss}
+target_system_arch += {'alpha': alpha_system_ss}
target/arm/meson.build +1 -1
index e645e456da..5d04a8e94f 100644
@@ -35,4 +35,4 @@ else
 endif
 
 target_arch += {'arm': arm_ss}
-target_softmmu_arch += {'arm': arm_system_ss}
+target_system_arch += {'arm': arm_system_ss}
target/avr/meson.build +1 -1
index a24cf6d26d..3e172bde1c 100644
@@ -17,4 +17,4 @@ avr_ss.add(files(
 avr_system_ss.add(files('machine.c'))
 
 target_arch += {'avr': avr_ss}
-target_softmmu_arch += {'avr': avr_system_ss}
+target_system_arch += {'avr': avr_system_ss}
target/cris/meson.build +1 -1
index 07dc3a5682..bbfcdf7f7a 100644
@@ -14,4 +14,4 @@ cris_system_ss.add(files(
 ))
 
 target_arch += {'cris': cris_ss}
-target_softmmu_arch += {'cris': cris_system_ss}
+target_system_arch += {'cris': cris_system_ss}
target/hppa/meson.build +1 -1
index 59b68e82e2..f47e54f5fa 100644
@@ -20,4 +20,4 @@ hppa_system_ss.add(files(
 ))
 
 target_arch += {'hppa': hppa_ss}
-target_softmmu_arch += {'hppa': hppa_system_ss}
+target_system_arch += {'hppa': hppa_system_ss}
target/i386/meson.build +1 -1
index 6f1036d469..7c74bfa859 100644
@@ -31,5 +31,5 @@ subdir('hvf')
 subdir('tcg')
 
 target_arch += {'i386': i386_ss}
-target_softmmu_arch += {'i386': i386_system_ss}
+target_system_arch += {'i386': i386_system_ss}
 target_user_arch += {'i386': i386_user_ss}
target/loongarch/meson.build +1 -1
index 7fbf045a5d..18e8191e2b 100644
@@ -30,4 +30,4 @@ common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
 loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
 
 target_arch += {'loongarch': loongarch_ss}
-target_softmmu_arch += {'loongarch': loongarch_system_ss}
+target_system_arch += {'loongarch': loongarch_system_ss}
target/m68k/meson.build +1 -1
index 355db26c6f..8d3f9ce288 100644
@@ -16,4 +16,4 @@ m68k_system_ss.add(files(
 ))
 
 target_arch += {'m68k': m68k_ss}
-target_softmmu_arch += {'m68k': m68k_system_ss}
+target_system_arch += {'m68k': m68k_system_ss}
target/microblaze/meson.build +1 -1
index 50fd9ff378..3ed4fbb67a 100644
@@ -17,4 +17,4 @@ microblaze_system_ss.add(files(
 ))
 
 target_arch += {'microblaze': microblaze_ss}
-target_softmmu_arch += {'microblaze': microblaze_system_ss}
+target_system_arch += {'microblaze': microblaze_system_ss}
target/mips/meson.build +1 -1
index f35e8f0eca..e57ef24ecf 100644
@@ -19,5 +19,5 @@ endif
 mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
 
 target_arch += {'mips': mips_ss}
-target_softmmu_arch += {'mips': mips_system_ss}
+target_system_arch += {'mips': mips_system_ss}
 target_user_arch += {'mips': mips_user_ss}
target/nios2/meson.build +1 -1
index 8f0f9dc628..12d8abf0bd 100644
@@ -14,4 +14,4 @@ nios2_system_ss.add(files(
 ))
 
 target_arch += {'nios2': nios2_ss}
-target_softmmu_arch += {'nios2': nios2_system_ss}
+target_system_arch += {'nios2': nios2_system_ss}
target/openrisc/meson.build +1 -1
index c1cd943f78..31608b6dc7 100644
@@ -22,4 +22,4 @@ openrisc_system_ss.add(files(
 ))
 
 target_arch += {'openrisc': openrisc_ss}
-target_softmmu_arch += {'openrisc': openrisc_system_ss}
+target_system_arch += {'openrisc': openrisc_system_ss}
target/ppc/meson.build +1 -1
index 4c2635039e..97ceb6e7c0 100644
@@ -55,4 +55,4 @@ ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files(
 ))
 
 target_arch += {'ppc': ppc_ss}
-target_softmmu_arch += {'ppc': ppc_system_ss}
+target_system_arch += {'ppc': ppc_system_ss}
target/riscv/meson.build +1 -1
index 660078bda1..ff60b21d04 100644
@@ -39,4 +39,4 @@ riscv_system_ss.add(files(
 ))
 
 target_arch += {'riscv': riscv_ss}
-target_softmmu_arch += {'riscv': riscv_system_ss}
+target_system_arch += {'riscv': riscv_system_ss}
target/rx/meson.build +1 -1
index 8de0ad49b9..d196737ce3 100644
@@ -13,4 +13,4 @@ rx_ss.add(files(
   'disas.c'))
 
 target_arch += {'rx': rx_ss}
-target_softmmu_arch += {'rx': ss.source_set()}
+target_system_arch += {'rx': ss.source_set()}
target/s390x/meson.build +1 -1
index 42ed38942a..02ca43d9f0 100644
@@ -40,5 +40,5 @@ subdir('tcg')
 subdir('kvm')
 
 target_arch += {'s390x': s390x_ss}
-target_softmmu_arch += {'s390x': s390x_system_ss}
+target_system_arch += {'s390x': s390x_system_ss}
 target_user_arch += {'s390x': s390x_user_ss}
target/sh4/meson.build +1 -1
index a78e9ec7e4..fe09f96684 100644
@@ -11,4 +11,4 @@ sh4_system_ss = ss.source_set()
 sh4_system_ss.add(files('monitor.c'))
 
 target_arch += {'sh4': sh4_ss}
-target_softmmu_arch += {'sh4': sh4_system_ss}
+target_system_arch += {'sh4': sh4_system_ss}
target/sparc/meson.build +1 -1
index d32e67b287..48025cce76 100644
@@ -20,4 +20,4 @@ sparc_system_ss.add(files(
 ))
 
 target_arch += {'sparc': sparc_ss}
-target_softmmu_arch += {'sparc': sparc_system_ss}
+target_system_arch += {'sparc': sparc_system_ss}
target/tricore/meson.build +1 -1
index 34825b6048..45f49f0128 100644
@@ -12,4 +12,4 @@ tricore_ss.add(zlib)
 tricore_system_ss = ss.source_set()
 
 target_arch += {'tricore': tricore_ss}
-target_softmmu_arch += {'tricore': tricore_system_ss}
+target_system_arch += {'tricore': tricore_system_ss}
target/xtensa/meson.build +1 -1
index 95692bd75f..f8d60101e3 100644
@@ -24,4 +24,4 @@ xtensa_system_ss.add(files(
 ))
 
 target_arch += {'xtensa': xtensa_ss}
-target_softmmu_arch += {'xtensa': xtensa_system_ss}
+target_system_arch += {'xtensa': xtensa_system_ss}
Signature · 1 line
2.41.0
#15 lore raw

PATCH 13/13 system: Rename softmmu/ directory as system/

In reply to Philippe Mathieu-Daudé

The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments.

---
 MAINTAINERS                             | 44 ++++++++++++-------------
 docs/devel/qtest.rst                    |  2 +-
 meson.build                             |  8 ++---
 include/sysemu/runstate-action.h        |  2 +-
 softmmu/trace.h                         |  1 -
 {softmmu => system}/timers-state.h      |  0
 system/trace.h                          |  1 +
 {softmmu => system}/arch_init.c         |  0
 {softmmu => system}/async-teardown.c    |  0
 {softmmu => system}/balloon.c           |  0
 {softmmu => system}/bootdevice.c        |  0
 {softmmu => system}/cpu-throttle.c      |  0
 {softmmu => system}/cpu-timers.c        |  0
 {softmmu => system}/cpus.c              |  0
 {softmmu => system}/datadir.c           |  0
 {softmmu => system}/device_tree.c       |  0
 {softmmu => system}/dirtylimit.c        |  0
 {softmmu => system}/dma-helpers.c       |  0
 {softmmu => system}/globals.c           |  0
 {softmmu => system}/icount.c            |  0
 {softmmu => system}/ioport.c            |  0
 {softmmu => system}/main.c              |  0
 {softmmu => system}/memory.c            |  0
 {softmmu => system}/memory_mapping.c    |  0
 {softmmu => system}/physmem.c           |  6 ++--
 {softmmu => system}/qdev-monitor.c      |  0
 {softmmu => system}/qemu-seccomp.c      |  0
 {softmmu => system}/qtest.c             |  0
 {softmmu => system}/rtc.c               |  0
 {softmmu => system}/runstate-action.c   |  0
 {softmmu => system}/runstate-hmp-cmds.c |  0
 {softmmu => system}/runstate.c          |  0
 {softmmu => system}/tpm-hmp-cmds.c      |  0
 {softmmu => system}/tpm.c               |  0
 {softmmu => system}/vl.c                |  0
 {softmmu => system}/watchpoint.c        |  0
 scripts/checkpatch.pl                   |  2 +-
 scripts/coverity-scan/COMPONENTS.md     |  2 +-
 scripts/get_maintainer.pl               |  2 +-
 {softmmu => system}/meson.build         |  0
 {softmmu => system}/trace-events        |  0
 tests/unit/meson.build                  |  2 +-
 42 files changed, 37 insertions(+), 35 deletions(-)
 delete mode 100644 softmmu/trace.h
 rename {softmmu => system}/timers-state.h (100%)
 create mode 100644 system/trace.h
 rename {softmmu => system}/arch_init.c (100%)
 rename {softmmu => system}/async-teardown.c (100%)
 rename {softmmu => system}/balloon.c (100%)
 rename {softmmu => system}/bootdevice.c (100%)
 rename {softmmu => system}/cpu-throttle.c (100%)
 rename {softmmu => system}/cpu-timers.c (100%)
 rename {softmmu => system}/cpus.c (100%)
 rename {softmmu => system}/datadir.c (100%)
 rename {softmmu => system}/device_tree.c (100%)
 rename {softmmu => system}/dirtylimit.c (100%)
 rename {softmmu => system}/dma-helpers.c (100%)
 rename {softmmu => system}/globals.c (100%)
 rename {softmmu => system}/icount.c (100%)
 rename {softmmu => system}/ioport.c (100%)
 rename {softmmu => system}/main.c (100%)
 rename {softmmu => system}/memory.c (100%)
 rename {softmmu => system}/memory_mapping.c (100%)
 rename {softmmu => system}/physmem.c (99%)
 rename {softmmu => system}/qdev-monitor.c (100%)
 rename {softmmu => system}/qemu-seccomp.c (100%)
 rename {softmmu => system}/qtest.c (100%)
 rename {softmmu => system}/rtc.c (100%)
 rename {softmmu => system}/runstate-action.c (100%)
 rename {softmmu => system}/runstate-hmp-cmds.c (100%)
 rename {softmmu => system}/runstate.c (100%)
 rename {softmmu => system}/tpm-hmp-cmds.c (100%)
 rename {softmmu => system}/tpm.c (100%)
 rename {softmmu => system}/vl.c (100%)
 rename {softmmu => system}/watchpoint.c (100%)
 rename {softmmu => system}/meson.build (100%)
 rename {softmmu => system}/trace-events (100%)
MAINTAINERS +22 -22
index 81625f036b..2ddc3413b0 100644
@@ -137,8 +137,8 @@ Overall TCG CPUs
 M: Richard Henderson <[email protected]>
 R: Paolo Bonzini <[email protected]>
 S: Maintained
-F: softmmu/cpus.c
-F: softmmu/watchpoint.c
+F: system/cpus.c
+F: system/watchpoint.c
 F: cpus-common.c
 F: page-vary.c
 F: page-vary-common.c
@@ -2108,7 +2108,7 @@ S: Maintained
 F: docs/interop/virtio-balloon-stats.rst
 F: hw/virtio/virtio-balloon*.c
 F: include/hw/virtio/virtio-balloon.h
-F: softmmu/balloon.c
+F: system/balloon.c
 F: include/sysemu/balloon.h
 
 virtio-9p
@@ -2788,7 +2788,7 @@ Device Tree
 M: Alistair Francis <[email protected]>
 R: David Gibson <[email protected]>
 S: Maintained
-F: softmmu/device_tree.c
+F: system/device_tree.c
 F: include/sysemu/device_tree.h
 
 Dump
@@ -2844,11 +2844,11 @@ F: include/exec/memory.h
 F: include/exec/ram_addr.h
 F: include/exec/ramblock.h
 F: include/sysemu/memory_mapping.h
-F: softmmu/dma-helpers.c
-F: softmmu/ioport.c
-F: softmmu/memory.c
-F: softmmu/memory_mapping.c
-F: softmmu/physmem.c
+F: system/dma-helpers.c
+F: system/ioport.c
+F: system/memory.c
+F: system/memory_mapping.c
+F: system/physmem.c
 F: include/exec/memory-internal.h
 F: scripts/coccinelle/memory-region-housekeeping.cocci
 
@@ -2901,13 +2901,13 @@ F: include/sysemu/runstate.h
 F: include/sysemu/runstate-action.h
 F: util/main-loop.c
 F: util/qemu-timer.c
-F: softmmu/vl.c
-F: softmmu/main.c
-F: softmmu/cpus.c
-F: softmmu/cpu-throttle.c
-F: softmmu/cpu-timers.c
-F: softmmu/icount.c
-F: softmmu/runstate*
+F: system/vl.c
+F: system/main.c
+F: system/cpus.c
+F: system/cpu-throttle.c
+F: system/cpu-timers.c
+F: system/icount.c
+F: system/runstate*
 F: qapi/run-state.json
 
 Read, Copy, Update (RCU)
@@ -3081,7 +3081,7 @@ F: qapi/qom.json
 F: qapi/qdev.json
 F: scripts/coccinelle/qom-parent-type.cocci
 F: scripts/qom-cast-macro-clean-cocci-gen.py
-F: softmmu/qdev-monitor.c
+F: system/qdev-monitor.c
 F: stubs/qdev.c
 F: qom/
 F: tests/unit/check-qom-interface.c
@@ -3115,7 +3115,7 @@ M: Thomas Huth <[email protected]>
 M: Laurent Vivier <[email protected]>
 R: Paolo Bonzini <[email protected]>
 S: Maintained
-F: softmmu/qtest.c
+F: system/qtest.c
 F: accel/qtest/
 F: tests/qtest/
 F: docs/devel/qgraph.rst
@@ -3191,7 +3191,7 @@ F: scripts/simpletrace.py
 TPM
 M: Stefan Berger <[email protected]>
 S: Maintained
-F: softmmu/tpm*
+F: system/tpm*
 F: hw/tpm/*
 F: include/hw/acpi/tpm.h
 F: include/sysemu/tpm*
@@ -3226,7 +3226,7 @@ F: util/userfaultfd.c
 Migration dirty limit and dirty page rate
 M: Hyman Huang <[email protected]>
 S: Maintained
-F: softmmu/dirtylimit.c
+F: system/dirtylimit.c
 F: include/sysemu/dirtylimit.h
 F: migration/dirtyrate.c
 F: migration/dirtyrate.h
@@ -3250,7 +3250,7 @@ F: scripts/xml-preprocess*
 Seccomp
 M: Daniel P. Berrange <[email protected]>
 S: Odd Fixes
-F: softmmu/qemu-seccomp.c
+F: system/qemu-seccomp.c
 F: include/sysemu/seccomp.h
 F: tests/unit/test-seccomp.c
 
@@ -3669,7 +3669,7 @@ T: git https://github.com/stefanha/qemu.git block
 Bootdevice
 M: Gonglei <[email protected]>
 S: Maintained
-F: softmmu/bootdevice.c
+F: system/bootdevice.c
 
 Quorum
 M: Alberto Garcia <[email protected]>
docs/devel/qtest.rst +1 -1
index 0455aa06ab..c5b8546b3e 100644
@@ -81,7 +81,7 @@ which you can run manually.
 QTest Protocol
 --------------
 
-.. kernel-doc:: softmmu/qtest.c
+.. kernel-doc:: system/qtest.c
    :doc: QTest Protocol
 
 
meson.build +4 -4
index 497a85eb9f..05387853af 100644
@@ -3307,7 +3307,7 @@ if have_system
     'hw/gpio',
     'migration',
     'net',
-    'softmmu',
+    'system',
     'ui',
     'hw/remote',
   ]
@@ -3434,7 +3434,7 @@ endif
 common_ss.add(files('cpus-common.c'))
 specific_ss.add(files('cpu.c'))
 
-subdir('softmmu')
+subdir('system')
 
 # Work around a gcc bug/misfeature wherein constant propagation looks
 # through an alias:
@@ -3813,14 +3813,14 @@ foreach target : target_dirs
     execs = [{
       'name': 'qemu-system-' + target_name,
       'win_subsystem': 'console',
-      'sources': files('softmmu/main.c'),
+      'sources': files('system/main.c'),
       'dependencies': []
     }]
     if targetos == 'windows' and (sdl.found() or gtk.found())
       execs += [{
         'name': 'qemu-system-' + target_name + 'w',
         'win_subsystem': 'windows',
-        'sources': files('softmmu/main.c'),
+        'sources': files('system/main.c'),
         'dependencies': []
       }]
     endif
include/sysemu/runstate-action.h +1 -1
index cff45a047b..db4e3099ae 100644
@@ -11,7 +11,7 @@
 
 #include "qapi/qapi-commands-run-state.h"
 
-/* in softmmu/runstate-action.c */
+/* in system/runstate-action.c */
 extern RebootAction reboot_action;
 extern ShutdownAction shutdown_action;
 extern PanicAction panic_action;
softmmu/trace.h deleted +0 -1
deleted file mode 100644
index 2ad1011572..0000000000
@@ -1 +0,0 @@
-#include "trace/trace-softmmu.h"
system/timers-state.h renamed from softmmu/timers-state.h +0 -0
similarity index 100%
rename from softmmu/timers-state.h
rename to system/timers-state.h
system/trace.h new file +1 -0
new file mode 100644
index 0000000000..cd0136dcdc
@@ -0,0 +1 @@
+#include "trace/trace-system.h"
system/arch_init.c renamed from softmmu/arch_init.c +0 -0
similarity index 100%
rename from softmmu/arch_init.c
rename to system/arch_init.c
system/async-teardown.c renamed from softmmu/async-teardown.c +0 -0
similarity index 100%
rename from softmmu/async-teardown.c
rename to system/async-teardown.c
system/balloon.c renamed from softmmu/balloon.c +0 -0
similarity index 100%
rename from softmmu/balloon.c
rename to system/balloon.c
system/bootdevice.c renamed from softmmu/bootdevice.c +0 -0
similarity index 100%
rename from softmmu/bootdevice.c
rename to system/bootdevice.c
system/cpu-throttle.c renamed from softmmu/cpu-throttle.c +0 -0
similarity index 100%
rename from softmmu/cpu-throttle.c
rename to system/cpu-throttle.c
system/cpu-timers.c renamed from softmmu/cpu-timers.c +0 -0
similarity index 100%
rename from softmmu/cpu-timers.c
rename to system/cpu-timers.c
system/cpus.c renamed from softmmu/cpus.c +0 -0
similarity index 100%
rename from softmmu/cpus.c
rename to system/cpus.c
system/datadir.c renamed from softmmu/datadir.c +0 -0
similarity index 100%
rename from softmmu/datadir.c
rename to system/datadir.c
system/device_tree.c renamed from softmmu/device_tree.c +0 -0
similarity index 100%
rename from softmmu/device_tree.c
rename to system/device_tree.c
system/dirtylimit.c renamed from softmmu/dirtylimit.c +0 -0
similarity index 100%
rename from softmmu/dirtylimit.c
rename to system/dirtylimit.c
system/dma-helpers.c renamed from softmmu/dma-helpers.c +0 -0
similarity index 100%
rename from softmmu/dma-helpers.c
rename to system/dma-helpers.c
system/globals.c renamed from softmmu/globals.c +0 -0
similarity index 100%
rename from softmmu/globals.c
rename to system/globals.c
system/icount.c renamed from softmmu/icount.c +0 -0
similarity index 100%
rename from softmmu/icount.c
rename to system/icount.c
system/ioport.c renamed from softmmu/ioport.c +0 -0
similarity index 100%
rename from softmmu/ioport.c
rename to system/ioport.c
system/main.c renamed from softmmu/main.c +0 -0
similarity index 100%
rename from softmmu/main.c
rename to system/main.c
system/memory.c renamed from softmmu/memory.c +0 -0
similarity index 100%
rename from softmmu/memory.c
rename to system/memory.c
system/memory_mapping.c renamed from softmmu/memory_mapping.c +0 -0
similarity index 100%
rename from softmmu/memory_mapping.c
rename to system/memory_mapping.c
system/physmem.c renamed from softmmu/physmem.c +4 -2
similarity index 99%
rename from softmmu/physmem.c
rename to system/physmem.c
index 309653c722..edc3ed8ab9 100644
@@ -2301,8 +2301,10 @@ RAMBlock *qemu_ram_block_by_name(const char *name)
     return NULL;
 }
 
-/* Some of the softmmu routines need to translate from a host pointer
-   (typically a TLB entry) back to a ram offset.  */
+/*
+ * Some of the system routines need to translate from a host pointer
+ * (typically a TLB entry) back to a ram offset.
+ */
 ram_addr_t qemu_ram_addr_from_host(void *ptr)
 {
     RAMBlock *block;
system/qdev-monitor.c renamed from softmmu/qdev-monitor.c +0 -0
similarity index 100%
rename from softmmu/qdev-monitor.c
rename to system/qdev-monitor.c
system/qemu-seccomp.c renamed from softmmu/qemu-seccomp.c +0 -0
similarity index 100%
rename from softmmu/qemu-seccomp.c
rename to system/qemu-seccomp.c
system/qtest.c renamed from softmmu/qtest.c +0 -0
similarity index 100%
rename from softmmu/qtest.c
rename to system/qtest.c
system/rtc.c renamed from softmmu/rtc.c +0 -0
similarity index 100%
rename from softmmu/rtc.c
rename to system/rtc.c
system/runstate-action.c renamed from softmmu/runstate-action.c +0 -0
similarity index 100%
rename from softmmu/runstate-action.c
rename to system/runstate-action.c
system/runstate-hmp-cmds.c renamed from softmmu/runstate-hmp-cmds.c +0 -0
similarity index 100%
rename from softmmu/runstate-hmp-cmds.c
rename to system/runstate-hmp-cmds.c
system/runstate.c renamed from softmmu/runstate.c +0 -0
similarity index 100%
rename from softmmu/runstate.c
rename to system/runstate.c
system/tpm-hmp-cmds.c renamed from softmmu/tpm-hmp-cmds.c +0 -0
similarity index 100%
rename from softmmu/tpm-hmp-cmds.c
rename to system/tpm-hmp-cmds.c
system/tpm.c renamed from softmmu/tpm.c +0 -0
similarity index 100%
rename from softmmu/tpm.c
rename to system/tpm.c
system/vl.c renamed from softmmu/vl.c +0 -0
similarity index 100%
rename from softmmu/vl.c
rename to system/vl.c
system/watchpoint.c renamed from softmmu/watchpoint.c +0 -0
similarity index 100%
rename from softmmu/watchpoint.c
rename to system/watchpoint.c
scripts/checkpatch.pl +1 -1
index 1ad9ccb74b..6e4100d2a4 100755
@@ -466,7 +466,7 @@ sub top_of_kernel_tree {
 	my @tree_check = (
 		"COPYING", "MAINTAINERS", "Makefile",
 		"README.rst", "docs", "VERSION",
-		"linux-user", "softmmu"
+		"linux-user", "system"
 	);
 
 	foreach my $check (@tree_check) {
scripts/coverity-scan/COMPONENTS.md +1 -1
index 883da95aff..0e62f10aad 100644
@@ -148,7 +148,7 @@ tcg
   ~ (/qemu)?(/accel/tcg|/replay|/tcg)/.*
 
 sysemu
-  ~ (/qemu)?(/softmmu/.*|/accel/.*)
+  ~ (/qemu)?(/system/.*|/accel/.*)
 
 (headers)
   ~ (/qemu)?(/include/.*)
scripts/get_maintainer.pl +1 -1
index e5499b94b4..02fa828100 100755
@@ -796,7 +796,7 @@ sub top_of_tree {
         && (-d "${lk_path}docs")
         && (-f "${lk_path}VERSION")
         && (-d "${lk_path}linux-user/")
-        && (-d "${lk_path}softmmu/")) {
+        && (-d "${lk_path}system/")) {
 	return 1;
     }
     return 0;
system/meson.build renamed from softmmu/meson.build +0 -0
similarity index 100%
rename from softmmu/meson.build
rename to system/meson.build
system/trace-events renamed from softmmu/trace-events +0 -0
similarity index 100%
rename from softmmu/trace-events
rename to system/trace-events
tests/unit/meson.build +1 -1
index 0299ef6906..e7d72ee80a 100644
@@ -58,7 +58,7 @@ if have_system or have_tools
   }
 
   if seccomp.found()
-    tests += {'test-seccomp': ['../../softmmu/qemu-seccomp.c', seccomp]}
+    tests += {'test-seccomp': ['../../system/qemu-seccomp.c', seccomp]}
   endif
 endif
 
Signature · 1 line
2.41.0
#16 lore raw

Re: [PATCH 13/13] system: Rename softmmu/ directory as system/

Quoted 34 lines · Philippe Mathieu-Daudé

The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments.

---

  include/sysemu/runstate-action.h        |  2 +-

rename {softmmu => system}/timers-state.h (100%) create mode 100644 system/trace.h
rename {softmmu => system}/arch_init.c (100%) rename {softmmu => system}/async-teardown.c (100%) rename {softmmu => system}/balloon.c (100%) rename {softmmu => system}/bootdevice.c (100%) rename {softmmu => system}/cpu-throttle.c (100%) rename {softmmu => system}/cpu-timers.c (100%) rename {softmmu => system}/cpus.c (100%) rename {softmmu => system}/datadir.c (100%) rename {softmmu => system}/device_tree.c (100%) rename {softmmu => system}/dirtylimit.c (100%) rename {softmmu => system}/dma-helpers.c (100%) rename {softmmu => system}/globals.c (100%) rename {softmmu => system}/icount.c (100%) rename {softmmu => system}/ioport.c (100%) rename {softmmu => system}/main.c (100%) rename {softmmu => system}/memory.c (100%) rename {softmmu => system}/memory_mapping.c (100%) rename {softmmu => system}/physmem.c (99%) rename {softmmu => system}/qdev-monitor.c (100%) rename {softmmu => system}/qemu-seccomp.c (100%) rename {softmmu => system}/qtest.c (100%) rename {softmmu => system}/rtc.c (100%) rename {softmmu => system}/runstate-action.c (100%)

Quoted 8 lines

rename {softmmu => system}/runstate-hmp-cmds.c (100%) rename {softmmu => system}/runstate.c (100%) rename {softmmu => system}/tpm-hmp-cmds.c (100%) rename {softmmu => system}/tpm.c (100%) rename {softmmu => system}/vl.c (100%) rename {softmmu => system}/watchpoint.c (100%) rename {softmmu => system}/meson.build (100%) rename {softmmu => system}/trace-events (100%)

Maybe I should also move include/sysemu/ -> include/system/ to keep it coherent?

#17 lore raw

Re: [PATCH 13/13] system: Rename softmmu/ directory as system/

Quoted 44 lines · Philippe Mathieu-Daudé
Quoted 34 lines · Philippe Mathieu-Daudé

The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments.

---

  include/sysemu/runstate-action.h        |  2 +-

rename {softmmu => system}/timers-state.h (100%) create mode 100644 system/trace.h
rename {softmmu => system}/arch_init.c (100%) rename {softmmu => system}/async-teardown.c (100%) rename {softmmu => system}/balloon.c (100%) rename {softmmu => system}/bootdevice.c (100%) rename {softmmu => system}/cpu-throttle.c (100%) rename {softmmu => system}/cpu-timers.c (100%) rename {softmmu => system}/cpus.c (100%) rename {softmmu => system}/datadir.c (100%) rename {softmmu => system}/device_tree.c (100%) rename {softmmu => system}/dirtylimit.c (100%) rename {softmmu => system}/dma-helpers.c (100%) rename {softmmu => system}/globals.c (100%) rename {softmmu => system}/icount.c (100%) rename {softmmu => system}/ioport.c (100%) rename {softmmu => system}/main.c (100%) rename {softmmu => system}/memory.c (100%) rename {softmmu => system}/memory_mapping.c (100%) rename {softmmu => system}/physmem.c (99%) rename {softmmu => system}/qdev-monitor.c (100%) rename {softmmu => system}/qemu-seccomp.c (100%) rename {softmmu => system}/qtest.c (100%) rename {softmmu => system}/rtc.c (100%) rename {softmmu => system}/runstate-action.c (100%)

Quoted 8 lines

rename {softmmu => system}/runstate-hmp-cmds.c (100%) rename {softmmu => system}/runstate.c (100%) rename {softmmu => system}/tpm-hmp-cmds.c (100%) rename {softmmu => system}/tpm.c (100%) rename {softmmu => system}/vl.c (100%) rename {softmmu => system}/watchpoint.c (100%) rename {softmmu => system}/meson.build (100%) rename {softmmu => system}/trace-events (100%)

Quoted 2 lines

Maybe I should also move include/sysemu/ -> include/system/ to keep it coherent?

I think I've proposed some years ago to rename softmmu to sysemu because besides actual softmmu code it conrains a lot of system emulation. Calling it system is also similar, maybe less specific than sysemu but basically the same.

Regards,
BALATON Zoltan

#18 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 3 lines · Philippe Mathieu-Daudé

This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'.

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining

  $ git grep softmmu | wc -l
  270

In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

    configure --target-list=x86_64-system

though the lazy side of me would like

    configure --target-list=x86_64-vm

for less typing

Quoted 166 lines

Now that Richard posted its "tcg: Allow softmmu for user-only" series, this is particularly relevant:
https://lore.kernel.org/qemu-devel/[email protected]/

Philippe Mathieu-Daudé (13):
softmmu/trace-events: Fix a typo
travis-ci: Correct invalid mentions of 'softmmu' by 'system'
cpu: Correct invalid mentions of 'softmmu' by 'system-mode'
fuzz: Correct invalid mentions of 'softmmu' by 'system'
tcg: Correct invalid mentions of 'softmmu' by 'system-mode'
accel: Rename accel_softmmu* -> accel_system*
gdbstub: Rename 'softmmu' -> 'system'
semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user() target/i386: Rename i386_softmmu_kvm_ss -> i386_kvm_ss hw/virtio/meson: Rename softmmu_virtio_ss -> system_virtio_ss
meson: Rename softmmu_mods -> system_mods
meson: Rename target_softmmu_arch -> target_system_arch
system: Rename softmmu/ directory as system/

 MAINTAINERS                                   | 44 +++++++++----------
 docs/devel/build-system.rst                   |  4 +-
 docs/devel/qtest.rst                          |  2 +-
 docs/devel/testing.rst                        |  2 +-
 tests/tcg/s390x/pgm-specification.mak         |  2 +-
 meson.build                                   | 22 +++++-----
 accel/{accel-softmmu.h => accel-system.h}     |  6 +--
 gdbstub/internals.h                           |  4 +-
 include/qemu/atomic128.h                      |  4 +-
 .../{softmmu-uaccess.h => uaccess.h}          | 24 +++++-----
 include/sysemu/runstate-action.h              |  2 +-
 include/tcg/tcg-op-common.h                   |  2 +-
 softmmu/trace.h                               |  1 -
 {softmmu => system}/timers-state.h            |  0
 system/trace.h                                |  1 +
 tests/qtest/fuzz/fuzz.h                       |  4 +-
 accel/accel-common.c                          |  2 +-
 accel/{accel-softmmu.c => accel-system.c}     |  6 +--
 accel/tcg/user-exec.c                         |  2 +-
 cpu.c                                         |  2 +-
 gdbstub/{softmmu.c => system.c}               |  2 +-
 hw/core/cpu-common.c                          |  4 +-
 semihosting/arm-compat-semi.c                 |  4 +-
 semihosting/config.c                          |  2 +-
 semihosting/guestfd.c                         |  2 +-
 semihosting/syscalls.c                        |  2 +-
 semihosting/uaccess.c                         | 14 +++---
 stubs/semihost.c                              |  4 +-
 {softmmu => system}/arch_init.c               |  0
 {softmmu => system}/async-teardown.c          |  0
 {softmmu => system}/balloon.c                 |  0
 {softmmu => system}/bootdevice.c              |  0
 {softmmu => system}/cpu-throttle.c            |  0
 {softmmu => system}/cpu-timers.c              |  0
 {softmmu => system}/cpus.c                    |  0
 {softmmu => system}/datadir.c                 |  0
 {softmmu => system}/device_tree.c             |  0
 {softmmu => system}/dirtylimit.c              |  0
 {softmmu => system}/dma-helpers.c             |  0
 {softmmu => system}/globals.c                 |  0
 {softmmu => system}/icount.c                  |  0
 {softmmu => system}/ioport.c                  |  0
 {softmmu => system}/main.c                    |  0
 {softmmu => system}/memory.c                  |  2 +-
 {softmmu => system}/memory_mapping.c          |  0
 {softmmu => system}/physmem.c                 |  6 ++-
 {softmmu => system}/qdev-monitor.c            |  0
 {softmmu => system}/qemu-seccomp.c            |  0
 {softmmu => system}/qtest.c                   |  0
 {softmmu => system}/rtc.c                     |  0
 {softmmu => system}/runstate-action.c         |  0
 {softmmu => system}/runstate-hmp-cmds.c       |  0
 {softmmu => system}/runstate.c                |  0
 {softmmu => system}/tpm-hmp-cmds.c            |  0
 {softmmu => system}/tpm.c                     |  0
 {softmmu => system}/vl.c                      |  0
 {softmmu => system}/watchpoint.c              |  0
 target/m68k/m68k-semi.c                       |  2 +-
 target/mips/tcg/sysemu/mips-semi.c            |  2 +-
 target/nios2/nios2-semi.c                     |  2 +-
 target/riscv/vector_helper.c                  |  2 +-
 tcg/region.c                                  |  4 +-
 tcg/tcg.c                                     | 11 ++---
 tests/qtest/fuzz/fuzz.c                       |  2 +-
 tests/tcg/multiarch/system/memory.c           |  4 +-
 tcg/aarch64/tcg-target.c.inc                  |  4 +-
 tcg/arm/tcg-target.c.inc                      |  2 +-
 tcg/i386/tcg-target.c.inc                     |  2 +-
 tcg/loongarch64/tcg-target.c.inc              |  4 +-
 tcg/mips/tcg-target.c.inc                     |  4 +-
 tcg/ppc/tcg-target.c.inc                      |  4 +-
 tcg/riscv/tcg-target.c.inc                    |  4 +-
 tcg/s390x/tcg-target.c.inc                    |  4 +-
 tcg/sparc64/tcg-target.c.inc                  |  4 +-
 .travis.yml                                   |  4 +-
 accel/meson.build                             |  2 +-
 accel/stubs/meson.build                       | 10 ++---
 gdbstub/meson.build                           | 10 ++---
 gdbstub/trace-events                          |  2 +-
 hw/virtio/meson.build                         | 22 +++++-----
 scripts/checkpatch.pl                         |  2 +-
 scripts/coverity-scan/COMPONENTS.md           |  2 +-
 scripts/get_maintainer.pl                     |  2 +-
 {softmmu => system}/meson.build               |  0
 {softmmu => system}/trace-events              |  2 +-
 target/alpha/meson.build                      |  2 +-
 target/arm/meson.build                        |  2 +-
 target/avr/meson.build                        |  2 +-
 target/cris/meson.build                       |  2 +-
 target/hppa/meson.build                       |  2 +-
 target/i386/kvm/meson.build                   | 10 ++---
 target/i386/meson.build                       |  2 +-
 target/loongarch/meson.build                  |  2 +-
 target/m68k/meson.build                       |  2 +-
 target/microblaze/meson.build                 |  2 +-
 target/mips/meson.build                       |  2 +-
 target/nios2/meson.build                      |  2 +-
 target/openrisc/meson.build                   |  2 +-
 target/ppc/meson.build                        |  2 +-
 target/riscv/meson.build                      |  2 +-
 target/rx/meson.build                         |  2 +-
 target/s390x/meson.build                      |  2 +-
 target/sh4/meson.build                        |  2 +-
 target/sparc/meson.build                      |  2 +-
 target/tricore/meson.build                    |  2 +-
 target/xtensa/meson.build                     |  2 +-
 tcg/meson.build                               |  6 +--
 tests/tcg/Makefile.target                     |  2 +-
 tests/tcg/multiarch/gdbstub/interrupt.py      |  2 +-
 tests/tcg/multiarch/gdbstub/memory.py         |  2 +-
 tests/tcg/s390x/pgm-specification-softmmu.S   |  2 +-
 tests/tcg/s390x/softmmu.ld                    |  2 +-
 tests/tcg/xtensa/Makefile.softmmu-target      |  2 +-
 tests/tcg/xtensaeb/Makefile.softmmu-target    |  2 +-
 tests/unit/meson.build                        |  2 +-
 115 files changed, 188 insertions(+), 181 deletions(-)
 rename accel/{accel-softmmu.h => accel-system.h} (77%)
 rename include/semihosting/{softmmu-uaccess.h => uaccess.h} (75%)
 delete mode 100644 softmmu/trace.h
 rename {softmmu => system}/timers-state.h (100%)
 create mode 100644 system/trace.h
 rename accel/{accel-softmmu.c => accel-system.c} (96%)
 rename gdbstub/{softmmu.c => system.c} (99%)
 rename {softmmu => system}/arch_init.c (100%)
 rename {softmmu => system}/async-teardown.c (100%)
 rename {softmmu => system}/balloon.c (100%)
 rename {softmmu => system}/bootdevice.c (100%)
 rename {softmmu => system}/cpu-throttle.c (100%)
 rename {softmmu => system}/cpu-timers.c (100%)
 rename {softmmu => system}/cpus.c (100%)
 rename {softmmu => system}/datadir.c (100%)
 rename {softmmu => system}/device_tree.c (100%)
 rename {softmmu => system}/dirtylimit.c (100%)
 rename {softmmu => system}/dma-helpers.c (100%)
 rename {softmmu => system}/globals.c (100%)
 rename {softmmu => system}/icount.c (100%)
 rename {softmmu => system}/ioport.c (100%)
 rename {softmmu => system}/main.c (100%)
 rename {softmmu => system}/memory.c (99%)
 rename {softmmu => system}/memory_mapping.c (100%)
 rename {softmmu => system}/physmem.c (99%)
 rename {softmmu => system}/qdev-monitor.c (100%)
 rename {softmmu => system}/qemu-seccomp.c (100%)
 rename {softmmu => system}/qtest.c (100%)
 rename {softmmu => system}/rtc.c (100%)
 rename {softmmu => system}/runstate-action.c (100%)
Quoted 13 lines
 rename {softmmu => system}/runstate-hmp-cmds.c (100%)
 rename {softmmu => system}/runstate.c (100%)
 rename {softmmu => system}/tpm-hmp-cmds.c (100%)
 rename {softmmu => system}/tpm.c (100%)
 rename {softmmu => system}/vl.c (100%)
 rename {softmmu => system}/watchpoint.c (100%)
 rename {softmmu => system}/meson.build (100%)
 rename {softmmu => system}/trace-events (99%)
Signature · 1 line
2.41.0

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#19 lore raw
Quoted 16 lines · Daniel P. Berrangé
Quoted 3 lines · Philippe Mathieu-Daudé

This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'.

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining

   $ git grep softmmu | wc -l
   270

In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

Quoted 7 lines
     configure --target-list=x86_64-system

though the lazy side of me would like

     configure --target-list=x86_64-vm

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

Thomas

#20 lore raw
Quoted 23 lines · Thomas Huth
Quoted 22 lines · Daniel P. Berrangé
Quoted 3 lines · Philippe Mathieu-Daudé

This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'.

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining

   $ git grep softmmu | wc -l
   270

In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

     configure --target-list=x86_64-system

though the lazy side of me would like

     configure --target-list=x86_64-vm
Quoted 7 lines
Quoted 1 line

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

Simply 'machine' feels like an option, to avoid suggesting a bias towards either virtualization or emulation.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#21 lore raw
In reply to Thomas Huth
Quoted 25 lines · Thomas Huth
Quoted 16 lines · Daniel P. Berrangé
Quoted 3 lines · Philippe Mathieu-Daudé

This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'.

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining

   $ git grep softmmu | wc -l
   270

In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

Quoted 7 lines
     configure --target-list=x86_64-system

though the lazy side of me would like

     configure --target-list=x86_64-vm

for less typing

Quoted 9 lines

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

Thomas

Just my 2c, to me "system" is the only word that makes sense here, even from a purely user perspective.

We already have exposed "system" to the user as a way to mean this, as in:

./configure --enable-system
./configure --disable-system

and if everything is renamed from softmmu to system where it makes sense in the code, it's the best option for development as well in my view.

Thanks,

Claudio

maintainer
#22 lore raw
Quoted 13 lines · Claudio Fontana
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Daniel P. Berrangé

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining
In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

     configure --target-list=x86_64-system
     configure --target-list=x86_64-vm
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

I agree that changing other remnants should be done right after this patch, for example $softmmu in configure. Changing all targets is a very large and very user-visible change, it is required but it should be planned very well.

As to the actual target names, I think system is the only consistent choice since we have --enable/--disable-system (as pointed out by Claudio) and qemu-system-*. sysemu may make a little more sense in the codebase (we have include/sysemu after all), but maybe that ship has sailed since we have many occurrences of "system", for example system_ss and other related sourcesets.

Paolo

#23 lore raw
Quoted 27 lines · Paolo Bonzini
Quoted 13 lines · Claudio Fontana
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Daniel P. Berrangé

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining
In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

     configure --target-list=x86_64-system
     configure --target-list=x86_64-vm
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

I agree that changing other remnants should be done right after this patch, for example $softmmu in configure. Changing all targets is a very large and very user-visible change, it is required but it should be planned very well.

Quoted 7 lines

As to the actual target names, I think system is the only consistent choice since we have --enable/--disable-system (as pointed out by Claudio) and qemu-system-*. sysemu may make a little more sense in the codebase (we have include/sysemu after all), but maybe that ship has sailed since we have many occurrences of "system", for example system_ss and other related sourcesets.

Yep, I agree with that view now, lets stick with 'system'.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#24 lore raw
Quoted 36 lines · Daniel P. Berrangé
Quoted 27 lines · Paolo Bonzini
Quoted 13 lines · Claudio Fontana
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Daniel P. Berrangé

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining
In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

      configure --target-list=x86_64-system
      configure --target-list=x86_64-vm
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

I agree that changing other remnants should be done right after this patch, for example $softmmu in configure. Changing all targets is a very large and very user-visible change, it is required but it should be planned very well.

Quoted 7 lines

As to the actual target names, I think system is the only consistent choice since we have --enable/--disable-system (as pointed out by Claudio) and qemu-system-*. sysemu may make a little more sense in the codebase (we have include/sysemu after all), but maybe that ship has sailed since we have many occurrences of "system", for example system_ss and other related sourcesets.

Quoted 1 line

Yep, I agree with that view now, lets stick with 'system'.

Ok, convinced, seems like 'system' is likely still the best choice.

Thomas

#25 lore raw
In reply to Paolo Bonzini
Quoted 22 lines · Paolo Bonzini
Quoted 13 lines · Claudio Fontana
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Daniel P. Berrangé

Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining
In particular under configs/

I was also hoping it meant that we'd be changing configure to allow

      configure --target-list=x86_64-system
      configure --target-list=x86_64-vm
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

for less typing

Maybe we should also bikeshed about the naming first... "system" is a quite overloaded word in this context already, and "vm" sounds rather like hardware-accelerated stuff ... what about using something like "sysemu"? Or "fullsys" for "full system emulation" (in contrast to "user space"-only emulation)?

Quoted 4 lines

I agree that changing other remnants should be done right after this patch, for example $softmmu in configure. Changing all targets is a very large and very user-visible change, it is required but it should be planned very well.

As usual I should have been more verbose in my cover.

This series focus on the C code (and travis) to avoid misuse of 'softmmu'.

Yes I agree it would be nice to also rename the binaries, but this is a buildsys change (even if we use symlinks/aliases for some deprecation period). This is not a tiny patch, and requires thoughts.

On one hand I'd rather not rush renaming binaries -- annoying users -- without a clear long term plan (which I'm not clear about).

On another hand I wouldn't delay Richard user-mode work. Renaming binaries seems orthogonal to me, and could be done later IMO.

Quoted 10 lines

As to the actual target names, I think system is the only consistent choice since we have --enable/--disable-system (as pointed out by Claudio) and qemu-system-*. sysemu may make a little more sense in the codebase (we have include/sysemu after all), but maybe that ship has sailed since we have many occurrences of "system", for example system_ss and other related sourcesets.

Paolo