Skip to contentSkip to conversation

buildsys: Remove support for MIPS host

PATCH In review Philippe Mathieu-Daudé 2 participants 10 messages May 11 – May 18 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover buildsys: Remove support for MIPS host

During the v10.2 development cycle we deprecated MIPS host support (mostly because Debian which we use to test in our CI dropped the architecture when releasing Debian 13).

This series removes host support for MIPS.

Philippe Mathieu-Daudé (5):
buildsys: Remove MIPS cross containers
buildsys: Remove support for MIPS hosts
hw/mips: Include missing 'cpu.h' header
buildsys: Remove MIPS KVM
buildsys: Remove MIPS TCG backend

 MAINTAINERS                                   |   15 -
 docs/about/deprecated.rst                     |    8 -
 docs/about/removed-features.rst               |    6 +
 docs/system/target-mips.rst                   |    2 -
 configure                                     |   20 -
 meson.build                                   |   12 +-
 include/qemu/timer.h                          |   30 -
 include/user/thunk.h                          |    2 +-
 linux-user/include/host/mips64/host-signal.h  |   75 -
 target/mips/kvm_mips.h                        |   28 -
 tcg/mips64/tcg-target-con-set.h               |   30 -
 tcg/mips64/tcg-target-con-str.h               |   20 -
 tcg/mips64/tcg-target-has.h                   |   69 -
 tcg/mips64/tcg-target-mo.h                    |   13 -
 tcg/mips64/tcg-target.h                       |   75 -
 tcg/mips64/tcg-target-opc.h.inc               |    1 -
 hw/intc/mips_gic.c                            |   11 +-
 hw/mips/loongson3_virt.c                      |   67 +-
 hw/mips/malta.c                               |    1 -
 hw/mips/mips_int.c                            |    7 +-
 linux-user/mmap.c                             |    2 +-
 target/mips/cpu.c                             |    5 -
 target/mips/kvm.c                             | 1283 --------
 target/mips/system/cp0_timer.c                |   12 +-
 target/mips/system/physaddr.c                 |    1 -
 util/cacheflush.c                             |   16 -
 tcg/mips64/tcg-target.c.inc                   | 2605 -----------------
 .gitlab-ci.d/container-cross.yml              |    6 -
 .gitlab-ci.d/containers.yml                   |    1 -
 .gitlab-ci.d/crossbuilds.yml                  |   22 -
 target/mips/meson.build                       |    6 +-
 tests/docker/Makefile.include                 |    1 -
 .../dockerfiles/debian-mips64el-cross.docker  |  187 --
 .../dockerfiles/debian-mipsel-cross.docker    |  187 --
 tests/lcitool/refresh                         |   12 -
 35 files changed, 32 insertions(+), 4806 deletions(-)
 delete mode 100644 linux-user/include/host/mips64/host-signal.h
 delete mode 100644 target/mips/kvm_mips.h
 delete mode 100644 tcg/mips64/tcg-target-con-set.h
 delete mode 100644 tcg/mips64/tcg-target-con-str.h
 delete mode 100644 tcg/mips64/tcg-target-has.h
 delete mode 100644 tcg/mips64/tcg-target-mo.h
 delete mode 100644 tcg/mips64/tcg-target.h
 delete mode 100644 tcg/mips64/tcg-target-opc.h.inc
 delete mode 100644 target/mips/kvm.c
 delete mode 100644 tcg/mips64/tcg-target.c.inc
 delete mode 100644 tests/docker/dockerfiles/debian-mips64el-cross.docker
 delete mode 100644 tests/docker/dockerfiles/debian-mipsel-cross.docker
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/5 buildsys: Remove MIPS cross containers

As mentioned in commit 269ffaabc84 ("buildsys: Remove support for 32-bit MIPS hosts"), Debian 13 "Trixie" removed support for MIPS.

---
 configure                                     |   1 -
 .gitlab-ci.d/container-cross.yml              |   6 -
 .gitlab-ci.d/containers.yml                   |   1 -
 .gitlab-ci.d/crossbuilds.yml                  |  22 ---
 tests/docker/Makefile.include                 |   1 -
 .../dockerfiles/debian-mips64el-cross.docker  | 187 ------------------
 .../dockerfiles/debian-mipsel-cross.docker    | 187 ------------------
 tests/lcitool/refresh                         |  12 --
 8 files changed, 417 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/debian-mips64el-cross.docker
 delete mode 100644 tests/docker/dockerfiles/debian-mipsel-cross.docker
