mbox series

[RFC,0/2] bulk: Replace !CONFIG_SOFTMMU and !CONFIG_USER_ONLY

Message ID 20230602225811.60152-1-philmd@linaro.org
Headers show
Series bulk: Replace !CONFIG_SOFTMMU and !CONFIG_USER_ONLY | expand

Message

Philippe Mathieu-Daudé June 2, 2023, 10:58 p.m. UTC
Since CONFIG_SOFTMMU is poisoned, we are using its opposite
form via "!CONFIG_USER_ONLY" (because CONFIG_USER_ONLY is
not poisoned).
Since patch [2] unpoison CONFIG_SOFTMMU, we can remove the
kludge, resulting is a more logical code to review.

Personally I like the resulting code, but I can understand
others simply see code churn here, so I'm simply posting as
bulk patches. I don't have problem to split if nobody object
to this change.

Based-on: 20230531040330.8950-1-richard.henderson@linaro.org
          "tcg: Build once for system, once for user" (v3)
[1] https://lore.kernel.org/qemu-devel/20230531040330.8950-1-richard.henderson@linaro.org/
[2] https://lore.kernel.org/qemu-devel/20230531040330.8950-48-richard.henderson@linaro.org/

*** BLURB HERE ***

Philippe Mathieu-Daudé (2):
  bulk: Replace !CONFIG_SOFTMMU -> CONFIG_USER_ONLY
  bulk: Replace !CONFIG_USER_ONLY -> CONFIG_SOFTMMU

 scripts/coccinelle/round.cocci                |   6 +
 include/exec/address-spaces.h                 |   2 +-
 include/exec/confidential-guest-support.h     |   4 +-
 include/exec/cpu-all.h                        |   4 +-
 include/exec/cpu-common.h                     |   4 +-
 include/exec/cpu-defs.h                       |  14 +-
 include/exec/cputlb.h                         |   2 +-
 include/exec/exec-all.h                       |   6 +-
 include/exec/ioport.h                         |   2 +-
 include/exec/memory-internal.h                |   2 +-
 include/exec/memory.h                         |   2 +-
 include/exec/ram_addr.h                       |   2 +-
 include/exec/ramblock.h                       |   2 +-
 include/hw/core/cpu.h                         |  12 +-
 include/hw/core/tcg-cpu-ops.h                 |   8 +-
 include/hw/intc/armv7m_nvic.h                 |   4 +-
 include/hw/s390x/css.h                        |   2 +-
 include/qemu/accel.h                          |   6 +-
 include/semihosting/semihost.h                |   4 +-
 include/sysemu/cpus.h                         |   2 +-
 include/sysemu/xen.h                          |   4 +-
 target/alpha/cpu.h                            |   6 +-
 target/arm/common-semi-target.h               |   2 +-
 target/arm/cpu.h                              |  14 +-
 target/arm/internals.h                        |   6 +-
 target/arm/tcg/arm_ldst.h                     |   2 +-
 target/arm/tcg/translate.h                    |   2 +-
 target/cris/cpu.h                             |   2 +-
 target/hppa/cpu.h                             |   2 +-
 target/hppa/helper.h                          |   2 +-
 target/i386/cpu-internal.h                    |   4 +-
 target/i386/cpu.h                             |  12 +-
 target/i386/helper.h                          |  12 +-
 target/i386/sev.h                             |   2 +-
 target/i386/tcg/helper-tcg.h                  |   4 +-
 target/loongarch/cpu.h                        |   4 +-
 target/loongarch/helper.h                     |   2 +-
 target/loongarch/internals.h                  |   4 +-
 target/m68k/cpu.h                             |   6 +-
 target/microblaze/cpu.h                       |  12 +-
 target/microblaze/helper.h                    |   2 +-
 target/mips/cpu.h                             |   6 +-
 target/mips/helper.h                          |   8 +-
 target/mips/internal.h                        |   4 +-
 target/mips/tcg/tcg-internal.h                |   4 +-
 target/nios2/cpu.h                            |  10 +-
 target/nios2/helper.h                         |   2 +-
 target/openrisc/cpu.h                         |   8 +-
 target/ppc/cpu-qom.h                          |   4 +-
 target/ppc/cpu.h                              |  32 ++---
 target/ppc/helper.h                           |   8 +-
 target/ppc/internal.h                         |   6 +-
 target/ppc/kvm_ppc.h                          |   8 +-
 target/ppc/mmu-book3s-v3.h                    |   2 +-
 target/ppc/mmu-hash32.h                       |   2 +-
 target/ppc/mmu-hash64.h                       |   2 +-
 target/ppc/mmu-radix64.h                      |   2 +-
 target/ppc/power8-pmu.h                       |   2 +-
 target/ppc/spr_common.h                       |   2 +-
 target/riscv/cpu.h                            |  10 +-
 target/riscv/helper.h                         |   4 +-
 target/riscv/internals.h                      |   2 +-
 target/rx/cpu.h                               |   4 +-
 target/s390x/cpu.h                            |   8 +-
 target/s390x/helper.h                         |   2 +-
 target/s390x/s390x-internal.h                 |   8 +-
 target/sh4/cpu.h                              |   2 +-
 target/sparc/cpu.h                            |  10 +-
 target/sparc/helper.h                         |   2 +-
 target/xtensa/cpu.h                           |   6 +-
 target/xtensa/helper.h                        |   4 +-
 target/s390x/tcg/insn-data.h.inc              |   2 +-
 accel/accel-common.c                          |   8 +-
 accel/tcg/cpu-exec.c                          |  24 ++--
 accel/tcg/tcg-all.c                           |   4 +-
 accel/tcg/translate-all.c                     |   2 +-
 cpu.c                                         |   8 +-
 gdbstub/gdbstub.c                             |   8 +-
 plugins/api.c                                 |   4 +-
 plugins/loader.c                              |   4 +-
 semihosting/arm-compat-semi.c                 |  10 +-
 semihosting/guestfd.c                         |   2 +-
 semihosting/syscalls.c                        |   6 +-
 softmmu/memory.c                              |   2 +-
 target/alpha/cpu.c                            |  10 +-
 target/alpha/helper.c                         |   4 +-
 target/alpha/sys_helper.c                     |   4 +-
 target/alpha/translate.c                      |  22 ++--
 target/arm/cpu.c                              |  44 +++----
 target/arm/debug_helper.c                     |   4 +-
 target/arm/gdbstub.c                          |   6 +-
 target/arm/helper.c                           |  48 +++----
 target/arm/tcg/cpu32.c                        |  18 +--
 target/arm/tcg/helper-a64.c                   |   2 +-
 target/arm/tcg/m_helper.c                     |   6 +-
 target/arm/tcg/op_helper.c                    |   2 +-
 target/arm/tcg/sve_helper.c                   |   2 +-
 target/arm/tcg/tlb_helper.c                   |   4 +-
 target/arm/tcg/translate-a64.c                |   2 +-
 target/arm/tcg/translate.c                    |   6 +-
 target/cris/cpu.c                             |  18 +--
 target/cris/op_helper.c                       |   8 +-
 target/cris/translate.c                       |   2 +-
 target/hexagon/genptr.c                       |   2 +-
 target/hppa/cpu.c                             |  14 +-
 target/hppa/helper.c                          |   4 +-
 target/hppa/translate.c                       |  36 ++---
 target/i386/cpu-dump.c                        |   6 +-
 target/i386/cpu.c                             |  42 +++---
 target/i386/gdbstub.c                         |  14 +-
 target/i386/helper.c                          |  14 +-
 target/i386/tcg/bpt_helper.c                  |   2 +-
 target/i386/tcg/excp_helper.c                 |   2 +-
 target/i386/tcg/fpu_helper.c                  |   4 +-
 target/i386/tcg/seg_helper.c                  |   8 +-
 target/i386/tcg/tcg-cpu.c                     |   6 +-
 target/i386/tcg/translate.c                   |   4 +-
 target/loongarch/cpu.c                        |  14 +-
 target/loongarch/op_helper.c                  |   2 +-
 target/m68k/cpu.c                             |   6 +-
 target/m68k/helper.c                          |   4 +-
 target/m68k/op_helper.c                       |   4 +-
 target/microblaze/cpu.c                       |  12 +-
 target/microblaze/helper.c                    |   4 +-
 target/microblaze/op_helper.c                 |   2 +-
 target/microblaze/translate.c                 |  12 +-
 target/mips/cpu.c                             |  18 +--
 target/mips/gdbstub.c                         |   4 +-
 target/mips/tcg/ldst_helper.c                 |   4 +-
 target/mips/tcg/msa_helper.c                  |   2 +-
 target/mips/tcg/op_helper.c                   |   4 +-
 target/mips/tcg/translate.c                   |  26 ++--
 target/nios2/cpu.c                            |  18 +--
 target/nios2/op_helper.c                      |   4 +-
 target/nios2/translate.c                      |  10 +-
 target/openrisc/cpu.c                         |  14 +-
 target/openrisc/interrupt.c                   |   2 +-
 target/openrisc/sys_helper.c                  |  10 +-
 target/ppc/compat.c                           |   2 +-
 target/ppc/cpu.c                              |   2 +-
 target/ppc/cpu_init.c                         | 124 +++++++++---------
 target/ppc/excp_helper.c                      |  17 +--
 target/ppc/gdbstub.c                          |   8 +-
 target/ppc/helper_regs.c                      |  20 +--
 target/ppc/mem_helper.c                       |   2 +-
 target/ppc/misc_helper.c                      |   2 +-
 target/ppc/power8-pmu.c                       |   4 +-
 target/ppc/ppc-qmp-cmds.c                     |   2 +-
 target/ppc/timebase_helper.c                  |   4 +-
 target/ppc/translate.c                        |  62 ++++-----
 target/riscv/cpu.c                            |  66 +++++-----
 target/riscv/cpu_helper.c                     |  20 +--
 target/riscv/csr.c                            |  42 +++---
 target/riscv/gdbstub.c                        |   6 +-
 target/riscv/op_helper.c                      |   8 +-
 target/riscv/translate.c                      |  12 +-
 target/riscv/zce_helper.c                     |   2 +-
 target/rx/cpu.c                               |  10 +-
 target/rx/helper.c                            |   4 +-
 target/s390x/cpu-dump.c                       |   2 +-
 target/s390x/cpu.c                            |  26 ++--
 target/s390x/cpu_features.c                   |   4 +-
 target/s390x/cpu_models.c                     |   8 +-
 target/s390x/gdbstub.c                        |   4 +-
 target/s390x/interrupt.c                      |   6 +-
 target/s390x/tcg/cc_helper.c                  |   2 +-
 target/s390x/tcg/excp_helper.c                |  10 +-
 target/s390x/tcg/mem_helper.c                 |   8 +-
 target/s390x/tcg/misc_helper.c                |  12 +-
 target/s390x/tcg/translate.c                  |  48 +++----
 target/sh4/cpu.c                              |  12 +-
 target/sh4/helper.c                           |   6 +-
 target/sh4/op_helper.c                        |   2 +-
 target/sparc/cpu.c                            |  16 +--
 target/sparc/helper.c                         |   6 +-
 target/sparc/int32_helper.c                   |   4 +-
 target/sparc/int64_helper.c                   |   4 +-
 target/sparc/ldst_helper.c                    |  16 +--
 target/sparc/translate.c                      |  50 +++----
 target/sparc/win_helper.c                     |  10 +-
 target/xtensa/cpu.c                           |  22 ++--
 target/xtensa/exc_helper.c                    |   4 +-
 target/xtensa/helper.c                        |   4 +-
 target/xtensa/op_helper.c                     |   6 +-
 target/xtensa/translate.c                     |  62 ++++-----
 tcg/tcg.c                                     |   4 +-
 .../loongarch/insn_trans/trans_farith.c.inc   |   2 +-
 target/loongarch/insn_trans/trans_lsx.c.inc   |   2 +-
 target/mips/cpu-defs.c.inc                    |   2 +-
 target/mips/tcg/micromips_translate.c.inc     |   4 +-
 target/mips/tcg/nanomips_translate.c.inc      |   6 +-
 target/ppc/power8-pmu-regs.c.inc              |   4 +-
 target/ppc/translate/branch-impl.c.inc        |   2 +-
 .../ppc/translate/processor-ctrl-impl.c.inc   |   8 +-
 target/ppc/translate/storage-ctrl-impl.c.inc  |  16 +--
 .../riscv/insn_trans/trans_privileged.c.inc   |   8 +-
 target/riscv/insn_trans/trans_rvh.c.inc       |   4 +-
 target/riscv/insn_trans/trans_svinval.c.inc   |   6 +-
 target/riscv/insn_trans/trans_xthead.c.inc    |   8 +-
 tcg/aarch64/tcg-target.c.inc                  |   4 +-
 tcg/arm/tcg-target.c.inc                      |   4 +-
 tcg/i386/tcg-target.c.inc                     |   8 +-
 tcg/loongarch64/tcg-target.c.inc              |   4 +-
 tcg/mips/tcg-target.c.inc                     |   6 +-
 tcg/ppc/tcg-target.c.inc                      |   4 +-
 tcg/riscv/tcg-target.c.inc                    |   2 +-
 tcg/s390x/tcg-target.c.inc                    |   4 +-
 tcg/sparc64/tcg-target.c.inc                  |   8 +-
 208 files changed, 948 insertions(+), 945 deletions(-)