configure +0 -1
index eea90306728..b6dd797de5b 100755
@@ -1525,7 +1525,6 @@ probe_target_compiler() {
         aarch64_be:aarch64 | \
         armeb:arm | \
         i386:x86_64 | \
-        mips*:mips64 | \
         ppc*:ppc64 | \
         sparc:sparc64 | \
         "$cpu:$cpu")
.gitlab-ci.d/container-cross.yml +0 -6
index 92a7f1c1b47..ab06083d754 100644
@@ -28,12 +28,6 @@ loongarch-debian-cross-container:
   variables:
     NAME: debian-loongarch-cross
 
-mips64el-debian-cross-container:
-  extends: .container_job_template
-  stage: containers
-  variables:
-    NAME: debian-mips64el-cross
-
 ppc64el-debian-cross-container:
   extends: .container_job_template
   stage: containers
.gitlab-ci.d/containers.yml +0 -1
index c8b8e44ad86..515e7382f26 100644
@@ -48,7 +48,6 @@ weekly-container-builds:
     - arm64-debian-cross-container
     - hexagon-cross-container
     - loongarch-debian-cross-container
-    - mips64el-debian-cross-container
     - ppc64el-debian-cross-container
     - riscv64-debian-cross-container
     - s390x-debian-cross-container
.gitlab-ci.d/crossbuilds.yml +0 -22
index cf977dfefb1..eaeeb533cee 100644
@@ -23,20 +23,6 @@ cross-arm64-kvm-only:
     IMAGE: debian-arm64-cross
     EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-features
 
-cross-mips64el-system:
-  extends: .cross_system_build_job
-  needs:
-    - job: mips64el-debian-cross-container
-  variables:
-    IMAGE: debian-mips64el-cross
-
-cross-mips64el-user:
-  extends: .cross_user_build_job
-  needs:
-    - job: mips64el-debian-cross-container
-  variables:
-    IMAGE: debian-mips64el-cross
-
 cross-ppc64el-system:
   extends: .cross_system_build_job
   needs:
@@ -95,14 +81,6 @@ cross-s390x-kvm-only:
     IMAGE: debian-s390x-cross
     EXTRA_CONFIGURE_OPTS: --disable-tcg --enable-trace-backends=ftrace
 
-cross-mips64el-kvm-only:
-  extends: .cross_accel_build_job
-  needs:
-    - job: mips64el-debian-cross-container
-  variables:
-    IMAGE: debian-mips64el-cross
-    EXTRA_CONFIGURE_OPTS: --disable-tcg --target-list=mips64el-softmmu
-
 cross-win64-system:
   extends: .cross_system_build_job
   needs:
tests/docker/Makefile.include +0 -1
index df14538c0f5..4725c39807b 100644
@@ -94,7 +94,6 @@ endif
 
 # For non-x86 hosts not all cross-compilers have been packaged
 ifneq ($(HOST_ARCH),x86_64)
-DOCKER_PARTIAL_IMAGES += debian-mipsel-cross debian-mips64el-cross
 DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
 DOCKER_PARTIAL_IMAGES += debian-s390x-cross
 DOCKER_PARTIAL_IMAGES += fedora
tests/docker/dockerfiles/debian-mips64el-cross.docker deleted +0 -187

187 lines not on this page · raw message

tests/docker/dockerfiles/debian-mipsel-cross.docker deleted +0 -187

187 lines not on this page · raw message

tests/lcitool/refresh +0 -12
index e4d01d792b7..33cbad2ac29 100755
@@ -263,18 +263,6 @@ try:
                         trailer=cross_build("i686-linux-gnu-",
                                             "i386-softmmu,i386-linux-user"))
 
-    # mips no longer supported in debian-13
-    # https://www.debian.org/releases/trixie/release-notes/issues.html#mips-architectures-removed
-    generate_dockerfile("debian-mips64el-cross", "debian-12",
-                        cross="mips64el",
-                        trailer=cross_build("mips64el-linux-gnuabi64-",
-                                            "mips64el-softmmu,mips64el-linux-user"))
-
-    generate_dockerfile("debian-mipsel-cross", "debian-12",
-                        cross="mipsel",
-                        trailer=cross_build("mipsel-linux-gnu-",
-                                            "mipsel-softmmu,mipsel-linux-user"))
-
     generate_dockerfile("debian-ppc64el-cross", "debian-13",
                         cross="ppc64le",
                         trailer=cross_build("powerpc64le-linux-gnu-",
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/5 buildsys: Remove support for MIPS hosts

In reply to Philippe Mathieu-Daudé

MIPS host support is deprecated since commit 269ffaabc84 ("buildsys: Remove support for 32-bit MIPS hosts"). Time to remove.

---
 docs/about/deprecated.rst       |  8 --------
 docs/about/removed-features.rst |  6 ++++++
 configure                       | 19 -------------------
 meson.build                     | 10 +---------
 include/qemu/timer.h            | 30 ------------------------------
 util/cacheflush.c               | 16 ----------------
 6 files changed, 7 insertions(+), 82 deletions(-)
docs/about/deprecated.rst +0 -8
index 5551bd12ad8..9e889601df1 100644
@@ -177,14 +177,6 @@ The ``info capture`` command is deprecated and will be removed in a future relea
 Host Architectures
 ------------------
 
-MIPS (since 10.2)
-'''''''''''''''''
-
-MIPS is not supported by Debian 13 ("Trixie") and newer, making it hard to
-maintain our cross-compilation CI tests of the architecture. As we no longer
-have CI coverage support may bitrot away before the deprecation process
-completes.
-
 TCG Plugin support not enabled by default with TCI (since 9.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/about/removed-features.rst +6 -0
index 626162022a8..1a30b941d65 100644
@@ -938,6 +938,12 @@ From 10.0, QEMU has disabled configuration of 64-bit guests on 32-bit hosts.
 Debian 12 "Bookworm" removed support for 32-bit MIPS, making it hard to
 maintain our cross-compilation CI tests of the architecture.
 
+64-bit MIPS (removed in 11.1)
+'''''''''''''''''''''''''''''
+
+Debian 13 "Trixie" removed support for MIPS, making it hard to maintain our
+cross-compilation CI tests of the architecture.
+
 32-bit PPC (removed in 10.2)
 ''''''''''''''''''''''''''''
 
configure +0 -19
index b6dd797de5b..e138d83bc9f 100755
@@ -399,8 +399,6 @@ elif check_define _ARCH_PPC64 ; then
   else
     cpu="ppc64"
   fi
-elif check_define __mips64 ; then
-  cpu="mips64"
 elif check_define __s390__ ; then
   if check_define __s390x__ ; then
     cpu="s390x"
@@ -446,12 +444,6 @@ case "$cpu" in
     linux_arch=loongarch
     ;;
 
-  mips64*|mipsisa64*)
-    cpu=mips64
-    host_arch=mips64
-    linux_arch=mips
-    ;;
-
   ppc64)
     host_arch=ppc64
     linux_arch=powerpc
@@ -1244,11 +1236,6 @@ EOF
         rust_osvariant=${rust_osvariant}eabi
       fi
       ;;
-
-    mips64)
-      # e.g. mips64-unknown-linux-gnuabi64
-      rust_osvariant=${rust_osvariant}abi64
-      ;;
     esac
     ;;
 
@@ -1281,12 +1268,6 @@ EOF
     test "$rust_arch" = arm && test "$rust_os" != linux && rust_arch=armv7
     ;;
 
-  mips)
-    # preserve ISA version (mipsisa64r6 etc.) and include endianness
-    rust_arch=${raw_cpu%el}
-    test "$bigendian" = no && rust_arch=${rust_arch}el
-    ;;
-
   riscv64)
     # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
     test "$android" = no && rust_arch=${rust_arch}gc
meson.build +1 -9
index 5fbdc75a0fc..692d0bc0eab 100644
@@ -55,7 +55,7 @@ qapi_trace_events = []
 bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
 supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'emscripten']
 supported_cpus = ['ppc64', 's390x', 'riscv64', 'x86_64',
-  'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm64']
+  'aarch64', 'loongarch64', 'sparc64', 'wasm64']
 
 cpu = host_machine.cpu_family()
 
@@ -5036,14 +5036,6 @@ if host_arch == 'unknown'
     message('configure has succeeded and you can continue to build, but')
     message('QEMU will use a slow interpreter to emulate the target CPU.')
   endif
-elif host_arch == 'mips'
-  message()
-  warning('DEPRECATED HOST CPU')
-  message()
-  message('Support for CPU host architecture ' + cpu + ' is going to be')
-  message('dropped as soon as the QEMU project stops supporting Debian 12')
-  message('("Bookworm"). Going forward, the QEMU project will not guarantee')
-  message('that QEMU will compile or work on this host CPU.')
 endif
 
 if not supported_oses.contains(host_os)
include/qemu/timer.h +0 -30
index b931181f53d..ec03635dd34 100644
@@ -922,36 +922,6 @@ static inline int64_t cpu_get_host_ticks (void)
 #endif
 }
 
-#elif defined(__mips__) && \
-    ((defined(__mips_isa_rev) && __mips_isa_rev >= 2) || defined(__linux__))
-/*
- * binutils wants to use rdhwr only on mips32r2
- * but as linux kernel emulate it, it's fine
- * to use it.
- *
- */
-#define MIPS_RDHWR(rd, value) {                         \
-        __asm__ __volatile__ (".set   push\n\t"         \
-                              ".set mips32r2\n\t"       \
-                              "rdhwr  %0, "rd"\n\t"     \
-                              ".set   pop"              \
-                              : "=r" (value));          \
-    }
-
-static inline int64_t cpu_get_host_ticks(void)
-{
-    /* On kernels >= 2.6.25 rdhwr <reg>, $2 and $3 are emulated */
-    uint32_t count;
-    static uint32_t cyc_per_count = 0;
-
-    if (!cyc_per_count) {
-        MIPS_RDHWR("$3", cyc_per_count);
-    }
-
-    MIPS_RDHWR("$2", count);
-    return (int64_t)(count * cyc_per_count);
-}
-
 #elif defined(__alpha__)
 
 static inline int64_t cpu_get_host_ticks(void)
util/cacheflush.c +0 -16
index c043c5f881a..247c4ce2980 100644
@@ -301,22 +301,6 @@ void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
 }
 #endif /* CONFIG_DARWIN */
 
-#elif defined(__mips__)
-
-#ifdef __OpenBSD__
-#include <machine/sysarch.h>
-#else
-#include <sys/cachectl.h>
-#endif
-
-void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
-{
-    if (rx != rw) {
-        cacheflush((void *)rw, len, DCACHE);
-    }
-    cacheflush((void *)rx, len, ICACHE);
-}
-
 #elif defined(__powerpc__)
 
 void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/5 hw/mips: Include missing 'cpu.h' header

In reply to Philippe Mathieu-Daudé

"target/mips/cpu.h" is indirectly pulled in via the "system/kvm.h" header, which next commit will remove. Explicitly include the "cpu.h" header, otherwise we'd get:

hw/mips/mips_int.c:29:5: error: use of undeclared identifier 'MIPSCPU'

     29 |     MIPSCPU *cpu = opaque;
        |     ^
  hw/mips/mips_int.c:30:5: error: use of undeclared identifier 'CPUMIPSState'
     30 |     CPUMIPSState *env = &cpu->env;
        |     ^

hw/mips/loongson3_virt.c:156:39: error: unknown type name 'MIPSCPU'
156 | static uint64_t get_cpu_freq_hz(const MIPSCPU *cpu)
| ^

---
 hw/mips/loongson3_virt.c | 1 +
 hw/mips/mips_int.c       | 1 +
 2 files changed, 2 insertions(+)
hw/mips/loongson3_virt.c +1 -0
index cd94e9f5f77..c29cae86872 100644
@@ -51,6 +51,7 @@
 #include "system/runstate.h"
 #include "system/system.h"
 #include "qemu/error-report.h"
+#include "target/mips/cpu.h"
 
 #define PM_CNTL_MODE          0x10
 
hw/mips/mips_int.c +1 -0
index 2b740afc4d8..fa9c78e74de 100644
@@ -25,6 +25,7 @@
 #include "hw/core/irq.h"
 #include "system/kvm.h"
 #include "kvm_mips.h"
+#include "target/mips/cpu.h"
 
 static void cpu_mips_irq_request(void *opaque, int irq, int level)
 {
Signature · 1 line
2.53.0
#4 lore raw

PATCH 4/5 buildsys: Remove MIPS KVM

In reply to Philippe Mathieu-Daudé

We removed support for MIPS host. The KVM MIPS code is now unreachable, remove it.

---
 MAINTAINERS                    |    6 -
 docs/system/target-mips.rst    |    2 -
 meson.build                    |    2 -
 target/mips/kvm_mips.h         |   28 -
 hw/intc/mips_gic.c             |   11 +-
 hw/mips/loongson3_virt.c       |   66 +-
 hw/mips/malta.c                |    1 -
 hw/mips/mips_int.c             |    6 -
 target/mips/cpu.c              |    5 -
 target/mips/kvm.c              | 1283 --------------------------------
 target/mips/system/cp0_timer.c |   12 +-
 target/mips/system/physaddr.c  |    1 -
 target/mips/meson.build        |    6 +-
 13 files changed, 21 insertions(+), 1408 deletions(-)
 delete mode 100644 target/mips/kvm_mips.h
 delete mode 100644 target/mips/kvm.c
MAINTAINERS +0 -6
index 9d3d6459537..978696bbdb5 100644
@@ -482,12 +482,6 @@ S: Supported
 F: target/arm/kvm.c
 F: tests/functional/aarch64/test_kvm.py
 
-MIPS KVM CPUs
-M: Huacai Chen <[email protected]>
-S: Odd Fixes
-F: target/mips/kvm*
-F: target/mips/system/
-
 PPC KVM CPUs
 M: Nicholas Piggin <[email protected]>
 R: Harsh Prateek Bora <[email protected]>
docs/system/target-mips.rst +0 -2
index 2a152e13380..aebad0c86e9 100644
@@ -76,8 +76,6 @@ The Loongson-3 virtual platform emulation supports:
 
 -  GPEX and virtio as peripheral devices
 
--  Both KVM and TCG supported
-
 .. include:: cpu-models-mips.rst.inc
 
 .. _nanoMIPS-System-emulator:
meson.build +0 -2
index 692d0bc0eab..839f56b737b 100644
@@ -282,8 +282,6 @@ elif cpu == 's390x'
   kvm_targets = ['s390x-softmmu']
 elif cpu == 'ppc64'
   kvm_targets = ['ppc-softmmu', 'ppc64-softmmu']
-elif cpu == 'mips64'
-  kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
 elif cpu == 'riscv64'
   kvm_targets = ['riscv64-softmmu']
 elif cpu == 'loongarch64'
target/mips/kvm_mips.h deleted +0 -28
deleted file mode 100644
index c711269d0af..00000000000
@@ -1,28 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * KVM/MIPS: MIPS specific KVM APIs
- *
- * Copyright (C) 2012-2014 Imagination Technologies Ltd.
- * Authors: Sanjay Lal <[email protected]>
- */
-
-#ifndef KVM_MIPS_H
-#define KVM_MIPS_H
-
-#include "cpu.h"
-
-/**
- * kvm_mips_reset_vcpu:
- * @cpu: MIPSCPU
- *
- * Called at reset time to set kernel registers to their initial values.
- */
-void kvm_mips_reset_vcpu(MIPSCPU *cpu);
-
-int kvm_mips_set_interrupt(MIPSCPU *cpu, int irq, int level);
-int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level);
-
-#endif /* KVM_MIPS_H */
hw/intc/mips_gic.c +1 -10
index ad9363a4c7d..23478df4b46 100644
@@ -15,9 +15,7 @@
 #include "qapi/error.h"
 #include "hw/core/sysbus.h"
 #include "system/memory.h"
-#include "system/kvm.h"
 #include "system/reset.h"
-#include "kvm_mips.h"
 #include "hw/intc/mips_gic.h"
 #include "hw/core/irq.h"
 #include "hw/core/qdev-properties.h"
@@ -45,14 +43,7 @@ static void mips_gic_set_vp_irq(MIPSGICState *gic, int vp, int pin)
         ored_level |= (gic->vps[vp].pend & GIC_VP_MASK_CMP_MSK) >>
                       GIC_VP_MASK_CMP_SHF;
     }
-    if (kvm_enabled())  {
-        kvm_mips_set_ipi_interrupt(env_archcpu(gic->vps[vp].env),
-                                   pin + GIC_CPU_PIN_OFFSET,
-                                   ored_level);
-    } else {
-        qemu_set_irq(gic->vps[vp].env->irq[pin + GIC_CPU_PIN_OFFSET],
-                     ored_level);
-    }
+    qemu_set_irq(gic->vps[vp].env->irq[pin + GIC_CPU_PIN_OFFSET], ored_level);
 }
 
 static void gic_update_pin_for_irq(MIPSGICState *gic, int n_IRQ)
hw/mips/loongson3_virt.c +17 -49

102 lines not on this page · raw message

hw/mips/malta.c +0 -1
index 845b8d339e8..38c71f66f2e 100644
@@ -55,7 +55,6 @@
 #include "system/system.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
-#include "system/kvm.h"
 #include "semihosting/semihost.h"
 #include "hw/mips/cps.h"
 #include "hw/core/qdev-clock.h"
hw/mips/mips_int.c +0 -6
index fa9c78e74de..26e7dd6d5f5 100644
@@ -23,8 +23,6 @@
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
 #include "hw/core/irq.h"
-#include "system/kvm.h"
-#include "kvm_mips.h"
 #include "target/mips/cpu.h"
 
 static void cpu_mips_irq_request(void *opaque, int irq, int level)
@@ -45,10 +43,6 @@ static void cpu_mips_irq_request(void *opaque, int irq, int level)
         env->CP0_Cause &= ~(1 << (irq + CP0Ca_IP));
     }
 
-    if (kvm_enabled() && (irq == 2 || irq == 3)) {
-        kvm_mips_set_interrupt(cpu, irq, level);
-    }
-
     if (env->CP0_Cause & CP0Ca_IP_mask) {
         cpu_interrupt(cs, CPU_INTERRUPT_HARD);
     } else {
target/mips/cpu.c +0 -5
index f803d477632..a0e7e6a82a8 100644
@@ -25,9 +25,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "internal.h"
-#include "kvm_mips.h"
 #include "qemu/module.h"
-#include "system/kvm.h"
 #include "system/qtest.h"
 #include "hw/core/qdev-properties.h"
 #include "hw/core/qdev-clock.h"
@@ -416,9 +414,6 @@ static void mips_cpu_reset_hold(Object *obj, ResetType type)
         /* UHI interface can be used to obtain argc and argv */
         env->active_tc.gpr[4] = -1;
     }
-    if (kvm_enabled()) {
-        kvm_mips_reset_vcpu(cpu);
-    }
 #endif
 }
 
target/mips/kvm.c deleted +0 -1283

1,283 lines not on this page · raw message

target/mips/system/cp0_timer.c +2 -10
index 634c2a66bbd..6aed5d3af24 100644
@@ -23,7 +23,6 @@
 #include "qemu/osdep.h"
 #include "hw/core/irq.h"
 #include "qemu/timer.h"
-#include "system/kvm.h"
 #include "internal.h"
 
 /* MIPS R4K timer */
@@ -84,8 +83,7 @@ void cpu_mips_store_count(CPUMIPSState *env, uint32_t count)
 {
     /*
      * This gets called from cpu_state_reset(), potentially before timer init.
-     * So env->timer may be NULL, which is also the case with KVM enabled so
-     * treat timer as disabled in that case.
+     * So env->timer may be NULL, so treat timer as disabled in that case.
      */
     MIPSCPU *cpu = env_archcpu(env);
     if (env->CP0_Cause & (1 << CP0Ca_DC) || !env->timer) {
@@ -141,11 +139,5 @@ void cpu_mips_clock_init(MIPSCPU *cpu)
 {
     CPUMIPSState *env = &cpu->env;
 
-    /*
-     * If we're in KVM mode, don't create the periodic timer, that is handled in
-     * kernel.
-     */
-    if (!kvm_enabled()) {
-        env->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &mips_timer_cb, env);
-    }
+    env->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &mips_timer_cb, env);
 }
target/mips/system/physaddr.c +0 -1
index b8e1a5ac98e..1daf2fa0a28 100644
@@ -126,7 +126,6 @@ int get_physical_address(CPUMIPSState *env, hwaddr *physical,
     int KX = (env->CP0_Status & (1 << CP0St_KX)) != 0;
 #endif
     int ret = TLBRET_MATCH;
-    /* effective address (modified for KVM T&E kernel segments) */
     target_ulong address = real_address;
 
     if (address <= USEG_LIMIT) {
target/mips/meson.build +1 -5
index abf0ce3e8b9..5acb3a2dcf5 100644
@@ -13,11 +13,7 @@ if have_system
   subdir('system')
 endif
 
-if 'CONFIG_TCG' in config_all_accel
-  subdir('tcg')
-endif
-
-mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
+subdir('tcg')
 
 target_arch += {'mips': mips_ss}
 target_system_arch += {'mips': mips_system_ss}
Signature · 1 line
2.53.0
#5 lore raw

PATCH 5/5 buildsys: Remove MIPS TCG backend

In reply to Philippe Mathieu-Daudé

We removed support for MIPS host. Remove the now unreachable TCG host code.

---
 MAINTAINERS                                  |    9 -
 include/user/thunk.h                         |    2 +-
 linux-user/include/host/mips64/host-signal.h |   75 -
 tcg/mips64/tcg-target-con-set.h              |   30 -
 tcg/mips64/tcg-target-con-str.h              |   20 -
 tcg/mips64/tcg-target-has.h                  |   69 -
 tcg/mips64/tcg-target-mo.h                   |   13 -
 tcg/mips64/tcg-target.h                      |   75 -
 tcg/mips64/tcg-target-opc.h.inc              |    1 -
 linux-user/mmap.c                            |    2 +-
 tcg/mips64/tcg-target.c.inc                  | 2605 ------------------
 11 files changed, 2 insertions(+), 2899 deletions(-)
 delete mode 100644 linux-user/include/host/mips64/host-signal.h
 delete mode 100644 tcg/mips64/tcg-target-con-set.h
 delete mode 100644 tcg/mips64/tcg-target-con-str.h
 delete mode 100644 tcg/mips64/tcg-target-has.h
 delete mode 100644 tcg/mips64/tcg-target-mo.h
 delete mode 100644 tcg/mips64/tcg-target.h
 delete mode 100644 tcg/mips64/tcg-target-opc.h.inc
 delete mode 100644 tcg/mips64/tcg-target.c.inc
MAINTAINERS +0 -9
index 978696bbdb5..a47de471fcb 100644
@@ -4132,15 +4132,6 @@ M: WANG Xuerui <[email protected]>
 S: Maintained
 F: tcg/loongarch64/
 
-MIPS TCG target
-M: Philippe Mathieu-Daudé <[email protected]>
-R: Aurelien Jarno <[email protected]>
-R: Huacai Chen <[email protected]>
-R: Jiaxun Yang <[email protected]>
-R: Aleksandar Rikalo <[email protected]>
-S: Odd Fixes
-F: tcg/mips64/
-
 PPC TCG target
 M: Richard Henderson <[email protected]>
 S: Odd Fixes
include/user/thunk.h +1 -1
index 2a2104b568f..9af174eaa18 100644
@@ -115,7 +115,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
         if (is_host) {
 #if defined(HOST_X86_64)
             return 8;
-#elif defined(HOST_MIPS) || defined(HOST_SPARC64)
+#elif defined(HOST_SPARC64)
             return 4;
 #elif defined(HOST_PPC)
             return sizeof(void *);
linux-user/include/host/mips64/host-signal.h deleted +0 -75

75 lines not on this page · raw message

tcg/mips64/tcg-target-con-set.h deleted +0 -30
deleted file mode 100644
index 5304691dc18..00000000000
@@ -1,30 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Define MIPS target-specific constraint sets.
- * Copyright (c) 2021 Linaro
- */
-
-/*
- * C_On_Im(...) defines a constraint set with <n> outputs and <m> inputs.
- * Each operand should be a sequence of constraint letters as defined by
- * tcg-target-con-str.h; the constraint combination is inclusive or.
- */
-C_O0_I1(r)
-C_O0_I2(r, rz)
-C_O0_I2(rz, r)
-C_O0_I3(rz, rz, r)
-C_O0_I4(r, r, rz, rz)
-C_O1_I1(r, r)
-C_O1_I2(r, 0, rz)
-C_O1_I2(r, r, r)
-C_O1_I2(r, r, ri)
-C_O1_I2(r, r, rI)
-C_O1_I2(r, r, rIK)
-C_O1_I2(r, r, rJ)
-C_O1_I2(r, r, rz)
-C_O1_I2(r, r, rzW)
-C_O1_I4(r, r, rz, rz, 0)
-C_O1_I4(r, r, rz, rz, rz)
-C_O1_I4(r, r, r, rz, rz)
-C_O2_I1(r, r, r)
-C_O2_I2(r, r, r, r)
tcg/mips64/tcg-target-con-str.h deleted +0 -20
deleted file mode 100644
index db2b225e4a2..00000000000
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Define MIPS target-specific operand constraints.
- * Copyright (c) 2021 Linaro
- */
-
-/*
- * Define constraint letters for register sets:
- * REGS(letter, register_mask)
- */
-REGS('r', ALL_GENERAL_REGS)
-
-/*
- * Define constraint letters for constants:
- * CONST(letter, TCG_CT_CONST_* bit set)
- */
-CONST('I', TCG_CT_CONST_U16)
-CONST('J', TCG_CT_CONST_S16)
-CONST('K', TCG_CT_CONST_P2M1)
-CONST('W', TCG_CT_CONST_WSZ)
tcg/mips64/tcg-target-has.h deleted +0 -69

69 lines not on this page · raw message

tcg/mips64/tcg-target-mo.h deleted +0 -13
deleted file mode 100644
index 50cefc222d9..00000000000
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Define target-specific memory model
- * Copyright (c) 2008-2009 Arnaud Patard <[email protected]>
- * Copyright (c) 2009 Aurelien Jarno <[email protected]>
- */
-
-#ifndef TCG_TARGET_MO_H
-#define TCG_TARGET_MO_H
-
-#define TCG_TARGET_DEFAULT_MO  0
-
-#endif
tcg/mips64/tcg-target.h deleted +0 -75

75 lines not on this page · raw message

tcg/mips64/tcg-target-opc.h.inc deleted +0 -1
deleted file mode 100644
index 84e777bfe53..00000000000
@@ -1 +0,0 @@
-/* No target specific opcodes. */
linux-user/mmap.c +1 -1
index b635b6a21c4..b4b7b3e5cc9 100644
@@ -1351,7 +1351,7 @@ static inline abi_ulong target_shmlba(CPUArchState *cpu_env)
 }
 #endif
 
-#if defined(__mips__) || defined(__sparc__)
+#if defined(__sparc__)
 #define HOST_FORCE_SHMLBA 1
 #else
 #define HOST_FORCE_SHMLBA 0
tcg/mips64/tcg-target.c.inc deleted +0 -2605

2,605 lines not on this page · raw message

Signature · 1 line
2.53.0
Reviewed-by on v1 5/5
#6 lore raw

Re: [PATCH 5/5] buildsys: Remove MIPS TCG backend

Quoted 17 lines · Philippe Mathieu-Daudé

We removed support for MIPS host. Remove the now unreachable TCG host code.

---
  MAINTAINERS                                  |    9 -
  include/user/thunk.h                         |    2 +-
  linux-user/include/host/mips64/host-signal.h |   75 -
  tcg/mips64/tcg-target-con-set.h              |   30 -
  tcg/mips64/tcg-target-con-str.h              |   20 -
  tcg/mips64/tcg-target-has.h                  |   69 -
  tcg/mips64/tcg-target-mo.h                   |   13 -
  tcg/mips64/tcg-target.h                      |   75 -
  tcg/mips64/tcg-target-opc.h.inc              |    1 -
  linux-user/mmap.c                            |    2 +-
  tcg/mips64/tcg-target.c.inc                  | 2605 ------------------
  11 files changed, 2 insertions(+), 2899 deletions(-)
Quoted 8 lines

delete mode 100644 linux-user/include/host/mips64/host-signal.h delete mode 100644 tcg/mips64/tcg-target-con-set.h delete mode 100644 tcg/mips64/tcg-target-con-str.h delete mode 100644 tcg/mips64/tcg-target-has.h
delete mode 100644 tcg/mips64/tcg-target-mo.h
delete mode 100644 tcg/mips64/tcg-target.h
delete mode 100644 tcg/mips64/tcg-target-opc.h.inc delete mode 100644 tcg/mips64/tcg-target.c.inc

Missed ./common-user/host/mips64.

Otherwise,

r~

#7 lore raw

Re: [PATCH 5/5] buildsys: Remove MIPS TCG backend

Quoted 27 lines · Richard Henderson
Quoted 17 lines · Philippe Mathieu-Daudé

We removed support for MIPS host. Remove the now unreachable TCG host code.

---
  MAINTAINERS                                  |    9 - include/user/thunk.h                         |    2 +- linux-user/include/host/mips64/host-signal.h |   75 - tcg/mips64/tcg-target-con-set.h              |   30 - tcg/mips64/tcg-target-con-str.h              |   20 - tcg/mips64/tcg-target-has.h                  |   69 - tcg/mips64/tcg-target-mo.h                   |   13 - tcg/mips64/tcg-target.h                      |   75 - tcg/mips64/tcg-target-opc.h.inc              |    1 - linux-user/mmap.c                            |    2 +- tcg/mips64/tcg-target.c.inc                  | 2605 ------------------

  11 files changed, 2 insertions(+), 2899 deletions(-)
Quoted 8 lines

  delete mode 100644 linux-user/include/host/mips64/host-signal.h delete mode 100644 tcg/mips64/tcg-target-con-set.h delete mode 100644 tcg/mips64/tcg-target-con-str.h delete mode 100644 tcg/mips64/tcg-target-has.h
  delete mode 100644 tcg/mips64/tcg-target-mo.h
  delete mode 100644 tcg/mips64/tcg-target.h
  delete mode 100644 tcg/mips64/tcg-target-opc.h.inc delete mode 100644 tcg/mips64/tcg-target.c.inc

Quoted 1 line

Missed ./common-user/host/mips64.

Oh, thanks!

Quoted 4 lines

Otherwise,

r~

Reviewed-by on the v1 series
#8 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé

During the v10.2 development cycle we deprecated MIPS host support (mostly because Debian which we use to test in our CI dropped the architecture when releasing Debian 13).

Quoted 8 lines

This series removes host support for MIPS.

Philippe Mathieu-Daudé (5):
buildsys: Remove MIPS cross containers
buildsys: Remove support for MIPS hosts
hw/mips: Include missing 'cpu.h' header
buildsys: Remove MIPS KVM
buildsys: Remove MIPS TCG backend

Modulo the note on patch 5,

r~

#9 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

This series removes host support for MIPS.

Philippe Mathieu-Daudé (5):
buildsys: Remove MIPS cross containers
buildsys: Remove support for MIPS hosts
hw/mips: Include missing 'cpu.h' header
buildsys: Remove MIPS KVM
buildsys: Remove MIPS TCG backend

Series queued, thanks.