1
The following changes since commit 0319ad22bd5789e1eaa8a2dd5773db2d2c372f20:
1
The following changes since commit 48ab886d3da4f3ab94f79f6c0f8b4535b446bbfd:
2
2
3
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-misc-updates-250521-2' into staging (2021-05-25 17:31:04 +0100)
3
Merge tag 'pull-target-arm-20230619' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-06-19 16:32:25 +0200)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210526
7
https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230620
8
8
9
for you to fetch changes up to 119065574d02deffc28fe5b6a864db9b467c6ffd:
9
for you to fetch changes up to d7ee93e24359703debf4137f4cc632563aa4e8d1:
10
10
11
hw/core: Constify TCGCPUOps (2021-05-26 15:33:59 -0700)
11
cputlb: Restrict SavedIOTLB to system emulation (2023-06-20 10:02:14 +0200)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Adjust types for some memory access functions.
14
tcg: Define _CALL_AIX for clang on ppc64
15
Reduce inclusion of tcg headers.
15
accel/tcg: Build fix for macos catalina
16
Fix watchpoints vs replay.
16
accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN
17
Fix tcg/aarch64 roli expansion.
17
accel/tcg: Restrict SavedIOTLB to system emulation
18
Introduce SysemuCPUOps structure.
18
accel/tcg: Use generic 'helper-proto-common.h' header
19
plugins: Remove unused 'exec/helper-proto.h' header
20
*: Check for CONFIG_USER_ONLY instead of CONFIG_SOFTMMU
19
21
20
----------------------------------------------------------------
22
----------------------------------------------------------------
21
Pavel Dovgalyuk (1):
23
Philippe Mathieu-Daudé (13):
22
replay: fix watchpoint processing for reverse debugging
24
target/i386: Simplify i386_tr_init_disas_context()
25
target/tricore: Remove pointless CONFIG_SOFTMMU guard
26
target/m68k: Check for USER_ONLY definition instead of SOFTMMU one
27
target/ppc: Check for USER_ONLY definition instead of SOFTMMU one
28
hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one
29
accel/tcg: Check for USER_ONLY definition instead of SOFTMMU one
30
meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY
31
meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY
32
meson: Replace softmmu_ss -> system_ss
33
plugins: Remove unused 'exec/helper-proto.h' header
34
accel/tcg/cpu-exec: Use generic 'helper-proto-common.h' header
35
exec/cpu-defs: Check for SOFTMMU instead of !USER_ONLY
36
cputlb: Restrict SavedIOTLB to system emulation
23
37
24
Philippe Mathieu-Daudé (27):
38
Richard Henderson (3):
25
exec/memory_ldst_cached: Sort declarations
39
host/include/x86_64: Use __m128i for "x" constraints
26
exec/memory_ldst_phys: Sort declarations
40
accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN
27
exec/memory_ldst: Use correct type sizes
41
tcg/ppc: Define _CALL_AIX for clang on ppc64(be)
28
exec/memory_ldst_phys: Use correct type sizes
29
exec/memory_ldst_cached: Use correct type size
30
exec/memory: Use correct type size
31
accel/tcg: Reduce 'exec/tb-context.h' inclusion
32
accel/tcg: Keep TranslationBlock headers local to TCG
33
cpu: Remove duplicated 'sysemu/hw_accel.h' header
34
cpu: Split as cpu-common / cpu-sysemu
35
cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs
36
cpu: Introduce cpu_virtio_is_big_endian()
37
cpu: Directly use cpu_write_elf*() fallback handlers in place
38
cpu: Directly use get_paging_enabled() fallback handlers in place
39
cpu: Directly use get_memory_mapping() fallback handlers in place
40
cpu: Assert DeviceClass::vmsd is NULL on user emulation
41
cpu: Rename CPUClass vmsd -> legacy_vmsd
42
cpu: Move AVR target vmsd field from CPUClass to DeviceClass
43
cpu: Introduce SysemuCPUOps structure
44
cpu: Move CPUClass::vmsd to SysemuCPUOps
45
cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps
46
cpu: Move CPUClass::get_crash_info to SysemuCPUOps
47
cpu: Move CPUClass::write_elf* to SysemuCPUOps
48
cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps
49
cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps
50
cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps
51
cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps
52
42
53
Richard Henderson (2):
43
docs/devel/build-system.rst | 14 +--
54
target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed
44
meson.build | 15 +--
55
hw/core: Constify TCGCPUOps
45
accel/tcg/internal.h | 6 +-
46
host/include/x86_64/host/atomic128-ldst.h | 25 ++--
47
host/include/x86_64/host/load-extract-al16-al8.h | 8 +-
48
include/exec/cpu-defs.h | 12 +-
49
include/hw/core/cpu.h | 10 +-
50
include/hw/core/tcg-cpu-ops.h | 102 ++++++++--------
51
target/m68k/helper.h | 2 +-
52
accel/tcg/cpu-exec.c | 6 +-
53
accel/tcg/cputlb.c | 1 +
54
plugins/core.c | 1 -
55
target/i386/tcg/translate.c | 3 -
56
target/m68k/cpu.c | 14 +--
57
target/m68k/helper.c | 4 +-
58
target/m68k/translate.c | 28 ++---
59
target/ppc/cpu_init.c | 20 +--
60
target/ppc/helper_regs.c | 6 +-
61
target/tricore/helper.c | 2 -
62
tcg/ppc/tcg-target.c.inc | 23 ++--
63
accel/meson.build | 4 +-
64
accel/qtest/meson.build | 2 +-
65
accel/stubs/meson.build | 2 +-
66
accel/tcg/meson.build | 6 +-
67
audio/meson.build | 8 +-
68
backends/meson.build | 20 +--
69
backends/tpm/meson.build | 8 +-
70
block/meson.build | 6 +-
71
block/monitor/meson.build | 2 +-
72
chardev/meson.build | 2 +-
73
disas/meson.build | 2 +-
74
dump/meson.build | 4 +-
75
ebpf/meson.build | 2 +-
76
fsdev/meson.build | 4 +-
77
gdbstub/meson.build | 10 +-
78
hw/9pfs/meson.build | 2 +-
79
hw/acpi/meson.build | 10 +-
80
hw/adc/meson.build | 10 +-
81
hw/arm/meson.build | 8 +-
82
hw/audio/meson.build | 28 ++---
83
hw/block/meson.build | 28 ++---
84
hw/char/meson.build | 70 +++++------
85
hw/core/meson.build | 22 ++--
86
hw/cpu/meson.build | 6 +-
87
hw/cxl/meson.build | 4 +-
88
hw/display/meson.build | 76 ++++++------
89
hw/dma/meson.build | 32 ++---
90
hw/gpio/meson.build | 26 ++--
91
hw/i2c/meson.build | 2 +-
92
hw/i386/kvm/meson.build | 2 +-
93
hw/ide/meson.build | 28 ++---
94
hw/input/meson.build | 32 ++---
95
hw/intc/meson.build | 44 +++----
96
hw/ipack/meson.build | 2 +-
97
hw/ipmi/meson.build | 2 +-
98
hw/isa/meson.build | 18 +--
99
hw/mem/meson.build | 8 +-
100
hw/misc/macio/meson.build | 2 +-
101
hw/misc/meson.build | 148 +++++++++++------------
102
hw/net/can/meson.build | 16 +--
103
hw/net/meson.build | 96 +++++++--------
104
hw/nubus/meson.build | 2 +-
105
hw/nvme/meson.build | 2 +-
106
hw/nvram/meson.build | 26 ++--
107
hw/pci-bridge/meson.build | 4 +-
108
hw/pci-host/meson.build | 2 +-
109
hw/pci/meson.build | 8 +-
110
hw/pcmcia/meson.build | 4 +-
111
hw/rdma/meson.build | 2 +-
112
hw/remote/meson.build | 2 +-
113
hw/rtc/meson.build | 28 ++---
114
hw/scsi/meson.build | 2 +-
115
hw/sd/meson.build | 24 ++--
116
hw/sensor/meson.build | 18 +--
117
hw/smbios/meson.build | 6 +-
118
hw/ssi/meson.build | 26 ++--
119
hw/timer/meson.build | 74 ++++++------
120
hw/tpm/meson.build | 14 +--
121
hw/usb/meson.build | 74 ++++++------
122
hw/virtio/meson.build | 12 +-
123
hw/watchdog/meson.build | 18 +--
124
hw/xen/meson.build | 4 +-
125
migration/meson.build | 12 +-
126
monitor/meson.build | 6 +-
127
net/can/meson.build | 2 +-
128
net/meson.build | 38 +++---
129
qapi/meson.build | 2 +-
130
qom/meson.build | 2 +-
131
replay/meson.build | 2 +-
132
semihosting/meson.build | 2 +-
133
softmmu/meson.build | 12 +-
134
stats/meson.build | 2 +-
135
target/alpha/meson.build | 6 +-
136
target/arm/hvf/meson.build | 2 +-
137
target/arm/meson.build | 6 +-
138
target/arm/tcg/meson.build | 2 +-
139
target/avr/meson.build | 6 +-
140
target/cris/meson.build | 6 +-
141
target/hppa/meson.build | 6 +-
142
target/i386/hax/meson.build | 6 +-
143
target/i386/hvf/meson.build | 2 +-
144
target/i386/kvm/meson.build | 4 +-
145
target/i386/meson.build | 8 +-
146
target/i386/nvmm/meson.build | 4 +-
147
target/i386/tcg/sysemu/meson.build | 2 +-
148
target/i386/whpx/meson.build | 2 +-
149
target/loongarch/meson.build | 6 +-
150
target/m68k/meson.build | 6 +-
151
target/microblaze/meson.build | 6 +-
152
target/mips/meson.build | 4 +-
153
target/mips/sysemu/meson.build | 2 +-
154
target/mips/tcg/sysemu/meson.build | 2 +-
155
target/nios2/meson.build | 6 +-
156
target/openrisc/meson.build | 6 +-
157
target/ppc/meson.build | 10 +-
158
target/riscv/meson.build | 6 +-
159
target/s390x/kvm/meson.build | 2 +-
160
target/s390x/meson.build | 6 +-
161
target/sh4/meson.build | 6 +-
162
target/sparc/meson.build | 6 +-
163
target/tricore/meson.build | 4 +-
164
target/xtensa/meson.build | 6 +-
165
tcg/meson.build | 2 +-
166
trace/meson.build | 2 +-
167
ui/meson.build | 30 ++---
168
125 files changed, 864 insertions(+), 854 deletions(-)
56
169
57
Yasuo Kuwahara (1):
58
tcg/aarch64: Fix tcg_out_rotl
59
60
{include/exec => accel/tcg}/tb-context.h | 0
61
{include/exec => accel/tcg}/tb-hash.h | 0
62
{include/exec => accel/tcg}/tb-lookup.h | 2 +-
63
include/exec/exec-all.h | 1 -
64
include/exec/memory.h | 2 +-
65
include/hw/core/cpu.h | 94 +++++---------------
66
include/hw/core/sysemu-cpu-ops.h | 92 ++++++++++++++++++++
67
include/migration/vmstate.h | 2 -
68
include/tcg/tcg.h | 1 -
69
plugins/plugin.h | 1 +
70
target/mips/cpu-qom.h | 3 +
71
include/exec/memory_ldst.h.inc | 16 ++--
72
include/exec/memory_ldst_cached.h.inc | 46 +++++-----
73
include/exec/memory_ldst_phys.h.inc | 72 +++++++--------
74
accel/tcg/cpu-exec.c | 5 +-
75
accel/tcg/cputlb.c | 2 +-
76
accel/tcg/tcg-runtime.c | 2 +-
77
accel/tcg/translate-all.c | 3 +-
78
cpu.c | 18 ++--
79
hw/core/{cpu.c => cpu-common.c} | 116 -------------------------
80
hw/core/cpu-sysemu.c | 145 +++++++++++++++++++++++++++++++
81
hw/mips/jazz.c | 35 +-------
82
hw/virtio/virtio.c | 4 +-
83
softmmu/physmem.c | 10 +++
84
stubs/vmstate.c | 2 -
85
target/alpha/cpu.c | 12 ++-
86
target/arm/cpu.c | 22 +++--
87
target/arm/cpu_tcg.c | 2 +-
88
target/avr/cpu.c | 12 ++-
89
target/avr/machine.c | 4 +-
90
target/cris/cpu.c | 14 ++-
91
target/hexagon/cpu.c | 2 +-
92
target/hppa/cpu.c | 12 ++-
93
target/i386/cpu.c | 30 ++++---
94
target/i386/tcg/tcg-cpu.c | 2 +-
95
target/m68k/cpu.c | 12 ++-
96
target/microblaze/cpu.c | 12 ++-
97
target/mips/cpu.c | 14 ++-
98
target/mips/tcg/op_helper.c | 3 +-
99
target/nios2/cpu.c | 12 ++-
100
target/openrisc/cpu.c | 12 ++-
101
target/ppc/cpu_init.c | 24 ++---
102
target/riscv/cpu.c | 19 ++--
103
target/rx/cpu.c | 14 ++-
104
target/s390x/cpu.c | 18 ++--
105
target/sh4/cpu.c | 15 +++-
106
target/sparc/cpu.c | 14 ++-
107
target/tricore/cpu.c | 10 ++-
108
target/xtensa/cpu.c | 14 ++-
109
memory_ldst.c.inc | 20 ++---
110
tcg/aarch64/tcg-target.c.inc | 5 +-
111
MAINTAINERS | 1 -
112
hw/core/meson.build | 3 +-
113
53 files changed, 602 insertions(+), 406 deletions(-)
114
rename {include/exec => accel/tcg}/tb-context.h (100%)
115
rename {include/exec => accel/tcg}/tb-hash.h (100%)
116
rename {include/exec => accel/tcg}/tb-lookup.h (98%)
117
create mode 100644 include/hw/core/sysemu-cpu-ops.h
118
rename hw/core/{cpu.c => cpu-common.c} (73%)
119
create mode 100644 hw/core/cpu-sysemu.c
120
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
To ease the file review, sort the declarations by the size of
4
the access (8, 16, 32). Simple code movement, no logical change.
5
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
Message-Id: <20210518183655.1711377-2-philmd@redhat.com>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
---
10
include/exec/memory_ldst_cached.h.inc | 46 +++++++++++++--------------
11
1 file changed, 23 insertions(+), 23 deletions(-)
12
13
diff --git a/include/exec/memory_ldst_cached.h.inc b/include/exec/memory_ldst_cached.h.inc
14
index XXXXXXX..XXXXXXX 100644
15
--- a/include/exec/memory_ldst_cached.h.inc
16
+++ b/include/exec/memory_ldst_cached.h.inc
17
@@ -XXX,XX +XXX,XX @@
18
#define LD_P(size) \
19
glue(glue(ld, size), glue(ENDIANNESS, _p))
20
21
+static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
22
+ hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
23
+{
24
+ assert(addr < cache->len && 2 <= cache->len - addr);
25
+ fuzz_dma_read_cb(cache->xlat + addr, 2, cache->mrs.mr);
26
+ if (likely(cache->ptr)) {
27
+ return LD_P(uw)(cache->ptr + addr);
28
+ } else {
29
+ return ADDRESS_SPACE_LD_CACHED_SLOW(uw)(cache, addr, attrs, result);
30
+ }
31
+}
32
+
33
static inline uint32_t ADDRESS_SPACE_LD_CACHED(l)(MemoryRegionCache *cache,
34
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
35
{
36
@@ -XXX,XX +XXX,XX @@ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryRegionCache *cache,
37
}
38
}
39
40
-static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
41
- hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
42
-{
43
- assert(addr < cache->len && 2 <= cache->len - addr);
44
- fuzz_dma_read_cb(cache->xlat + addr, 2, cache->mrs.mr);
45
- if (likely(cache->ptr)) {
46
- return LD_P(uw)(cache->ptr + addr);
47
- } else {
48
- return ADDRESS_SPACE_LD_CACHED_SLOW(uw)(cache, addr, attrs, result);
49
- }
50
-}
51
-
52
#undef ADDRESS_SPACE_LD_CACHED
53
#undef ADDRESS_SPACE_LD_CACHED_SLOW
54
#undef LD_P
55
@@ -XXX,XX +XXX,XX @@ static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
56
#define ST_P(size) \
57
glue(glue(st, size), glue(ENDIANNESS, _p))
58
59
-static inline void ADDRESS_SPACE_ST_CACHED(l)(MemoryRegionCache *cache,
60
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
61
-{
62
- assert(addr < cache->len && 4 <= cache->len - addr);
63
- if (likely(cache->ptr)) {
64
- ST_P(l)(cache->ptr + addr, val);
65
- } else {
66
- ADDRESS_SPACE_ST_CACHED_SLOW(l)(cache, addr, val, attrs, result);
67
- }
68
-}
69
-
70
static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache,
71
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
72
{
73
@@ -XXX,XX +XXX,XX @@ static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache,
74
}
75
}
76
77
+static inline void ADDRESS_SPACE_ST_CACHED(l)(MemoryRegionCache *cache,
78
+ hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
79
+{
80
+ assert(addr < cache->len && 4 <= cache->len - addr);
81
+ if (likely(cache->ptr)) {
82
+ ST_P(l)(cache->ptr + addr, val);
83
+ } else {
84
+ ADDRESS_SPACE_ST_CACHED_SLOW(l)(cache, addr, val, attrs, result);
85
+ }
86
+}
87
+
88
static inline void ADDRESS_SPACE_ST_CACHED(q)(MemoryRegionCache *cache,
89
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result)
90
{
91
--
92
2.25.1
93
94
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
To ease the file review, sort the declarations by the size of
4
the access (8, 16, 32). Simple code movement, no logical change.
5
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
Message-Id: <20210518183655.1711377-3-philmd@redhat.com>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
---
10
include/exec/memory_ldst_phys.h.inc | 78 ++++++++++++++---------------
11
1 file changed, 39 insertions(+), 39 deletions(-)
12
13
diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst_phys.h.inc
14
index XXXXXXX..XXXXXXX 100644
15
--- a/include/exec/memory_ldst_phys.h.inc
16
+++ b/include/exec/memory_ldst_phys.h.inc
17
@@ -XXX,XX +XXX,XX @@
18
*/
19
20
#ifdef TARGET_ENDIANNESS
21
+static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
22
+{
23
+ return glue(address_space_lduw, SUFFIX)(ARG1, addr,
24
+ MEMTXATTRS_UNSPECIFIED, NULL);
25
+}
26
+
27
static inline uint32_t glue(ldl_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
28
{
29
return glue(address_space_ldl, SUFFIX)(ARG1, addr,
30
@@ -XXX,XX +XXX,XX @@ static inline uint64_t glue(ldq_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
31
MEMTXATTRS_UNSPECIFIED, NULL);
32
}
33
34
-static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
35
+static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
36
{
37
- return glue(address_space_lduw, SUFFIX)(ARG1, addr,
38
- MEMTXATTRS_UNSPECIFIED, NULL);
39
+ glue(address_space_stw, SUFFIX)(ARG1, addr, val,
40
+ MEMTXATTRS_UNSPECIFIED, NULL);
41
}
42
43
static inline void glue(stl_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
44
@@ -XXX,XX +XXX,XX @@ static inline void glue(stl_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
45
MEMTXATTRS_UNSPECIFIED, NULL);
46
}
47
48
-static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
49
-{
50
- glue(address_space_stw, SUFFIX)(ARG1, addr, val,
51
- MEMTXATTRS_UNSPECIFIED, NULL);
52
-}
53
-
54
static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val)
55
{
56
glue(address_space_stq, SUFFIX)(ARG1, addr, val,
57
MEMTXATTRS_UNSPECIFIED, NULL);
58
}
59
#else
60
+static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
61
+{
62
+ return glue(address_space_ldub, SUFFIX)(ARG1, addr,
63
+ MEMTXATTRS_UNSPECIFIED, NULL);
64
+}
65
+
66
+static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
67
+{
68
+ return glue(address_space_lduw_le, SUFFIX)(ARG1, addr,
69
+ MEMTXATTRS_UNSPECIFIED, NULL);
70
+}
71
+
72
+static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
73
+{
74
+ return glue(address_space_lduw_be, SUFFIX)(ARG1, addr,
75
+ MEMTXATTRS_UNSPECIFIED, NULL);
76
+}
77
+
78
static inline uint32_t glue(ldl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
79
{
80
return glue(address_space_ldl_le, SUFFIX)(ARG1, addr,
81
@@ -XXX,XX +XXX,XX @@ static inline uint64_t glue(ldq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
82
MEMTXATTRS_UNSPECIFIED, NULL);
83
}
84
85
-static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
86
-{
87
- return glue(address_space_ldub, SUFFIX)(ARG1, addr,
88
- MEMTXATTRS_UNSPECIFIED, NULL);
89
-}
90
-
91
-static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
92
-{
93
- return glue(address_space_lduw_le, SUFFIX)(ARG1, addr,
94
- MEMTXATTRS_UNSPECIFIED, NULL);
95
-}
96
-
97
-static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
98
-{
99
- return glue(address_space_lduw_be, SUFFIX)(ARG1, addr,
100
- MEMTXATTRS_UNSPECIFIED, NULL);
101
-}
102
-
103
-static inline void glue(stl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
104
-{
105
- glue(address_space_stl_le, SUFFIX)(ARG1, addr, val,
106
- MEMTXATTRS_UNSPECIFIED, NULL);
107
-}
108
-
109
-static inline void glue(stl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
110
-{
111
- glue(address_space_stl_be, SUFFIX)(ARG1, addr, val,
112
- MEMTXATTRS_UNSPECIFIED, NULL);
113
-}
114
-
115
static inline void glue(stb_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
116
{
117
glue(address_space_stb, SUFFIX)(ARG1, addr, val,
118
@@ -XXX,XX +XXX,XX @@ static inline void glue(stw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t va
119
MEMTXATTRS_UNSPECIFIED, NULL);
120
}
121
122
+static inline void glue(stl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
123
+{
124
+ glue(address_space_stl_le, SUFFIX)(ARG1, addr, val,
125
+ MEMTXATTRS_UNSPECIFIED, NULL);
126
+}
127
+
128
+static inline void glue(stl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
129
+{
130
+ glue(address_space_stl_be, SUFFIX)(ARG1, addr, val,
131
+ MEMTXATTRS_UNSPECIFIED, NULL);
132
+}
133
+
134
static inline void glue(stq_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val)
135
{
136
glue(address_space_stq_le, SUFFIX)(ARG1, addr, val,
137
--
138
2.25.1
139
140
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
1
The macOS catalina compiler produces an error for __int128_t
2
as the type for allocation with SSE inline asm constraint.
3
Create a new X86Int128Union type and use the vector type for
4
all SSE register inputs and outputs.
2
5
3
Use uint8_t for (unsigned) byte, and uint16_t for (unsigned)
6
Tested-by: Peter Maydell <peter.maydell@linaro.org>
4
16-bit word.
5
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
Message-Id: <20210518183655.1711377-4-philmd@redhat.com>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
---
8
---
10
include/exec/memory_ldst.h.inc | 16 ++++++++--------
9
host/include/x86_64/host/atomic128-ldst.h | 25 ++++++++++++-------
11
memory_ldst.c.inc | 20 ++++++++++----------
10
.../x86_64/host/load-extract-al16-al8.h | 8 +++---
12
2 files changed, 18 insertions(+), 18 deletions(-)
11
2 files changed, 20 insertions(+), 13 deletions(-)
13
12
14
diff --git a/include/exec/memory_ldst.h.inc b/include/exec/memory_ldst.h.inc
13
diff --git a/host/include/x86_64/host/atomic128-ldst.h b/host/include/x86_64/host/atomic128-ldst.h
15
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
16
--- a/include/exec/memory_ldst.h.inc
15
--- a/host/include/x86_64/host/atomic128-ldst.h
17
+++ b/include/exec/memory_ldst.h.inc
16
+++ b/host/include/x86_64/host/atomic128-ldst.h
18
@@ -XXX,XX +XXX,XX @@
17
@@ -XXX,XX +XXX,XX @@
18
* atomic primitive is meant to provide.
19
*/
19
*/
20
20
21
#ifdef TARGET_ENDIANNESS
21
-#ifndef AARCH64_ATOMIC128_LDST_H
22
-extern uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
22
-#define AARCH64_ATOMIC128_LDST_H
23
+extern uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
23
+#ifndef X86_64_ATOMIC128_LDST_H
24
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
24
+#define X86_64_ATOMIC128_LDST_H
25
extern uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL,
25
26
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
26
#ifdef CONFIG_INT128_TYPE
27
@@ -XXX,XX +XXX,XX @@ extern uint64_t glue(address_space_ldq, SUFFIX)(ARG1_DECL,
27
#include "host/cpuinfo.h"
28
extern void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL,
28
#include "tcg/debug-assert.h"
29
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
29
+#include <immintrin.h>
30
extern void glue(address_space_stw, SUFFIX)(ARG1_DECL,
30
+
31
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
31
+typedef union {
32
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
32
+ __m128i v;
33
extern void glue(address_space_stl, SUFFIX)(ARG1_DECL,
33
+ __int128_t i;
34
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
34
+ Int128 s;
35
extern void glue(address_space_stq, SUFFIX)(ARG1_DECL,
35
+} X86Int128Union;
36
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
36
37
#else
37
/*
38
-extern uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
38
* Through clang 16, with -mcx16, __atomic_load_n is incorrectly
39
+extern uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
39
@@ -XXX,XX +XXX,XX @@
40
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
40
41
-extern uint32_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
41
static inline Int128 atomic16_read_ro(const Int128 *ptr)
42
+extern uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
42
{
43
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
43
- Int128Alias r;
44
-extern uint32_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
44
+ X86Int128Union r;
45
+extern uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
45
46
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
46
tcg_debug_assert(HAVE_ATOMIC128_RO);
47
extern uint32_t glue(address_space_ldl_le, SUFFIX)(ARG1_DECL,
47
- asm("vmovdqa %1, %0" : "=x" (r.i) : "m" (*ptr));
48
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
48
+ asm("vmovdqa %1, %0" : "=x" (r.v) : "m" (*ptr));
49
@@ -XXX,XX +XXX,XX @@ extern uint64_t glue(address_space_ldq_le, SUFFIX)(ARG1_DECL,
49
50
extern uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
50
return r.s;
51
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
51
}
52
extern void glue(address_space_stb, SUFFIX)(ARG1_DECL,
52
@@ -XXX,XX +XXX,XX @@ static inline Int128 atomic16_read_ro(const Int128 *ptr)
53
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
53
static inline Int128 atomic16_read_rw(Int128 *ptr)
54
+ hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result);
54
{
55
extern void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
55
__int128_t *ptr_align = __builtin_assume_aligned(ptr, 16);
56
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
56
- Int128Alias r;
57
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
57
+ X86Int128Union r;
58
extern void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
58
59
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
59
if (HAVE_ATOMIC128_RO) {
60
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
60
- asm("vmovdqa %1, %0" : "=x" (r.i) : "m" (*ptr_align));
61
extern void glue(address_space_stl_le, SUFFIX)(ARG1_DECL,
61
+ asm("vmovdqa %1, %0" : "=x" (r.v) : "m" (*ptr_align));
62
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
62
} else {
63
extern void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
63
r.i = __sync_val_compare_and_swap_16(ptr_align, 0, 0);
64
diff --git a/memory_ldst.c.inc b/memory_ldst.c.inc
64
}
65
@@ -XXX,XX +XXX,XX @@ static inline Int128 atomic16_read_rw(Int128 *ptr)
66
static inline void atomic16_set(Int128 *ptr, Int128 val)
67
{
68
__int128_t *ptr_align = __builtin_assume_aligned(ptr, 16);
69
- Int128Alias new = { .s = val };
70
+ X86Int128Union new = { .s = val };
71
72
if (HAVE_ATOMIC128_RO) {
73
- asm("vmovdqa %1, %0" : "=m"(*ptr_align) : "x" (new.i));
74
+ asm("vmovdqa %1, %0" : "=m"(*ptr_align) : "x" (new.v));
75
} else {
76
__int128_t old;
77
do {
78
@@ -XXX,XX +XXX,XX @@ static inline void atomic16_set(Int128 *ptr, Int128 val)
79
#include "host/include/generic/host/atomic128-ldst.h"
80
#endif
81
82
-#endif /* AARCH64_ATOMIC128_LDST_H */
83
+#endif /* X86_64_ATOMIC128_LDST_H */
84
diff --git a/host/include/x86_64/host/load-extract-al16-al8.h b/host/include/x86_64/host/load-extract-al16-al8.h
65
index XXXXXXX..XXXXXXX 100644
85
index XXXXXXX..XXXXXXX 100644
66
--- a/memory_ldst.c.inc
86
--- a/host/include/x86_64/host/load-extract-al16-al8.h
67
+++ b/memory_ldst.c.inc
87
+++ b/host/include/x86_64/host/load-extract-al16-al8.h
68
@@ -XXX,XX +XXX,XX @@ uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
88
@@ -XXX,XX +XXX,XX @@
69
DEVICE_BIG_ENDIAN);
89
#define X86_64_LOAD_EXTRACT_AL16_AL8_H
90
91
#ifdef CONFIG_INT128_TYPE
92
-#include "host/cpuinfo.h"
93
+#include "host/atomic128-ldst.h"
94
95
/**
96
* load_atom_extract_al16_or_al8:
97
@@ -XXX,XX +XXX,XX @@ load_atom_extract_al16_or_al8(void *pv, int s)
98
uintptr_t pi = (uintptr_t)pv;
99
__int128_t *ptr_align = (__int128_t *)(pi & ~7);
100
int shr = (pi & 7) * 8;
101
- Int128Alias r;
102
+ X86Int128Union r;
103
104
/*
105
* ptr_align % 16 is now only 0 or 8.
106
@@ -XXX,XX +XXX,XX @@ load_atom_extract_al16_or_al8(void *pv, int s)
107
* when ptr_align % 16 == 0 for 16-byte atomicity.
108
*/
109
if ((cpuinfo & CPUINFO_ATOMIC_VMOVDQU) || (pi & 8)) {
110
- asm("vmovdqu %1, %0" : "=x" (r.i) : "m" (*ptr_align));
111
+ asm("vmovdqu %1, %0" : "=x" (r.v) : "m" (*ptr_align));
112
} else {
113
- asm("vmovdqa %1, %0" : "=x" (r.i) : "m" (*ptr_align));
114
+ asm("vmovdqa %1, %0" : "=x" (r.v) : "m" (*ptr_align));
115
}
116
return int128_getlo(int128_urshift(r.s, shr));
70
}
117
}
71
72
-uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
73
+uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
74
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
75
{
76
uint8_t *ptr;
77
@@ -XXX,XX +XXX,XX @@ uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
78
}
79
80
/* warning: addr must be aligned */
81
-static inline uint32_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
82
+static inline uint16_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
83
hwaddr addr, MemTxAttrs attrs, MemTxResult *result,
84
enum device_endian endian)
85
{
86
@@ -XXX,XX +XXX,XX @@ static inline uint32_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
87
return val;
88
}
89
90
-uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
91
+uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
92
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
93
{
94
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
95
DEVICE_NATIVE_ENDIAN);
96
}
97
98
-uint32_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
99
+uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
100
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
101
{
102
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
103
DEVICE_LITTLE_ENDIAN);
104
}
105
106
-uint32_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
107
+uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
108
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
109
{
110
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
111
@@ -XXX,XX +XXX,XX @@ void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
112
}
113
114
void glue(address_space_stb, SUFFIX)(ARG1_DECL,
115
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
116
+ hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result)
117
{
118
uint8_t *ptr;
119
MemoryRegion *mr;
120
@@ -XXX,XX +XXX,XX @@ void glue(address_space_stb, SUFFIX)(ARG1_DECL,
121
122
/* warning: addr must be aligned */
123
static inline void glue(address_space_stw_internal, SUFFIX)(ARG1_DECL,
124
- hwaddr addr, uint32_t val, MemTxAttrs attrs,
125
+ hwaddr addr, uint16_t val, MemTxAttrs attrs,
126
MemTxResult *result, enum device_endian endian)
127
{
128
uint8_t *ptr;
129
@@ -XXX,XX +XXX,XX @@ static inline void glue(address_space_stw_internal, SUFFIX)(ARG1_DECL,
130
}
131
132
void glue(address_space_stw, SUFFIX)(ARG1_DECL,
133
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
134
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
135
{
136
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
137
DEVICE_NATIVE_ENDIAN);
138
}
139
140
void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
141
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
142
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
143
{
144
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
145
DEVICE_LITTLE_ENDIAN);
146
}
147
148
void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
149
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
150
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
151
{
152
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
153
DEVICE_BIG_ENDIAN);
154
--
118
--
155
2.25.1
119
2.34.1
156
157
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
Otherwise we hit the default assert not reached.
2
Handle it as MO_ATOM_NONE, because of size and misalignment.
3
We already handle this correctly in do_ld16_beN.
2
4
3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5
Message-Id: <20210517105140.1062037-23-f4bug@amsat.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
---
7
---
8
include/hw/core/cpu.h | 2 --
8
accel/tcg/cputlb.c | 1 +
9
include/hw/core/sysemu-cpu-ops.h | 4 ++++
9
1 file changed, 1 insertion(+)
10
hw/core/cpu-sysemu.c | 4 ++--
11
target/i386/cpu.c | 4 +++-
12
4 files changed, 9 insertions(+), 5 deletions(-)
13
10
14
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
11
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
15
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
16
--- a/include/hw/core/cpu.h
13
--- a/accel/tcg/cputlb.c
17
+++ b/include/hw/core/cpu.h
14
+++ b/accel/tcg/cputlb.c
18
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
15
@@ -XXX,XX +XXX,XX @@ static uint64_t do_st16_leN(CPUArchState *env, MMULookupPageData *p,
19
* @dump_state: Callback for dumping state.
16
* and so neither is atomic.
20
* @dump_statistics: Callback for dumping statistics.
17
*/
21
* @get_arch_id: Callback for getting architecture-dependent CPU ID.
18
case MO_ATOM_IFALIGN:
22
- * @get_paging_enabled: Callback for inquiring whether paging is enabled.
19
+ case MO_ATOM_WITHIN16:
23
* @set_pc: Callback for setting the Program Counter register. This
20
case MO_ATOM_NONE:
24
* should have the semantics used by the target architecture when
21
stq_le_p(p->haddr, int128_getlo(val_le));
25
* setting the PC from a source such as an ELF file entry point;
22
return store_bytes_leN(p->haddr + 8, p->size - 8,
26
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
27
void (*dump_state)(CPUState *cpu, FILE *, int flags);
28
void (*dump_statistics)(CPUState *cpu, int flags);
29
int64_t (*get_arch_id)(CPUState *cpu);
30
- bool (*get_paging_enabled)(const CPUState *cpu);
31
void (*set_pc)(CPUState *cpu, vaddr value);
32
int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
33
int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
34
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
35
index XXXXXXX..XXXXXXX 100644
36
--- a/include/hw/core/sysemu-cpu-ops.h
37
+++ b/include/hw/core/sysemu-cpu-ops.h
38
@@ -XXX,XX +XXX,XX @@ typedef struct SysemuCPUOps {
39
*/
40
void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
41
Error **errp);
42
+ /**
43
+ * @get_paging_enabled: Callback for inquiring whether paging is enabled.
44
+ */
45
+ bool (*get_paging_enabled)(const CPUState *cpu);
46
/**
47
* @get_phys_page_debug: Callback for obtaining a physical address.
48
*/
49
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
50
index XXXXXXX..XXXXXXX 100644
51
--- a/hw/core/cpu-sysemu.c
52
+++ b/hw/core/cpu-sysemu.c
53
@@ -XXX,XX +XXX,XX @@ bool cpu_paging_enabled(const CPUState *cpu)
54
{
55
CPUClass *cc = CPU_GET_CLASS(cpu);
56
57
- if (cc->get_paging_enabled) {
58
- return cc->get_paging_enabled(cpu);
59
+ if (cc->sysemu_ops->get_paging_enabled) {
60
+ return cc->sysemu_ops->get_paging_enabled(cpu);
61
}
62
63
return false;
64
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
65
index XXXXXXX..XXXXXXX 100644
66
--- a/target/i386/cpu.c
67
+++ b/target/i386/cpu.c
68
@@ -XXX,XX +XXX,XX @@ static int64_t x86_cpu_get_arch_id(CPUState *cs)
69
return cpu->apic_id;
70
}
71
72
+#if !defined(CONFIG_USER_ONLY)
73
static bool x86_cpu_get_paging_enabled(const CPUState *cs)
74
{
75
X86CPU *cpu = X86_CPU(cs);
76
77
return cpu->env.cr[0] & CR0_PG_MASK;
78
}
79
+#endif /* !CONFIG_USER_ONLY */
80
81
static void x86_cpu_set_pc(CPUState *cs, vaddr value)
82
{
83
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
84
85
static const struct SysemuCPUOps i386_sysemu_ops = {
86
.get_memory_mapping = x86_cpu_get_memory_mapping,
87
+ .get_paging_enabled = x86_cpu_get_paging_enabled,
88
.get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug,
89
.asidx_from_attrs = x86_asidx_from_attrs,
90
.get_crash_info = x86_cpu_get_crash_info,
91
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
92
cc->gdb_read_register = x86_cpu_gdb_read_register;
93
cc->gdb_write_register = x86_cpu_gdb_write_register;
94
cc->get_arch_id = x86_cpu_get_arch_id;
95
- cc->get_paging_enabled = x86_cpu_get_paging_enabled;
96
97
#ifndef CONFIG_USER_ONLY
98
cc->sysemu_ops = &i386_sysemu_ops;
99
--
23
--
100
2.25.1
24
2.34.1
101
102
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
Restructure the ifdef ladder, separating 64-bit from 32-bit,
2
and ensure _CALL_AIX is set for ELF v1. Fixes the build for
3
ppc64 big-endian host with clang.
2
4
3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
5
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5
Message-Id: <20210517105140.1062037-22-f4bug@amsat.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
---
7
---
8
include/hw/core/cpu.h | 3 ---
8
tcg/ppc/tcg-target.c.inc | 23 ++++++++++++++++-------
9
include/hw/core/sysemu-cpu-ops.h | 5 +++++
9
1 file changed, 16 insertions(+), 7 deletions(-)
10
hw/core/cpu-sysemu.c | 4 ++--
11
target/i386/cpu.c | 2 +-
12
4 files changed, 8 insertions(+), 6 deletions(-)
13
10
14
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
11
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
15
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
16
--- a/include/hw/core/cpu.h
13
--- a/tcg/ppc/tcg-target.c.inc
17
+++ b/include/hw/core/cpu.h
14
+++ b/tcg/ppc/tcg-target.c.inc
18
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
19
* @dump_statistics: Callback for dumping statistics.
20
* @get_arch_id: Callback for getting architecture-dependent CPU ID.
21
* @get_paging_enabled: Callback for inquiring whether paging is enabled.
22
- * @get_memory_mapping: Callback for obtaining the memory mappings.
23
* @set_pc: Callback for setting the Program Counter register. This
24
* should have the semantics used by the target architecture when
25
* setting the PC from a source such as an ELF file entry point;
26
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
27
void (*dump_statistics)(CPUState *cpu, int flags);
28
int64_t (*get_arch_id)(CPUState *cpu);
29
bool (*get_paging_enabled)(const CPUState *cpu);
30
- void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
31
- Error **errp);
32
void (*set_pc)(CPUState *cpu, vaddr value);
33
int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
34
int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
35
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
36
index XXXXXXX..XXXXXXX 100644
37
--- a/include/hw/core/sysemu-cpu-ops.h
38
+++ b/include/hw/core/sysemu-cpu-ops.h
39
@@ -XXX,XX +XXX,XX @@
15
@@ -XXX,XX +XXX,XX @@
40
* struct SysemuCPUOps: System operations specific to a CPU class
16
/*
17
* Standardize on the _CALL_FOO symbols used by GCC:
18
* Apple XCode does not define _CALL_DARWIN.
19
- * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV (32-bit).
20
+ * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV or _CALL_AIX.
41
*/
21
*/
42
typedef struct SysemuCPUOps {
22
-#if !defined(_CALL_SYSV) && \
43
+ /**
23
- !defined(_CALL_DARWIN) && \
44
+ * @get_memory_mapping: Callback for obtaining the memory mappings.
24
- !defined(_CALL_AIX) && \
45
+ */
25
- !defined(_CALL_ELF)
46
+ void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
26
-# if defined(__APPLE__)
47
+ Error **errp);
27
+#if TCG_TARGET_REG_BITS == 64
48
/**
28
+# ifdef _CALL_AIX
49
* @get_phys_page_debug: Callback for obtaining a physical address.
29
+ /* ok */
50
*/
30
+# elif defined(_CALL_ELF) && _CALL_ELF == 1
51
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
31
+# define _CALL_AIX
52
index XXXXXXX..XXXXXXX 100644
32
+# elif defined(_CALL_ELF) && _CALL_ELF == 2
53
--- a/hw/core/cpu-sysemu.c
33
+ /* ok */
54
+++ b/hw/core/cpu-sysemu.c
34
+# else
55
@@ -XXX,XX +XXX,XX @@ void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
35
+# error "Unknown ABI"
56
{
36
+# endif
57
CPUClass *cc = CPU_GET_CLASS(cpu);
37
+#else
58
38
+# if defined(_CALL_SYSV) || defined(_CALL_DARWIN)
59
- if (cc->get_memory_mapping) {
39
+ /* ok */
60
- cc->get_memory_mapping(cpu, list, errp);
40
+# elif defined(__APPLE__)
61
+ if (cc->sysemu_ops->get_memory_mapping) {
41
# define _CALL_DARWIN
62
+ cc->sysemu_ops->get_memory_mapping(cpu, list, errp);
42
-# elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32
63
return;
43
+# elif defined(__ELF__)
64
}
44
# define _CALL_SYSV
65
45
# else
66
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
46
# error "Unknown ABI"
67
index XXXXXXX..XXXXXXX 100644
68
--- a/target/i386/cpu.c
69
+++ b/target/i386/cpu.c
70
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
71
#include "hw/core/sysemu-cpu-ops.h"
72
73
static const struct SysemuCPUOps i386_sysemu_ops = {
74
+ .get_memory_mapping = x86_cpu_get_memory_mapping,
75
.get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug,
76
.asidx_from_attrs = x86_asidx_from_attrs,
77
.get_crash_info = x86_cpu_get_crash_info,
78
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
79
cc->get_paging_enabled = x86_cpu_get_paging_enabled;
80
81
#ifndef CONFIG_USER_ONLY
82
- cc->get_memory_mapping = x86_cpu_get_memory_mapping;
83
cc->sysemu_ops = &i386_sysemu_ops;
84
#endif /* !CONFIG_USER_ONLY */
85
86
--
47
--
87
2.25.1
48
2.34.1
88
89
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
VirtIO devices are only meaningful with system emulation.
3
Since cpu_mmu_index() is well-defined for user-only,
4
we can remove the surrounding #ifdef'ry entirely.
4
5
5
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
7
Message-Id: <20210517105140.1062037-17-f4bug@amsat.org>
9
Message-Id: <20230613133347.82210-2-philmd@linaro.org>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
---
11
---
10
include/hw/core/cpu.h | 5 -----
12
target/i386/tcg/translate.c | 3 ---
11
include/hw/core/sysemu-cpu-ops.h | 9 +++++++++
13
1 file changed, 3 deletions(-)
12
hw/core/cpu-sysemu.c | 5 +++--
13
target/arm/cpu.c | 2 +-
14
target/ppc/cpu_init.c | 4 +---
15
5 files changed, 14 insertions(+), 11 deletions(-)
16
14
17
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
15
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
18
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
19
--- a/include/hw/core/cpu.h
17
--- a/target/i386/tcg/translate.c
20
+++ b/include/hw/core/cpu.h
18
+++ b/target/i386/tcg/translate.c
21
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
19
@@ -XXX,XX +XXX,XX @@ static void i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
22
* @parse_features: Callback to parse command line arguments.
20
dc->cc_op_dirty = false;
23
* @reset_dump_flags: #CPUDumpFlags to use for reset logging.
21
dc->popl_esp_hack = 0;
24
* @has_work: Callback for checking if there is work to do.
22
/* select memory access functions */
25
- * @virtio_is_big_endian: Callback to return %true if a CPU which supports
23
- dc->mem_index = 0;
26
- * runtime configurable endianness is currently big-endian. Non-configurable
24
-#ifdef CONFIG_SOFTMMU
27
- * CPUs can use the default implementation of this method. This method should
25
dc->mem_index = cpu_mmu_index(env, false);
28
- * not be used by any callers other than the pre-1.0 virtio devices.
29
* @memory_rw_debug: Callback for GDB memory access.
30
* @dump_state: Callback for dumping state.
31
* @dump_statistics: Callback for dumping statistics.
32
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
33
34
int reset_dump_flags;
35
bool (*has_work)(CPUState *cpu);
36
- bool (*virtio_is_big_endian)(CPUState *cpu);
37
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
38
uint8_t *buf, int len, bool is_write);
39
void (*dump_state)(CPUState *cpu, FILE *, int flags);
40
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
41
index XXXXXXX..XXXXXXX 100644
42
--- a/include/hw/core/sysemu-cpu-ops.h
43
+++ b/include/hw/core/sysemu-cpu-ops.h
44
@@ -XXX,XX +XXX,XX @@
45
* struct SysemuCPUOps: System operations specific to a CPU class
46
*/
47
typedef struct SysemuCPUOps {
48
+ /**
49
+ * @virtio_is_big_endian: Callback to return %true if a CPU which supports
50
+ * runtime configurable endianness is currently big-endian.
51
+ * Non-configurable CPUs can use the default implementation of this method.
52
+ * This method should not be used by any callers other than the pre-1.0
53
+ * virtio devices.
54
+ */
55
+ bool (*virtio_is_big_endian)(CPUState *cpu);
56
+
57
/**
58
* @legacy_vmsd: Legacy state for migration.
59
* Do not use in new targets, use #DeviceClass::vmsd instead.
60
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
61
index XXXXXXX..XXXXXXX 100644
62
--- a/hw/core/cpu-sysemu.c
63
+++ b/hw/core/cpu-sysemu.c
64
@@ -XXX,XX +XXX,XX @@
65
#include "qemu/osdep.h"
66
#include "qapi/error.h"
67
#include "hw/core/cpu.h"
68
+#include "hw/core/sysemu-cpu-ops.h"
69
70
bool cpu_paging_enabled(const CPUState *cpu)
71
{
72
@@ -XXX,XX +XXX,XX @@ bool cpu_virtio_is_big_endian(CPUState *cpu)
73
{
74
CPUClass *cc = CPU_GET_CLASS(cpu);
75
76
- if (cc->virtio_is_big_endian) {
77
- return cc->virtio_is_big_endian(cpu);
78
+ if (cc->sysemu_ops->virtio_is_big_endian) {
79
+ return cc->sysemu_ops->virtio_is_big_endian(cpu);
80
}
81
return target_words_bigendian();
82
}
83
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
84
index XXXXXXX..XXXXXXX 100644
85
--- a/target/arm/cpu.c
86
+++ b/target/arm/cpu.c
87
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
88
#include "hw/core/sysemu-cpu-ops.h"
89
90
static const struct SysemuCPUOps arm_sysemu_ops = {
91
+ .virtio_is_big_endian = arm_cpu_virtio_is_big_endian,
92
.legacy_vmsd = &vmstate_arm_cpu,
93
};
94
#endif
95
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
96
#ifndef CONFIG_USER_ONLY
97
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
98
cc->asidx_from_attrs = arm_asidx_from_attrs;
99
- cc->virtio_is_big_endian = arm_cpu_virtio_is_big_endian;
100
cc->write_elf64_note = arm_cpu_write_elf64_note;
101
cc->write_elf32_note = arm_cpu_write_elf32_note;
102
cc->sysemu_ops = &arm_sysemu_ops;
103
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
104
index XXXXXXX..XXXXXXX 100644
105
--- a/target/ppc/cpu_init.c
106
+++ b/target/ppc/cpu_init.c
107
@@ -XXX,XX +XXX,XX @@ static Property ppc_cpu_properties[] = {
108
#include "hw/core/sysemu-cpu-ops.h"
109
110
static const struct SysemuCPUOps ppc_sysemu_ops = {
111
+ .virtio_is_big_endian = ppc_cpu_is_big_endian,
112
.legacy_vmsd = &vmstate_ppc_cpu,
113
};
114
#endif
115
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
116
cc->gdb_core_xml_file = "power64-core.xml";
117
#else
118
cc->gdb_core_xml_file = "power-core.xml";
119
-#endif
26
-#endif
120
-#ifndef CONFIG_USER_ONLY
27
dc->cpuid_features = env->features[FEAT_1_EDX];
121
- cc->virtio_is_big_endian = ppc_cpu_is_big_endian;
28
dc->cpuid_ext_features = env->features[FEAT_1_ECX];
122
#endif
29
dc->cpuid_ext2_features = env->features[FEAT_8000_0001_EDX];
123
cc->disas_set_info = ppc_disas_set_info;
124
125
--
30
--
126
2.25.1
31
2.34.1
127
32
128
33
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
The write_elf*() handlers are used to dump vmcore images.
3
We don't build any user emulation target for Tricore,
4
This feature is only meaningful for system emulation.
4
only the system emulation. No need to check for it as
5
it is always defined.
5
6
6
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Message-Id: <20210517105140.1062037-19-f4bug@amsat.org>
9
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
10
Message-Id: <20230613133347.82210-3-philmd@linaro.org>
9
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
---
12
---
11
include/hw/core/cpu.h | 17 -----------------
13
target/tricore/helper.c | 2 --
12
include/hw/core/sysemu-cpu-ops.h | 24 ++++++++++++++++++++++++
14
1 file changed, 2 deletions(-)
13
hw/core/cpu-sysemu.c | 16 ++++++++--------
14
target/arm/cpu.c | 4 ++--
15
target/i386/cpu.c | 8 ++++----
16
target/ppc/cpu_init.c | 6 ++----
17
target/riscv/cpu.c | 4 ++--
18
target/s390x/cpu.c | 2 +-
19
8 files changed, 43 insertions(+), 38 deletions(-)
20
15
21
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
16
diff --git a/target/tricore/helper.c b/target/tricore/helper.c
22
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
23
--- a/include/hw/core/cpu.h
18
--- a/target/tricore/helper.c
24
+++ b/include/hw/core/cpu.h
19
+++ b/target/tricore/helper.c
25
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
20
@@ -XXX,XX +XXX,XX @@ enum {
26
* a memory access with the specified memory transaction attributes.
21
TLBRET_MATCH = 0
27
* @gdb_read_register: Callback for letting GDB read a register.
22
};
28
* @gdb_write_register: Callback for letting GDB write a register.
23
29
- * @write_elf64_note: Callback for writing a CPU-specific ELF note to a
24
-#if defined(CONFIG_SOFTMMU)
30
- * 64-bit VM coredump.
25
static int get_physical_address(CPUTriCoreState *env, hwaddr *physical,
31
- * @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF
26
int *prot, target_ulong address,
32
- * note to a 32-bit VM coredump.
27
MMUAccessType access_type, int mmu_idx)
33
- * @write_elf32_note: Callback for writing a CPU-specific ELF note to a
28
@@ -XXX,XX +XXX,XX @@ hwaddr tricore_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
34
- * 32-bit VM coredump.
35
- * @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF
36
- * note to a 32-bit VM coredump.
37
* @gdb_num_core_regs: Number of core registers accessible to GDB.
38
* @gdb_core_xml_file: File name for core registers GDB XML description.
39
* @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop
40
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
41
int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
42
int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
43
44
- int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu,
45
- int cpuid, void *opaque);
46
- int (*write_elf64_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
47
- void *opaque);
48
- int (*write_elf32_note)(WriteCoreDumpFunction f, CPUState *cpu,
49
- int cpuid, void *opaque);
50
- int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
51
- void *opaque);
52
-
53
const char *gdb_core_xml_file;
54
gchar * (*gdb_arch_name)(CPUState *cpu);
55
const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname);
56
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
57
index XXXXXXX..XXXXXXX 100644
58
--- a/include/hw/core/sysemu-cpu-ops.h
59
+++ b/include/hw/core/sysemu-cpu-ops.h
60
@@ -XXX,XX +XXX,XX @@ typedef struct SysemuCPUOps {
61
* GUEST_PANICKED events.
62
*/
63
GuestPanicInformation* (*get_crash_info)(CPUState *cpu);
64
+ /**
65
+ * @write_elf32_note: Callback for writing a CPU-specific ELF note to a
66
+ * 32-bit VM coredump.
67
+ */
68
+ int (*write_elf32_note)(WriteCoreDumpFunction f, CPUState *cpu,
69
+ int cpuid, void *opaque);
70
+ /**
71
+ * @write_elf64_note: Callback for writing a CPU-specific ELF note to a
72
+ * 64-bit VM coredump.
73
+ */
74
+ int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu,
75
+ int cpuid, void *opaque);
76
+ /**
77
+ * @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF
78
+ * note to a 32-bit VM coredump.
79
+ */
80
+ int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
81
+ void *opaque);
82
+ /**
83
+ * @write_elf64_qemunote: Callback for writing a CPU- and QEMU-specific ELF
84
+ * note to a 64-bit VM coredump.
85
+ */
86
+ int (*write_elf64_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
87
+ void *opaque);
88
/**
89
* @virtio_is_big_endian: Callback to return %true if a CPU which supports
90
* runtime configurable endianness is currently big-endian.
91
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
92
index XXXXXXX..XXXXXXX 100644
93
--- a/hw/core/cpu-sysemu.c
94
+++ b/hw/core/cpu-sysemu.c
95
@@ -XXX,XX +XXX,XX @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
96
{
97
CPUClass *cc = CPU_GET_CLASS(cpu);
98
99
- if (!cc->write_elf32_qemunote) {
100
+ if (!cc->sysemu_ops->write_elf32_qemunote) {
101
return 0;
102
}
29
}
103
- return (*cc->write_elf32_qemunote)(f, cpu, opaque);
30
return phys_addr;
104
+ return (*cc->sysemu_ops->write_elf32_qemunote)(f, cpu, opaque);
105
}
31
}
106
107
int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu,
108
@@ -XXX,XX +XXX,XX @@ int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu,
109
{
110
CPUClass *cc = CPU_GET_CLASS(cpu);
111
112
- if (!cc->write_elf32_note) {
113
+ if (!cc->sysemu_ops->write_elf32_note) {
114
return -1;
115
}
116
- return (*cc->write_elf32_note)(f, cpu, cpuid, opaque);
117
+ return (*cc->sysemu_ops->write_elf32_note)(f, cpu, cpuid, opaque);
118
}
119
120
int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
121
@@ -XXX,XX +XXX,XX @@ int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
122
{
123
CPUClass *cc = CPU_GET_CLASS(cpu);
124
125
- if (!cc->write_elf64_qemunote) {
126
+ if (!cc->sysemu_ops->write_elf64_qemunote) {
127
return 0;
128
}
129
- return (*cc->write_elf64_qemunote)(f, cpu, opaque);
130
+ return (*cc->sysemu_ops->write_elf64_qemunote)(f, cpu, opaque);
131
}
132
133
int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu,
134
@@ -XXX,XX +XXX,XX @@ int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu,
135
{
136
CPUClass *cc = CPU_GET_CLASS(cpu);
137
138
- if (!cc->write_elf64_note) {
139
+ if (!cc->sysemu_ops->write_elf64_note) {
140
return -1;
141
}
142
- return (*cc->write_elf64_note)(f, cpu, cpuid, opaque);
143
+ return (*cc->sysemu_ops->write_elf64_note)(f, cpu, cpuid, opaque);
144
}
145
146
bool cpu_virtio_is_big_endian(CPUState *cpu)
147
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
148
index XXXXXXX..XXXXXXX 100644
149
--- a/target/arm/cpu.c
150
+++ b/target/arm/cpu.c
151
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
152
#include "hw/core/sysemu-cpu-ops.h"
153
154
static const struct SysemuCPUOps arm_sysemu_ops = {
155
+ .write_elf32_note = arm_cpu_write_elf32_note,
156
+ .write_elf64_note = arm_cpu_write_elf64_note,
157
.virtio_is_big_endian = arm_cpu_virtio_is_big_endian,
158
.legacy_vmsd = &vmstate_arm_cpu,
159
};
160
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
161
#ifndef CONFIG_USER_ONLY
162
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
163
cc->asidx_from_attrs = arm_asidx_from_attrs;
164
- cc->write_elf64_note = arm_cpu_write_elf64_note;
165
- cc->write_elf32_note = arm_cpu_write_elf32_note;
166
cc->sysemu_ops = &arm_sysemu_ops;
167
#endif
168
cc->gdb_num_core_regs = 26;
169
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
170
index XXXXXXX..XXXXXXX 100644
171
--- a/target/i386/cpu.c
172
+++ b/target/i386/cpu.c
173
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
174
175
static const struct SysemuCPUOps i386_sysemu_ops = {
176
.get_crash_info = x86_cpu_get_crash_info,
177
+ .write_elf32_note = x86_cpu_write_elf32_note,
178
+ .write_elf64_note = x86_cpu_write_elf64_note,
179
+ .write_elf32_qemunote = x86_cpu_write_elf32_qemunote,
180
+ .write_elf64_qemunote = x86_cpu_write_elf64_qemunote,
181
.legacy_vmsd = &vmstate_x86_cpu,
182
};
183
#endif
184
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
185
cc->asidx_from_attrs = x86_asidx_from_attrs;
186
cc->get_memory_mapping = x86_cpu_get_memory_mapping;
187
cc->get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug;
188
- cc->write_elf64_note = x86_cpu_write_elf64_note;
189
- cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
190
- cc->write_elf32_note = x86_cpu_write_elf32_note;
191
- cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
192
cc->sysemu_ops = &i386_sysemu_ops;
193
#endif /* !CONFIG_USER_ONLY */
194
195
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
196
index XXXXXXX..XXXXXXX 100644
197
--- a/target/ppc/cpu_init.c
198
+++ b/target/ppc/cpu_init.c
199
@@ -XXX,XX +XXX,XX @@ static Property ppc_cpu_properties[] = {
200
#include "hw/core/sysemu-cpu-ops.h"
201
202
static const struct SysemuCPUOps ppc_sysemu_ops = {
203
+ .write_elf32_note = ppc32_cpu_write_elf32_note,
204
+ .write_elf64_note = ppc64_cpu_write_elf64_note,
205
.virtio_is_big_endian = ppc_cpu_is_big_endian,
206
.legacy_vmsd = &vmstate_ppc_cpu,
207
};
208
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
209
cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
210
cc->sysemu_ops = &ppc_sysemu_ops;
211
#endif
212
-#if defined(CONFIG_SOFTMMU)
213
- cc->write_elf64_note = ppc64_cpu_write_elf64_note;
214
- cc->write_elf32_note = ppc32_cpu_write_elf32_note;
215
-#endif
32
-#endif
216
33
217
cc->gdb_num_core_regs = 71;
34
/* TODO: Add exeption support*/
218
#ifndef CONFIG_USER_ONLY
35
static void raise_mmu_exception(CPUTriCoreState *env, target_ulong address,
219
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
220
index XXXXXXX..XXXXXXX 100644
221
--- a/target/riscv/cpu.c
222
+++ b/target/riscv/cpu.c
223
@@ -XXX,XX +XXX,XX @@ static const char *riscv_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
224
#include "hw/core/sysemu-cpu-ops.h"
225
226
static const struct SysemuCPUOps riscv_sysemu_ops = {
227
+ .write_elf64_note = riscv_cpu_write_elf64_note,
228
+ .write_elf32_note = riscv_cpu_write_elf32_note,
229
.legacy_vmsd = &vmstate_riscv_cpu,
230
};
231
#endif
232
@@ -XXX,XX +XXX,XX @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
233
#ifndef CONFIG_USER_ONLY
234
cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
235
cc->sysemu_ops = &riscv_sysemu_ops;
236
- cc->write_elf64_note = riscv_cpu_write_elf64_note;
237
- cc->write_elf32_note = riscv_cpu_write_elf32_note;
238
#endif
239
cc->gdb_arch_name = riscv_gdb_arch_name;
240
cc->gdb_get_dynamic_xml = riscv_gdb_get_dynamic_xml;
241
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
242
index XXXXXXX..XXXXXXX 100644
243
--- a/target/s390x/cpu.c
244
+++ b/target/s390x/cpu.c
245
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_reset_full(DeviceState *dev)
246
247
static const struct SysemuCPUOps s390_sysemu_ops = {
248
.get_crash_info = s390_cpu_get_crash_info,
249
+ .write_elf64_note = s390_cpu_write_elf64_note,
250
.legacy_vmsd = &vmstate_s390_cpu,
251
};
252
#endif
253
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
254
cc->gdb_write_register = s390_cpu_gdb_write_register;
255
#ifndef CONFIG_USER_ONLY
256
cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
257
- cc->write_elf64_note = s390_cpu_write_elf64_note;
258
cc->sysemu_ops = &s390_sysemu_ops;
259
#endif
260
cc->disas_set_info = s390_cpu_disas_set_info;
261
--
36
--
262
2.25.1
37
2.34.1
263
38
264
39
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
3
Since we *might* have user emulation with softmmu,
4
replace the system emulation check by !user emulation one.
5
6
Invert some if() ladders for clarity.
7
8
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
9
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5
Message-Id: <20210517105140.1062037-21-f4bug@amsat.org>
10
Message-Id: <20230613133347.82210-4-philmd@linaro.org>
6
[rth: Drop declaration movement from target/*/cpu.h]
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8
---
12
---
9
include/hw/core/cpu.h | 8 --------
13
target/m68k/helper.h | 2 +-
10
include/hw/core/sysemu-cpu-ops.h | 13 +++++++++++++
14
target/m68k/cpu.c | 14 ++++++--------
11
hw/core/cpu-sysemu.c | 6 +++---
15
target/m68k/helper.c | 4 ++--
12
target/alpha/cpu.c | 2 +-
16
target/m68k/translate.c | 28 ++++++++++++++--------------
13
target/arm/cpu.c | 2 +-
17
4 files changed, 23 insertions(+), 25 deletions(-)
14
target/avr/cpu.c | 2 +-
18
15
target/cris/cpu.c | 2 +-
19
diff --git a/target/m68k/helper.h b/target/m68k/helper.h
16
target/hppa/cpu.c | 2 +-
20
index XXXXXXX..XXXXXXX 100644
17
target/i386/cpu.c | 2 +-
21
--- a/target/m68k/helper.h
18
target/m68k/cpu.c | 2 +-
22
+++ b/target/m68k/helper.h
19
target/microblaze/cpu.c | 2 +-
23
@@ -XXX,XX +XXX,XX @@ DEF_HELPER_FLAGS_4(bfffo_mem, TCG_CALL_NO_WG, i64, env, i32, s32, i32)
20
target/mips/cpu.c | 2 +-
24
DEF_HELPER_3(chk, void, env, s32, s32)
21
target/nios2/cpu.c | 2 +-
25
DEF_HELPER_4(chk2, void, env, s32, s32, s32)
22
target/openrisc/cpu.c | 2 +-
26
23
target/ppc/cpu_init.c | 2 +-
27
-#if defined(CONFIG_SOFTMMU)
24
target/riscv/cpu.c | 2 +-
28
+#if !defined(CONFIG_USER_ONLY)
25
target/rx/cpu.c | 2 +-
29
DEF_HELPER_3(ptest, void, env, i32, i32)
26
target/s390x/cpu.c | 2 +-
30
DEF_HELPER_3(pflush, void, env, i32, i32)
27
target/sh4/cpu.c | 2 +-
31
DEF_HELPER_FLAGS_1(reset, TCG_CALL_NO_RWG, void, env)
28
target/sparc/cpu.c | 2 +-
29
target/tricore/cpu.c | 2 +-
30
target/xtensa/cpu.c | 2 +-
31
22 files changed, 35 insertions(+), 30 deletions(-)
32
33
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
34
index XXXXXXX..XXXXXXX 100644
35
--- a/include/hw/core/cpu.h
36
+++ b/include/hw/core/cpu.h
37
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
38
* If the target behaviour here is anything other than "set
39
* the PC register to the value passed in" then the target must
40
* also implement the synchronize_from_tb hook.
41
- * @get_phys_page_debug: Callback for obtaining a physical address.
42
- * @get_phys_page_attrs_debug: Callback for obtaining a physical address and the
43
- * associated memory transaction attributes to use for the access.
44
- * CPUs which use memory transaction attributes should implement this
45
- * instead of get_phys_page_debug.
46
* @gdb_read_register: Callback for letting GDB read a register.
47
* @gdb_write_register: Callback for letting GDB write a register.
48
* @gdb_num_core_regs: Number of core registers accessible to GDB.
49
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
50
void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
51
Error **errp);
52
void (*set_pc)(CPUState *cpu, vaddr value);
53
- hwaddr (*get_phys_page_debug)(CPUState *cpu, vaddr addr);
54
- hwaddr (*get_phys_page_attrs_debug)(CPUState *cpu, vaddr addr,
55
- MemTxAttrs *attrs);
56
int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
57
int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
58
59
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
60
index XXXXXXX..XXXXXXX 100644
61
--- a/include/hw/core/sysemu-cpu-ops.h
62
+++ b/include/hw/core/sysemu-cpu-ops.h
63
@@ -XXX,XX +XXX,XX @@
64
* struct SysemuCPUOps: System operations specific to a CPU class
65
*/
66
typedef struct SysemuCPUOps {
67
+ /**
68
+ * @get_phys_page_debug: Callback for obtaining a physical address.
69
+ */
70
+ hwaddr (*get_phys_page_debug)(CPUState *cpu, vaddr addr);
71
+ /**
72
+ * @get_phys_page_attrs_debug: Callback for obtaining a physical address
73
+ * and the associated memory transaction attributes to use for the
74
+ * access.
75
+ * CPUs which use memory transaction attributes should implement this
76
+ * instead of get_phys_page_debug.
77
+ */
78
+ hwaddr (*get_phys_page_attrs_debug)(CPUState *cpu, vaddr addr,
79
+ MemTxAttrs *attrs);
80
/**
81
* @asidx_from_attrs: Callback to return the CPU AddressSpace to use for
82
* a memory access with the specified memory transaction attributes.
83
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
84
index XXXXXXX..XXXXXXX 100644
85
--- a/hw/core/cpu-sysemu.c
86
+++ b/hw/core/cpu-sysemu.c
87
@@ -XXX,XX +XXX,XX @@ hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
88
{
89
CPUClass *cc = CPU_GET_CLASS(cpu);
90
91
- if (cc->get_phys_page_attrs_debug) {
92
- return cc->get_phys_page_attrs_debug(cpu, addr, attrs);
93
+ if (cc->sysemu_ops->get_phys_page_attrs_debug) {
94
+ return cc->sysemu_ops->get_phys_page_attrs_debug(cpu, addr, attrs);
95
}
96
/* Fallback for CPUs which don't implement the _attrs_ hook */
97
*attrs = MEMTXATTRS_UNSPECIFIED;
98
- return cc->get_phys_page_debug(cpu, addr);
99
+ return cc->sysemu_ops->get_phys_page_debug(cpu, addr);
100
}
101
102
hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
103
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
104
index XXXXXXX..XXXXXXX 100644
105
--- a/target/alpha/cpu.c
106
+++ b/target/alpha/cpu.c
107
@@ -XXX,XX +XXX,XX @@ static void alpha_cpu_initfn(Object *obj)
108
#include "hw/core/sysemu-cpu-ops.h"
109
110
static const struct SysemuCPUOps alpha_sysemu_ops = {
111
+ .get_phys_page_debug = alpha_cpu_get_phys_page_debug,
112
};
113
#endif
114
115
@@ -XXX,XX +XXX,XX @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data)
116
cc->gdb_read_register = alpha_cpu_gdb_read_register;
117
cc->gdb_write_register = alpha_cpu_gdb_write_register;
118
#ifndef CONFIG_USER_ONLY
119
- cc->get_phys_page_debug = alpha_cpu_get_phys_page_debug;
120
dc->vmsd = &vmstate_alpha_cpu;
121
cc->sysemu_ops = &alpha_sysemu_ops;
122
#endif
123
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
124
index XXXXXXX..XXXXXXX 100644
125
--- a/target/arm/cpu.c
126
+++ b/target/arm/cpu.c
127
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
128
#include "hw/core/sysemu-cpu-ops.h"
129
130
static const struct SysemuCPUOps arm_sysemu_ops = {
131
+ .get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug,
132
.asidx_from_attrs = arm_asidx_from_attrs,
133
.write_elf32_note = arm_cpu_write_elf32_note,
134
.write_elf64_note = arm_cpu_write_elf64_note,
135
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
136
cc->gdb_read_register = arm_cpu_gdb_read_register;
137
cc->gdb_write_register = arm_cpu_gdb_write_register;
138
#ifndef CONFIG_USER_ONLY
139
- cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
140
cc->sysemu_ops = &arm_sysemu_ops;
141
#endif
142
cc->gdb_num_core_regs = 26;
143
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
144
index XXXXXXX..XXXXXXX 100644
145
--- a/target/avr/cpu.c
146
+++ b/target/avr/cpu.c
147
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags)
148
#include "hw/core/sysemu-cpu-ops.h"
149
150
static const struct SysemuCPUOps avr_sysemu_ops = {
151
+ .get_phys_page_debug = avr_cpu_get_phys_page_debug,
152
};
153
154
#include "hw/core/tcg-cpu-ops.h"
155
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
156
cc->dump_state = avr_cpu_dump_state;
157
cc->set_pc = avr_cpu_set_pc;
158
cc->memory_rw_debug = avr_cpu_memory_rw_debug;
159
- cc->get_phys_page_debug = avr_cpu_get_phys_page_debug;
160
dc->vmsd = &vms_avr_cpu;
161
cc->sysemu_ops = &avr_sysemu_ops;
162
cc->disas_set_info = avr_cpu_disas_set_info;
163
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
164
index XXXXXXX..XXXXXXX 100644
165
--- a/target/cris/cpu.c
166
+++ b/target/cris/cpu.c
167
@@ -XXX,XX +XXX,XX @@ static void cris_cpu_initfn(Object *obj)
168
#include "hw/core/sysemu-cpu-ops.h"
169
170
static const struct SysemuCPUOps cris_sysemu_ops = {
171
+ .get_phys_page_debug = cris_cpu_get_phys_page_debug,
172
};
173
#endif
174
175
@@ -XXX,XX +XXX,XX @@ static void cris_cpu_class_init(ObjectClass *oc, void *data)
176
cc->gdb_read_register = cris_cpu_gdb_read_register;
177
cc->gdb_write_register = cris_cpu_gdb_write_register;
178
#ifndef CONFIG_USER_ONLY
179
- cc->get_phys_page_debug = cris_cpu_get_phys_page_debug;
180
dc->vmsd = &vmstate_cris_cpu;
181
cc->sysemu_ops = &cris_sysemu_ops;
182
#endif
183
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
184
index XXXXXXX..XXXXXXX 100644
185
--- a/target/hppa/cpu.c
186
+++ b/target/hppa/cpu.c
187
@@ -XXX,XX +XXX,XX @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
188
#include "hw/core/sysemu-cpu-ops.h"
189
190
static const struct SysemuCPUOps hppa_sysemu_ops = {
191
+ .get_phys_page_debug = hppa_cpu_get_phys_page_debug,
192
};
193
#endif
194
195
@@ -XXX,XX +XXX,XX @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data)
196
cc->gdb_read_register = hppa_cpu_gdb_read_register;
197
cc->gdb_write_register = hppa_cpu_gdb_write_register;
198
#ifndef CONFIG_USER_ONLY
199
- cc->get_phys_page_debug = hppa_cpu_get_phys_page_debug;
200
dc->vmsd = &vmstate_hppa_cpu;
201
cc->sysemu_ops = &hppa_sysemu_ops;
202
#endif
203
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
204
index XXXXXXX..XXXXXXX 100644
205
--- a/target/i386/cpu.c
206
+++ b/target/i386/cpu.c
207
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
208
#include "hw/core/sysemu-cpu-ops.h"
209
210
static const struct SysemuCPUOps i386_sysemu_ops = {
211
+ .get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug,
212
.asidx_from_attrs = x86_asidx_from_attrs,
213
.get_crash_info = x86_cpu_get_crash_info,
214
.write_elf32_note = x86_cpu_write_elf32_note,
215
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
216
217
#ifndef CONFIG_USER_ONLY
218
cc->get_memory_mapping = x86_cpu_get_memory_mapping;
219
- cc->get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug;
220
cc->sysemu_ops = &i386_sysemu_ops;
221
#endif /* !CONFIG_USER_ONLY */
222
223
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
32
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
224
index XXXXXXX..XXXXXXX 100644
33
index XXXXXXX..XXXXXXX 100644
225
--- a/target/m68k/cpu.c
34
--- a/target/m68k/cpu.c
226
+++ b/target/m68k/cpu.c
35
+++ b/target/m68k/cpu.c
36
@@ -XXX,XX +XXX,XX @@ static void m68k_cpu_reset_hold(Object *obj)
37
}
38
39
memset(env, 0, offsetof(CPUM68KState, end_reset_fields));
40
-#ifdef CONFIG_SOFTMMU
41
- cpu_m68k_set_sr(env, SR_S | SR_I);
42
-#else
43
+#ifdef CONFIG_USER_ONLY
44
cpu_m68k_set_sr(env, 0);
45
+#else
46
+ cpu_m68k_set_sr(env, SR_S | SR_I);
47
#endif
48
for (i = 0; i < 8; i++) {
49
env->fregs[i].d = nan;
50
@@ -XXX,XX +XXX,XX @@ static void m68k_cpu_initfn(Object *obj)
51
cpu_set_cpustate_pointers(cpu);
52
}
53
54
-#if defined(CONFIG_SOFTMMU)
55
+#if !defined(CONFIG_USER_ONLY)
56
static bool fpu_needed(void *opaque)
57
{
58
M68kCPU *s = opaque;
227
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_m68k_cpu = {
59
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_m68k_cpu = {
60
NULL
61
},
62
};
63
-#endif
64
65
-#ifndef CONFIG_USER_ONLY
228
#include "hw/core/sysemu-cpu-ops.h"
66
#include "hw/core/sysemu-cpu-ops.h"
229
67
230
static const struct SysemuCPUOps m68k_sysemu_ops = {
68
static const struct SysemuCPUOps m68k_sysemu_ops = {
231
+ .get_phys_page_debug = m68k_cpu_get_phys_page_debug,
69
.get_phys_page_debug = m68k_cpu_get_phys_page_debug,
232
};
70
};
233
#endif
71
-#endif
72
+#endif /* !CONFIG_USER_ONLY */
73
74
#include "hw/core/tcg-cpu-ops.h"
234
75
235
@@ -XXX,XX +XXX,XX @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
76
@@ -XXX,XX +XXX,XX @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
77
cc->get_pc = m68k_cpu_get_pc;
236
cc->gdb_read_register = m68k_cpu_gdb_read_register;
78
cc->gdb_read_register = m68k_cpu_gdb_read_register;
237
cc->gdb_write_register = m68k_cpu_gdb_write_register;
79
cc->gdb_write_register = m68k_cpu_gdb_write_register;
238
#if defined(CONFIG_SOFTMMU)
80
-#if defined(CONFIG_SOFTMMU)
239
- cc->get_phys_page_debug = m68k_cpu_get_phys_page_debug;
81
+#if !defined(CONFIG_USER_ONLY)
240
dc->vmsd = &vmstate_m68k_cpu;
82
dc->vmsd = &vmstate_m68k_cpu;
241
cc->sysemu_ops = &m68k_sysemu_ops;
83
cc->sysemu_ops = &m68k_sysemu_ops;
242
#endif
84
#endif
243
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
85
diff --git a/target/m68k/helper.c b/target/m68k/helper.c
244
index XXXXXXX..XXXXXXX 100644
86
index XXXXXXX..XXXXXXX 100644
245
--- a/target/microblaze/cpu.c
87
--- a/target/m68k/helper.c
246
+++ b/target/microblaze/cpu.c
88
+++ b/target/m68k/helper.c
247
@@ -XXX,XX +XXX,XX @@ static ObjectClass *mb_cpu_class_by_name(const char *cpu_model)
89
@@ -XXX,XX +XXX,XX @@ void HELPER(set_mac_extu)(CPUM68KState *env, uint32_t val, uint32_t acc)
248
#include "hw/core/sysemu-cpu-ops.h"
90
env->macc[acc + 1] = res;
249
91
}
250
static const struct SysemuCPUOps mb_sysemu_ops = {
92
251
+ .get_phys_page_attrs_debug = mb_cpu_get_phys_page_attrs_debug,
93
-#if defined(CONFIG_SOFTMMU)
252
};
94
+#if !defined(CONFIG_USER_ONLY)
253
#endif
95
void HELPER(ptest)(CPUM68KState *env, uint32_t addr, uint32_t is_read)
254
96
{
255
@@ -XXX,XX +XXX,XX @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)
97
hwaddr physical;
256
cc->gdb_write_register = mb_cpu_gdb_write_register;
98
@@ -XXX,XX +XXX,XX @@ void HELPER(reset)(CPUM68KState *env)
257
99
{
258
#ifndef CONFIG_USER_ONLY
100
/* FIXME: reset all except CPU */
259
- cc->get_phys_page_attrs_debug = mb_cpu_get_phys_page_attrs_debug;
101
}
260
dc->vmsd = &vmstate_mb_cpu;
102
-#endif
261
cc->sysemu_ops = &mb_sysemu_ops;
103
+#endif /* !CONFIG_USER_ONLY */
262
#endif
104
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
263
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
105
index XXXXXXX..XXXXXXX 100644
264
index XXXXXXX..XXXXXXX 100644
106
--- a/target/m68k/translate.c
265
--- a/target/mips/cpu.c
107
+++ b/target/m68k/translate.c
266
+++ b/target/mips/cpu.c
108
@@ -XXX,XX +XXX,XX @@ DISAS_INSN(swap)
267
@@ -XXX,XX +XXX,XX @@ static Property mips_cpu_properties[] = {
109
268
#include "hw/core/sysemu-cpu-ops.h"
110
DISAS_INSN(bkpt)
269
111
{
270
static const struct SysemuCPUOps mips_sysemu_ops = {
112
-#if defined(CONFIG_SOFTMMU)
271
+ .get_phys_page_debug = mips_cpu_get_phys_page_debug,
113
- gen_exception(s, s->base.pc_next, EXCP_ILLEGAL);
272
.legacy_vmsd = &vmstate_mips_cpu,
114
-#else
273
};
115
+#if defined(CONFIG_USER_ONLY)
274
#endif
116
gen_exception(s, s->base.pc_next, EXCP_DEBUG);
275
@@ -XXX,XX +XXX,XX @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
117
+#else
276
cc->gdb_read_register = mips_cpu_gdb_read_register;
118
+ gen_exception(s, s->base.pc_next, EXCP_ILLEGAL);
277
cc->gdb_write_register = mips_cpu_gdb_write_register;
119
#endif
278
#ifndef CONFIG_USER_ONLY
120
}
279
- cc->get_phys_page_debug = mips_cpu_get_phys_page_debug;
121
280
cc->sysemu_ops = &mips_sysemu_ops;
122
@@ -XXX,XX +XXX,XX @@ DISAS_INSN(unlk)
281
#endif
123
tcg_gen_addi_i32(QREG_SP, src, 4);
282
cc->disas_set_info = mips_cpu_disas_set_info;
124
}
283
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
125
284
index XXXXXXX..XXXXXXX 100644
126
-#if defined(CONFIG_SOFTMMU)
285
--- a/target/nios2/cpu.c
127
+#if !defined(CONFIG_USER_ONLY)
286
+++ b/target/nios2/cpu.c
128
DISAS_INSN(reset)
287
@@ -XXX,XX +XXX,XX @@ static Property nios2_properties[] = {
129
{
288
#include "hw/core/sysemu-cpu-ops.h"
130
if (IS_USER(s)) {
289
131
@@ -XXX,XX +XXX,XX @@ DISAS_INSN(move_from_sr)
290
static const struct SysemuCPUOps nios2_sysemu_ops = {
132
DEST_EA(env, insn, OS_WORD, sr, NULL);
291
+ .get_phys_page_debug = nios2_cpu_get_phys_page_debug,
133
}
292
};
134
293
#endif
135
-#if defined(CONFIG_SOFTMMU)
294
136
+#if !defined(CONFIG_USER_ONLY)
295
@@ -XXX,XX +XXX,XX @@ static void nios2_cpu_class_init(ObjectClass *oc, void *data)
137
DISAS_INSN(moves)
296
cc->set_pc = nios2_cpu_set_pc;
138
{
297
cc->disas_set_info = nios2_cpu_disas_set_info;
139
int opsize;
298
#ifndef CONFIG_USER_ONLY
140
@@ -XXX,XX +XXX,XX @@ DISAS_INSN(cinv)
299
- cc->get_phys_page_debug = nios2_cpu_get_phys_page_debug;
141
/* Invalidate cache line. Implement as no-op. */
300
cc->sysemu_ops = &nios2_sysemu_ops;
142
}
301
#endif
143
302
cc->gdb_read_register = nios2_cpu_gdb_read_register;
144
-#if defined(CONFIG_SOFTMMU)
303
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
145
+#if !defined(CONFIG_USER_ONLY)
304
index XXXXXXX..XXXXXXX 100644
146
DISAS_INSN(pflush)
305
--- a/target/openrisc/cpu.c
147
{
306
+++ b/target/openrisc/cpu.c
148
TCGv opmode;
307
@@ -XXX,XX +XXX,XX @@ static void openrisc_any_initfn(Object *obj)
149
@@ -XXX,XX +XXX,XX @@ DISAS_INSN(ftrapcc)
308
#include "hw/core/sysemu-cpu-ops.h"
150
do_trapcc(s, &c);
309
151
}
310
static const struct SysemuCPUOps openrisc_sysemu_ops = {
152
311
+ .get_phys_page_debug = openrisc_cpu_get_phys_page_debug,
153
-#if defined(CONFIG_SOFTMMU)
312
};
154
+#if !defined(CONFIG_USER_ONLY)
313
#endif
155
DISAS_INSN(frestore)
314
156
{
315
@@ -XXX,XX +XXX,XX @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data)
157
TCGv addr;
316
cc->gdb_read_register = openrisc_cpu_gdb_read_register;
158
@@ -XXX,XX +XXX,XX @@ void register_m68k_insns (CPUM68KState *env)
317
cc->gdb_write_register = openrisc_cpu_gdb_write_register;
159
BASE(bitop_im, 08c0, ffc0);
318
#ifndef CONFIG_USER_ONLY
160
INSN(arith_im, 0a80, fff8, CF_ISA_A);
319
- cc->get_phys_page_debug = openrisc_cpu_get_phys_page_debug;
161
INSN(arith_im, 0a00, ff00, M68K);
320
dc->vmsd = &vmstate_openrisc_cpu;
162
-#if defined(CONFIG_SOFTMMU)
321
cc->sysemu_ops = &openrisc_sysemu_ops;
163
+#if !defined(CONFIG_USER_ONLY)
322
#endif
164
INSN(moves, 0e00, ff00, M68K);
323
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
165
#endif
324
index XXXXXXX..XXXXXXX 100644
166
INSN(cas, 0ac0, ffc0, CAS);
325
--- a/target/ppc/cpu_init.c
167
@@ -XXX,XX +XXX,XX @@ void register_m68k_insns (CPUM68KState *env)
326
+++ b/target/ppc/cpu_init.c
168
BASE(move_to_ccr, 44c0, ffc0);
327
@@ -XXX,XX +XXX,XX @@ static Property ppc_cpu_properties[] = {
169
INSN(not, 4680, fff8, CF_ISA_A);
328
#include "hw/core/sysemu-cpu-ops.h"
170
INSN(not, 4600, ff00, M68K);
329
171
-#if defined(CONFIG_SOFTMMU)
330
static const struct SysemuCPUOps ppc_sysemu_ops = {
172
+#if !defined(CONFIG_USER_ONLY)
331
+ .get_phys_page_debug = ppc_cpu_get_phys_page_debug,
173
BASE(move_to_sr, 46c0, ffc0);
332
.write_elf32_note = ppc32_cpu_write_elf32_note,
174
#endif
333
.write_elf64_note = ppc64_cpu_write_elf64_note,
175
INSN(nbcd, 4800, ffc0, M68K);
334
.virtio_is_big_endian = ppc_cpu_is_big_endian,
176
@@ -XXX,XX +XXX,XX @@ void register_m68k_insns (CPUM68KState *env)
335
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
177
BASE(tst, 4a00, ff00);
336
cc->gdb_read_register = ppc_cpu_gdb_read_register;
178
INSN(tas, 4ac0, ffc0, CF_ISA_B);
337
cc->gdb_write_register = ppc_cpu_gdb_write_register;
179
INSN(tas, 4ac0, ffc0, M68K);
338
#ifndef CONFIG_USER_ONLY
180
-#if defined(CONFIG_SOFTMMU)
339
- cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
181
+#if !defined(CONFIG_USER_ONLY)
340
cc->sysemu_ops = &ppc_sysemu_ops;
182
INSN(halt, 4ac8, ffff, CF_ISA_A);
341
#endif
183
INSN(halt, 4ac8, ffff, M68K);
342
184
#endif
343
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
185
@@ -XXX,XX +XXX,XX @@ void register_m68k_insns (CPUM68KState *env)
344
index XXXXXXX..XXXXXXX 100644
186
BASE(trap, 4e40, fff0);
345
--- a/target/riscv/cpu.c
187
BASE(link, 4e50, fff8);
346
+++ b/target/riscv/cpu.c
188
BASE(unlk, 4e58, fff8);
347
@@ -XXX,XX +XXX,XX @@ static const char *riscv_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
189
-#if defined(CONFIG_SOFTMMU)
348
#include "hw/core/sysemu-cpu-ops.h"
190
+#if !defined(CONFIG_USER_ONLY)
349
191
INSN(move_to_usp, 4e60, fff8, USP);
350
static const struct SysemuCPUOps riscv_sysemu_ops = {
192
INSN(move_from_usp, 4e68, fff8, USP);
351
+ .get_phys_page_debug = riscv_cpu_get_phys_page_debug,
193
INSN(reset, 4e70, ffff, M68K);
352
.write_elf64_note = riscv_cpu_write_elf64_note,
194
@@ -XXX,XX +XXX,XX @@ void register_m68k_insns (CPUM68KState *env)
353
.write_elf32_note = riscv_cpu_write_elf32_note,
195
INSN(ftrapcc, f27a, fffe, FPU); /* opmode 010, 011 */
354
.legacy_vmsd = &vmstate_riscv_cpu,
196
INSN(ftrapcc, f27c, ffff, FPU); /* opmode 100 */
355
@@ -XXX,XX +XXX,XX @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
197
INSN(fbcc, f280, ff80, FPU);
356
cc->gdb_stop_before_watchpoint = true;
198
-#if defined(CONFIG_SOFTMMU)
357
cc->disas_set_info = riscv_cpu_disas_set_info;
199
+#if !defined(CONFIG_USER_ONLY)
358
#ifndef CONFIG_USER_ONLY
200
INSN(frestore, f340, ffc0, CF_FPU);
359
- cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
201
INSN(fsave, f300, ffc0, CF_FPU);
360
cc->sysemu_ops = &riscv_sysemu_ops;
202
INSN(frestore, f340, ffc0, FPU);
361
#endif
203
@@ -XXX,XX +XXX,XX @@ void m68k_cpu_dump_state(CPUState *cs, FILE *f, int flags)
362
cc->gdb_arch_name = riscv_gdb_arch_name;
204
break;
363
diff --git a/target/rx/cpu.c b/target/rx/cpu.c
205
}
364
index XXXXXXX..XXXXXXX 100644
206
qemu_fprintf(f, "\n");
365
--- a/target/rx/cpu.c
207
-#ifdef CONFIG_SOFTMMU
366
+++ b/target/rx/cpu.c
208
+#ifndef CONFIG_USER_ONLY
367
@@ -XXX,XX +XXX,XX @@ static void rx_cpu_init(Object *obj)
209
qemu_fprintf(f, "%sA7(MSP) = %08x %sA7(USP) = %08x %sA7(ISP) = %08x\n",
368
#include "hw/core/sysemu-cpu-ops.h"
210
env->current_sp == M68K_SSP ? "->" : " ", env->sp[M68K_SSP],
369
211
env->current_sp == M68K_USP ? "->" : " ", env->sp[M68K_USP],
370
static const struct SysemuCPUOps rx_sysemu_ops = {
212
@@ -XXX,XX +XXX,XX @@ void m68k_cpu_dump_state(CPUState *cs, FILE *f, int flags)
371
+ .get_phys_page_debug = rx_cpu_get_phys_page_debug,
213
env->mmu.ttr[M68K_ITTR0], env->mmu.ttr[M68K_ITTR1]);
372
};
214
qemu_fprintf(f, "MMUSR %08x, fault at %08x\n",
373
#endif
215
env->mmu.mmusr, env->mmu.ar);
374
216
-#endif
375
@@ -XXX,XX +XXX,XX @@ static void rx_cpu_class_init(ObjectClass *klass, void *data)
217
+#endif /* !CONFIG_USER_ONLY */
376
#endif
218
}
377
cc->gdb_read_register = rx_cpu_gdb_read_register;
378
cc->gdb_write_register = rx_cpu_gdb_write_register;
379
- cc->get_phys_page_debug = rx_cpu_get_phys_page_debug;
380
cc->disas_set_info = rx_cpu_disas_set_info;
381
382
cc->gdb_num_core_regs = 26;
383
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
384
index XXXXXXX..XXXXXXX 100644
385
--- a/target/s390x/cpu.c
386
+++ b/target/s390x/cpu.c
387
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_reset_full(DeviceState *dev)
388
#include "hw/core/sysemu-cpu-ops.h"
389
390
static const struct SysemuCPUOps s390_sysemu_ops = {
391
+ .get_phys_page_debug = s390_cpu_get_phys_page_debug,
392
.get_crash_info = s390_cpu_get_crash_info,
393
.write_elf64_note = s390_cpu_write_elf64_note,
394
.legacy_vmsd = &vmstate_s390_cpu,
395
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
396
cc->gdb_read_register = s390_cpu_gdb_read_register;
397
cc->gdb_write_register = s390_cpu_gdb_write_register;
398
#ifndef CONFIG_USER_ONLY
399
- cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
400
cc->sysemu_ops = &s390_sysemu_ops;
401
#endif
402
cc->disas_set_info = s390_cpu_disas_set_info;
403
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
404
index XXXXXXX..XXXXXXX 100644
405
--- a/target/sh4/cpu.c
406
+++ b/target/sh4/cpu.c
407
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_sh_cpu = {
408
#include "hw/core/sysemu-cpu-ops.h"
409
410
static const struct SysemuCPUOps sh4_sysemu_ops = {
411
+ .get_phys_page_debug = superh_cpu_get_phys_page_debug,
412
};
413
#endif
414
415
@@ -XXX,XX +XXX,XX @@ static void superh_cpu_class_init(ObjectClass *oc, void *data)
416
cc->gdb_read_register = superh_cpu_gdb_read_register;
417
cc->gdb_write_register = superh_cpu_gdb_write_register;
418
#ifndef CONFIG_USER_ONLY
419
- cc->get_phys_page_debug = superh_cpu_get_phys_page_debug;
420
cc->sysemu_ops = &sh4_sysemu_ops;
421
dc->vmsd = &vmstate_sh_cpu;
422
#endif
423
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
424
index XXXXXXX..XXXXXXX 100644
425
--- a/target/sparc/cpu.c
426
+++ b/target/sparc/cpu.c
427
@@ -XXX,XX +XXX,XX @@ static Property sparc_cpu_properties[] = {
428
#include "hw/core/sysemu-cpu-ops.h"
429
430
static const struct SysemuCPUOps sparc_sysemu_ops = {
431
+ .get_phys_page_debug = sparc_cpu_get_phys_page_debug,
432
.legacy_vmsd = &vmstate_sparc_cpu,
433
};
434
#endif
435
@@ -XXX,XX +XXX,XX @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
436
cc->gdb_read_register = sparc_cpu_gdb_read_register;
437
cc->gdb_write_register = sparc_cpu_gdb_write_register;
438
#ifndef CONFIG_USER_ONLY
439
- cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug;
440
cc->sysemu_ops = &sparc_sysemu_ops;
441
#endif
442
cc->disas_set_info = cpu_sparc_disas_set_info;
443
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
444
index XXXXXXX..XXXXXXX 100644
445
--- a/target/tricore/cpu.c
446
+++ b/target/tricore/cpu.c
447
@@ -XXX,XX +XXX,XX @@ static void tc27x_initfn(Object *obj)
448
#include "hw/core/sysemu-cpu-ops.h"
449
450
static const struct SysemuCPUOps tricore_sysemu_ops = {
451
+ .get_phys_page_debug = tricore_cpu_get_phys_page_debug,
452
};
453
454
#include "hw/core/tcg-cpu-ops.h"
455
@@ -XXX,XX +XXX,XX @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)
456
457
cc->dump_state = tricore_cpu_dump_state;
458
cc->set_pc = tricore_cpu_set_pc;
459
- cc->get_phys_page_debug = tricore_cpu_get_phys_page_debug;
460
cc->sysemu_ops = &tricore_sysemu_ops;
461
cc->tcg_ops = &tricore_tcg_ops;
462
}
463
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
464
index XXXXXXX..XXXXXXX 100644
465
--- a/target/xtensa/cpu.c
466
+++ b/target/xtensa/cpu.c
467
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_xtensa_cpu = {
468
#include "hw/core/sysemu-cpu-ops.h"
469
470
static const struct SysemuCPUOps xtensa_sysemu_ops = {
471
+ .get_phys_page_debug = xtensa_cpu_get_phys_page_debug,
472
};
473
#endif
474
475
@@ -XXX,XX +XXX,XX @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)
476
cc->gdb_stop_before_watchpoint = true;
477
#ifndef CONFIG_USER_ONLY
478
cc->sysemu_ops = &xtensa_sysemu_ops;
479
- cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug;
480
dc->vmsd = &vmstate_xtensa_cpu;
481
#endif
482
cc->disas_set_info = xtensa_cpu_disas_set_info;
483
--
219
--
484
2.25.1
220
2.34.1
485
221
486
222
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Introduce a structure to hold handler specific to sysemu.
3
Since we *might* have user emulation with softmmu,
4
replace the system emulation check by !user emulation one.
4
5
5
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
7
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
7
Message-Id: <20210517105140.1062037-15-f4bug@amsat.org>
8
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
8
[rth: Squash "restrict hw/core/sysemu-cpu-ops.h" patch]
9
Message-Id: <20230613133347.82210-5-philmd@linaro.org>
9
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
---
11
---
11
include/hw/core/cpu.h | 6 ++++++
12
target/ppc/cpu_init.c | 20 ++++++++++----------
12
include/hw/core/sysemu-cpu-ops.h | 21 +++++++++++++++++++++
13
target/ppc/helper_regs.c | 6 ++----
13
cpu.c | 1 +
14
2 files changed, 12 insertions(+), 14 deletions(-)
14
target/alpha/cpu.c | 8 ++++++++
15
target/arm/cpu.c | 8 ++++++++
16
target/avr/cpu.c | 6 ++++++
17
target/cris/cpu.c | 8 ++++++++
18
target/hppa/cpu.c | 8 ++++++++
19
target/i386/cpu.c | 8 ++++++++
20
target/m68k/cpu.c | 8 ++++++++
21
target/microblaze/cpu.c | 8 ++++++++
22
target/mips/cpu.c | 8 ++++++++
23
target/nios2/cpu.c | 8 ++++++++
24
target/openrisc/cpu.c | 8 ++++++++
25
target/ppc/cpu_init.c | 8 ++++++++
26
target/riscv/cpu.c | 8 ++++++++
27
target/rx/cpu.c | 10 ++++++++++
28
target/s390x/cpu.c | 8 ++++++++
29
target/sh4/cpu.c | 6 ++++++
30
target/sparc/cpu.c | 8 ++++++++
31
target/tricore/cpu.c | 6 ++++++
32
target/xtensa/cpu.c | 6 ++++++
33
22 files changed, 174 insertions(+)
34
create mode 100644 include/hw/core/sysemu-cpu-ops.h
35
15
36
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
37
index XXXXXXX..XXXXXXX 100644
38
--- a/include/hw/core/cpu.h
39
+++ b/include/hw/core/cpu.h
40
@@ -XXX,XX +XXX,XX @@ struct TCGCPUOps;
41
/* see accel-cpu.h */
42
struct AccelCPUClass;
43
44
+/* see sysemu-cpu-ops.h */
45
+struct SysemuCPUOps;
46
+
47
/**
48
* CPUClass:
49
* @class_by_name: Callback to map -cpu command line model name to an
50
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
51
bool gdb_stop_before_watchpoint;
52
struct AccelCPUClass *accel_cpu;
53
54
+ /* when system emulation is not available, this pointer is NULL */
55
+ const struct SysemuCPUOps *sysemu_ops;
56
+
57
/* when TCG is not available, this pointer is NULL */
58
struct TCGCPUOps *tcg_ops;
59
60
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
61
new file mode 100644
62
index XXXXXXX..XXXXXXX
63
--- /dev/null
64
+++ b/include/hw/core/sysemu-cpu-ops.h
65
@@ -XXX,XX +XXX,XX @@
66
+/*
67
+ * CPU operations specific to system emulation
68
+ *
69
+ * Copyright (c) 2012 SUSE LINUX Products GmbH
70
+ *
71
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
72
+ * See the COPYING file in the top-level directory.
73
+ */
74
+
75
+#ifndef SYSEMU_CPU_OPS_H
76
+#define SYSEMU_CPU_OPS_H
77
+
78
+#include "hw/core/cpu.h"
79
+
80
+/*
81
+ * struct SysemuCPUOps: System operations specific to a CPU class
82
+ */
83
+typedef struct SysemuCPUOps {
84
+} SysemuCPUOps;
85
+
86
+#endif /* SYSEMU_CPU_OPS_H */
87
diff --git a/cpu.c b/cpu.c
88
index XXXXXXX..XXXXXXX 100644
89
--- a/cpu.c
90
+++ b/cpu.c
91
@@ -XXX,XX +XXX,XX @@
92
#ifdef CONFIG_USER_ONLY
93
#include "qemu.h"
94
#else
95
+#include "hw/core/sysemu-cpu-ops.h"
96
#include "exec/address-spaces.h"
97
#endif
98
#include "sysemu/tcg.h"
99
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
100
index XXXXXXX..XXXXXXX 100644
101
--- a/target/alpha/cpu.c
102
+++ b/target/alpha/cpu.c
103
@@ -XXX,XX +XXX,XX @@ static void alpha_cpu_initfn(Object *obj)
104
#endif
105
}
106
107
+#ifndef CONFIG_USER_ONLY
108
+#include "hw/core/sysemu-cpu-ops.h"
109
+
110
+static const struct SysemuCPUOps alpha_sysemu_ops = {
111
+};
112
+#endif
113
+
114
#include "hw/core/tcg-cpu-ops.h"
115
116
static struct TCGCPUOps alpha_tcg_ops = {
117
@@ -XXX,XX +XXX,XX @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data)
118
#ifndef CONFIG_USER_ONLY
119
cc->get_phys_page_debug = alpha_cpu_get_phys_page_debug;
120
dc->vmsd = &vmstate_alpha_cpu;
121
+ cc->sysemu_ops = &alpha_sysemu_ops;
122
#endif
123
cc->disas_set_info = alpha_cpu_disas_set_info;
124
125
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
126
index XXXXXXX..XXXXXXX 100644
127
--- a/target/arm/cpu.c
128
+++ b/target/arm/cpu.c
129
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
130
return g_strdup("arm");
131
}
132
133
+#ifndef CONFIG_USER_ONLY
134
+#include "hw/core/sysemu-cpu-ops.h"
135
+
136
+static const struct SysemuCPUOps arm_sysemu_ops = {
137
+};
138
+#endif
139
+
140
#ifdef CONFIG_TCG
141
static struct TCGCPUOps arm_tcg_ops = {
142
.initialize = arm_translate_init,
143
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
144
cc->virtio_is_big_endian = arm_cpu_virtio_is_big_endian;
145
cc->write_elf64_note = arm_cpu_write_elf64_note;
146
cc->write_elf32_note = arm_cpu_write_elf32_note;
147
+ cc->sysemu_ops = &arm_sysemu_ops;
148
#endif
149
cc->gdb_num_core_regs = 26;
150
cc->gdb_core_xml_file = "arm-core.xml";
151
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
152
index XXXXXXX..XXXXXXX 100644
153
--- a/target/avr/cpu.c
154
+++ b/target/avr/cpu.c
155
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags)
156
qemu_fprintf(f, "\n");
157
}
158
159
+#include "hw/core/sysemu-cpu-ops.h"
160
+
161
+static const struct SysemuCPUOps avr_sysemu_ops = {
162
+};
163
+
164
#include "hw/core/tcg-cpu-ops.h"
165
166
static struct TCGCPUOps avr_tcg_ops = {
167
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
168
cc->memory_rw_debug = avr_cpu_memory_rw_debug;
169
cc->get_phys_page_debug = avr_cpu_get_phys_page_debug;
170
dc->vmsd = &vms_avr_cpu;
171
+ cc->sysemu_ops = &avr_sysemu_ops;
172
cc->disas_set_info = avr_cpu_disas_set_info;
173
cc->gdb_read_register = avr_cpu_gdb_read_register;
174
cc->gdb_write_register = avr_cpu_gdb_write_register;
175
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
176
index XXXXXXX..XXXXXXX 100644
177
--- a/target/cris/cpu.c
178
+++ b/target/cris/cpu.c
179
@@ -XXX,XX +XXX,XX @@ static void cris_cpu_initfn(Object *obj)
180
#endif
181
}
182
183
+#ifndef CONFIG_USER_ONLY
184
+#include "hw/core/sysemu-cpu-ops.h"
185
+
186
+static const struct SysemuCPUOps cris_sysemu_ops = {
187
+};
188
+#endif
189
+
190
#include "hw/core/tcg-cpu-ops.h"
191
192
static struct TCGCPUOps crisv10_tcg_ops = {
193
@@ -XXX,XX +XXX,XX @@ static void cris_cpu_class_init(ObjectClass *oc, void *data)
194
#ifndef CONFIG_USER_ONLY
195
cc->get_phys_page_debug = cris_cpu_get_phys_page_debug;
196
dc->vmsd = &vmstate_cris_cpu;
197
+ cc->sysemu_ops = &cris_sysemu_ops;
198
#endif
199
200
cc->gdb_num_core_regs = 49;
201
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
202
index XXXXXXX..XXXXXXX 100644
203
--- a/target/hppa/cpu.c
204
+++ b/target/hppa/cpu.c
205
@@ -XXX,XX +XXX,XX @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
206
return object_class_by_name(TYPE_HPPA_CPU);
207
}
208
209
+#ifndef CONFIG_USER_ONLY
210
+#include "hw/core/sysemu-cpu-ops.h"
211
+
212
+static const struct SysemuCPUOps hppa_sysemu_ops = {
213
+};
214
+#endif
215
+
216
#include "hw/core/tcg-cpu-ops.h"
217
218
static struct TCGCPUOps hppa_tcg_ops = {
219
@@ -XXX,XX +XXX,XX @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data)
220
#ifndef CONFIG_USER_ONLY
221
cc->get_phys_page_debug = hppa_cpu_get_phys_page_debug;
222
dc->vmsd = &vmstate_hppa_cpu;
223
+ cc->sysemu_ops = &hppa_sysemu_ops;
224
#endif
225
cc->disas_set_info = hppa_cpu_disas_set_info;
226
cc->gdb_num_core_regs = 128;
227
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
228
index XXXXXXX..XXXXXXX 100644
229
--- a/target/i386/cpu.c
230
+++ b/target/i386/cpu.c
231
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
232
DEFINE_PROP_END_OF_LIST()
233
};
234
235
+#ifndef CONFIG_USER_ONLY
236
+#include "hw/core/sysemu-cpu-ops.h"
237
+
238
+static const struct SysemuCPUOps i386_sysemu_ops = {
239
+};
240
+#endif
241
+
242
static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
243
{
244
X86CPUClass *xcc = X86_CPU_CLASS(oc);
245
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
246
cc->write_elf32_note = x86_cpu_write_elf32_note;
247
cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
248
cc->legacy_vmsd = &vmstate_x86_cpu;
249
+ cc->sysemu_ops = &i386_sysemu_ops;
250
#endif /* !CONFIG_USER_ONLY */
251
252
cc->gdb_arch_name = x86_gdb_arch_name;
253
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
254
index XXXXXXX..XXXXXXX 100644
255
--- a/target/m68k/cpu.c
256
+++ b/target/m68k/cpu.c
257
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_m68k_cpu = {
258
};
259
#endif
260
261
+#ifndef CONFIG_USER_ONLY
262
+#include "hw/core/sysemu-cpu-ops.h"
263
+
264
+static const struct SysemuCPUOps m68k_sysemu_ops = {
265
+};
266
+#endif
267
+
268
#include "hw/core/tcg-cpu-ops.h"
269
270
static struct TCGCPUOps m68k_tcg_ops = {
271
@@ -XXX,XX +XXX,XX @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
272
#if defined(CONFIG_SOFTMMU)
273
cc->get_phys_page_debug = m68k_cpu_get_phys_page_debug;
274
dc->vmsd = &vmstate_m68k_cpu;
275
+ cc->sysemu_ops = &m68k_sysemu_ops;
276
#endif
277
cc->disas_set_info = m68k_cpu_disas_set_info;
278
279
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
280
index XXXXXXX..XXXXXXX 100644
281
--- a/target/microblaze/cpu.c
282
+++ b/target/microblaze/cpu.c
283
@@ -XXX,XX +XXX,XX @@ static ObjectClass *mb_cpu_class_by_name(const char *cpu_model)
284
return object_class_by_name(TYPE_MICROBLAZE_CPU);
285
}
286
287
+#ifndef CONFIG_USER_ONLY
288
+#include "hw/core/sysemu-cpu-ops.h"
289
+
290
+static const struct SysemuCPUOps mb_sysemu_ops = {
291
+};
292
+#endif
293
+
294
#include "hw/core/tcg-cpu-ops.h"
295
296
static struct TCGCPUOps mb_tcg_ops = {
297
@@ -XXX,XX +XXX,XX @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)
298
#ifndef CONFIG_USER_ONLY
299
cc->get_phys_page_attrs_debug = mb_cpu_get_phys_page_attrs_debug;
300
dc->vmsd = &vmstate_mb_cpu;
301
+ cc->sysemu_ops = &mb_sysemu_ops;
302
#endif
303
device_class_set_props(dc, mb_properties);
304
cc->gdb_num_core_regs = 32 + 27;
305
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
306
index XXXXXXX..XXXXXXX 100644
307
--- a/target/mips/cpu.c
308
+++ b/target/mips/cpu.c
309
@@ -XXX,XX +XXX,XX @@ static Property mips_cpu_properties[] = {
310
DEFINE_PROP_END_OF_LIST()
311
};
312
313
+#ifndef CONFIG_USER_ONLY
314
+#include "hw/core/sysemu-cpu-ops.h"
315
+
316
+static const struct SysemuCPUOps mips_sysemu_ops = {
317
+};
318
+#endif
319
+
320
#ifdef CONFIG_TCG
321
#include "hw/core/tcg-cpu-ops.h"
322
/*
323
@@ -XXX,XX +XXX,XX @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
324
#ifndef CONFIG_USER_ONLY
325
cc->get_phys_page_debug = mips_cpu_get_phys_page_debug;
326
cc->legacy_vmsd = &vmstate_mips_cpu;
327
+ cc->sysemu_ops = &mips_sysemu_ops;
328
#endif
329
cc->disas_set_info = mips_cpu_disas_set_info;
330
cc->gdb_num_core_regs = 73;
331
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
332
index XXXXXXX..XXXXXXX 100644
333
--- a/target/nios2/cpu.c
334
+++ b/target/nios2/cpu.c
335
@@ -XXX,XX +XXX,XX @@ static Property nios2_properties[] = {
336
DEFINE_PROP_END_OF_LIST(),
337
};
338
339
+#ifndef CONFIG_USER_ONLY
340
+#include "hw/core/sysemu-cpu-ops.h"
341
+
342
+static const struct SysemuCPUOps nios2_sysemu_ops = {
343
+};
344
+#endif
345
+
346
#include "hw/core/tcg-cpu-ops.h"
347
348
static struct TCGCPUOps nios2_tcg_ops = {
349
@@ -XXX,XX +XXX,XX @@ static void nios2_cpu_class_init(ObjectClass *oc, void *data)
350
cc->disas_set_info = nios2_cpu_disas_set_info;
351
#ifndef CONFIG_USER_ONLY
352
cc->get_phys_page_debug = nios2_cpu_get_phys_page_debug;
353
+ cc->sysemu_ops = &nios2_sysemu_ops;
354
#endif
355
cc->gdb_read_register = nios2_cpu_gdb_read_register;
356
cc->gdb_write_register = nios2_cpu_gdb_write_register;
357
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
358
index XXXXXXX..XXXXXXX 100644
359
--- a/target/openrisc/cpu.c
360
+++ b/target/openrisc/cpu.c
361
@@ -XXX,XX +XXX,XX @@ static void openrisc_any_initfn(Object *obj)
362
| (IMMUCFGR_NTS & (ctz32(TLB_SIZE) << 2));
363
}
364
365
+#ifndef CONFIG_USER_ONLY
366
+#include "hw/core/sysemu-cpu-ops.h"
367
+
368
+static const struct SysemuCPUOps openrisc_sysemu_ops = {
369
+};
370
+#endif
371
+
372
#include "hw/core/tcg-cpu-ops.h"
373
374
static struct TCGCPUOps openrisc_tcg_ops = {
375
@@ -XXX,XX +XXX,XX @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data)
376
#ifndef CONFIG_USER_ONLY
377
cc->get_phys_page_debug = openrisc_cpu_get_phys_page_debug;
378
dc->vmsd = &vmstate_openrisc_cpu;
379
+ cc->sysemu_ops = &openrisc_sysemu_ops;
380
#endif
381
cc->gdb_num_core_regs = 32 + 3;
382
cc->disas_set_info = openrisc_disas_set_info;
383
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
16
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
384
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
385
--- a/target/ppc/cpu_init.c
18
--- a/target/ppc/cpu_init.c
386
+++ b/target/ppc/cpu_init.c
19
+++ b/target/ppc/cpu_init.c
387
@@ -XXX,XX +XXX,XX @@ static Property ppc_cpu_properties[] = {
20
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(970)(ObjectClass *oc, void *data)
388
DEFINE_PROP_END_OF_LIST(),
21
(1ull << MSR_PMM) |
22
(1ull << MSR_RI);
23
pcc->mmu_model = POWERPC_MMU_64B;
24
-#if defined(CONFIG_SOFTMMU)
25
+#if !defined(CONFIG_USER_ONLY)
26
pcc->hash64_opts = &ppc_hash64_opts_basic;
27
#endif
28
pcc->excp_model = POWERPC_EXCP_970;
29
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER5P)(ObjectClass *oc, void *data)
30
pcc->lpcr_mask = LPCR_RMLS | LPCR_ILE | LPCR_LPES0 | LPCR_LPES1 |
31
LPCR_RMI | LPCR_HDICE;
32
pcc->mmu_model = POWERPC_MMU_2_03;
33
-#if defined(CONFIG_SOFTMMU)
34
+#if !defined(CONFIG_USER_ONLY)
35
pcc->hash64_opts = &ppc_hash64_opts_basic;
36
pcc->lrg_decr_bits = 32;
37
#endif
38
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data)
39
LPCR_LPES0 | LPCR_LPES1 | LPCR_HDICE;
40
pcc->lpcr_pm = LPCR_P7_PECE0 | LPCR_P7_PECE1 | LPCR_P7_PECE2;
41
pcc->mmu_model = POWERPC_MMU_2_06;
42
-#if defined(CONFIG_SOFTMMU)
43
+#if !defined(CONFIG_USER_ONLY)
44
pcc->hash64_opts = &ppc_hash64_opts_POWER7;
45
pcc->lrg_decr_bits = 32;
46
#endif
47
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
48
pcc->lpcr_pm = LPCR_P8_PECE0 | LPCR_P8_PECE1 | LPCR_P8_PECE2 |
49
LPCR_P8_PECE3 | LPCR_P8_PECE4;
50
pcc->mmu_model = POWERPC_MMU_2_07;
51
-#if defined(CONFIG_SOFTMMU)
52
+#if !defined(CONFIG_USER_ONLY)
53
pcc->hash64_opts = &ppc_hash64_opts_POWER7;
54
pcc->lrg_decr_bits = 32;
55
pcc->n_host_threads = 8;
56
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
57
pcc->l1_icache_size = 0x8000;
58
}
59
60
-#ifdef CONFIG_SOFTMMU
61
+#ifndef CONFIG_USER_ONLY
62
/*
63
* Radix pg sizes and AP encodings for dt node ibm,processor-radix-AP-encodings
64
* Encoded as array of int_32s in the form:
65
@@ -XXX,XX +XXX,XX @@ static struct ppc_radix_page_info POWER9_radix_page_info = {
66
0x4000001e /* 1G - enc: 0x2 */
67
}
389
};
68
};
390
69
-#endif /* CONFIG_SOFTMMU */
70
+#endif /* CONFIG_USER_ONLY */
71
72
static void init_proc_POWER9(CPUPPCState *env)
73
{
74
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data)
75
LPCR_HEIC | LPCR_LPES0 | LPCR_HVICE | LPCR_HDICE;
76
pcc->lpcr_pm = LPCR_PDEE | LPCR_HDEE | LPCR_EEE | LPCR_DEE | LPCR_OEE;
77
pcc->mmu_model = POWERPC_MMU_3_00;
78
-#if defined(CONFIG_SOFTMMU)
79
+#if !defined(CONFIG_USER_ONLY)
80
/* segment page size remain the same */
81
pcc->hash64_opts = &ppc_hash64_opts_POWER7;
82
pcc->radix_page_info = &POWER9_radix_page_info;
83
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data)
84
pcc->l1_icache_size = 0x8000;
85
}
86
87
-#ifdef CONFIG_SOFTMMU
391
+#ifndef CONFIG_USER_ONLY
88
+#ifndef CONFIG_USER_ONLY
392
+#include "hw/core/sysemu-cpu-ops.h"
89
/*
393
+
90
* Radix pg sizes and AP encodings for dt node ibm,processor-radix-AP-encodings
394
+static const struct SysemuCPUOps ppc_sysemu_ops = {
91
* Encoded as array of int_32s in the form:
395
+};
92
@@ -XXX,XX +XXX,XX @@ static struct ppc_radix_page_info POWER10_radix_page_info = {
396
+#endif
93
0x4000001e /* 1G - enc: 0x2 */
397
+
94
}
398
#ifdef CONFIG_TCG
95
};
399
#include "hw/core/tcg-cpu-ops.h"
96
-#endif /* CONFIG_SOFTMMU */
400
97
+#endif /* !CONFIG_USER_ONLY */
401
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
98
402
#ifndef CONFIG_USER_ONLY
99
static void init_proc_POWER10(CPUPPCState *env)
403
cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
100
{
404
cc->legacy_vmsd = &vmstate_ppc_cpu;
101
@@ -XXX,XX +XXX,XX @@ POWERPC_FAMILY(POWER10)(ObjectClass *oc, void *data)
405
+ cc->sysemu_ops = &ppc_sysemu_ops;
102
406
#endif
103
pcc->lpcr_pm = LPCR_PDEE | LPCR_HDEE | LPCR_EEE | LPCR_DEE | LPCR_OEE;
407
#if defined(CONFIG_SOFTMMU)
104
pcc->mmu_model = POWERPC_MMU_3_00;
408
cc->write_elf64_note = ppc64_cpu_write_elf64_note;
105
-#if defined(CONFIG_SOFTMMU)
409
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
106
+#if !defined(CONFIG_USER_ONLY)
107
/* segment page size remain the same */
108
pcc->hash64_opts = &ppc_hash64_opts_POWER7;
109
pcc->radix_page_info = &POWER10_radix_page_info;
110
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
410
index XXXXXXX..XXXXXXX 100644
111
index XXXXXXX..XXXXXXX 100644
411
--- a/target/riscv/cpu.c
112
--- a/target/ppc/helper_regs.c
412
+++ b/target/riscv/cpu.c
113
+++ b/target/ppc/helper_regs.c
413
@@ -XXX,XX +XXX,XX @@ static const char *riscv_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
114
@@ -XXX,XX +XXX,XX @@ int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
414
return NULL;
115
return excp;
415
}
116
}
416
117
118
-#ifdef CONFIG_SOFTMMU
417
+#ifndef CONFIG_USER_ONLY
119
+#ifndef CONFIG_USER_ONLY
418
+#include "hw/core/sysemu-cpu-ops.h"
120
void store_40x_sler(CPUPPCState *env, uint32_t val)
419
+
121
{
420
+static const struct SysemuCPUOps riscv_sysemu_ops = {
122
/* XXX: TO BE FIXED */
421
+};
123
@@ -XXX,XX +XXX,XX @@ void store_40x_sler(CPUPPCState *env, uint32_t val)
422
+#endif
124
}
423
+
125
env->spr[SPR_405_SLER] = val;
424
#include "hw/core/tcg-cpu-ops.h"
425
426
static struct TCGCPUOps riscv_tcg_ops = {
427
@@ -XXX,XX +XXX,XX @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
428
#ifndef CONFIG_USER_ONLY
429
cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
430
cc->legacy_vmsd = &vmstate_riscv_cpu;
431
+ cc->sysemu_ops = &riscv_sysemu_ops;
432
cc->write_elf64_note = riscv_cpu_write_elf64_note;
433
cc->write_elf32_note = riscv_cpu_write_elf32_note;
434
#endif
435
diff --git a/target/rx/cpu.c b/target/rx/cpu.c
436
index XXXXXXX..XXXXXXX 100644
437
--- a/target/rx/cpu.c
438
+++ b/target/rx/cpu.c
439
@@ -XXX,XX +XXX,XX @@ static void rx_cpu_init(Object *obj)
440
qdev_init_gpio_in(DEVICE(cpu), rx_cpu_set_irq, 2);
441
}
126
}
442
127
-#endif /* CONFIG_SOFTMMU */
443
+#ifndef CONFIG_USER_ONLY
128
444
+#include "hw/core/sysemu-cpu-ops.h"
129
-#ifndef CONFIG_USER_ONLY
445
+
130
void check_tlb_flush(CPUPPCState *env, bool global)
446
+static const struct SysemuCPUOps rx_sysemu_ops = {
131
{
447
+};
132
CPUState *cs = env_cpu(env);
448
+#endif
133
@@ -XXX,XX +XXX,XX @@ void check_tlb_flush(CPUPPCState *env, bool global)
449
+
134
tlb_flush(cs);
450
#include "hw/core/tcg-cpu-ops.h"
135
}
451
452
static struct TCGCPUOps rx_tcg_ops = {
453
@@ -XXX,XX +XXX,XX @@ static void rx_cpu_class_init(ObjectClass *klass, void *data)
454
cc->dump_state = rx_cpu_dump_state;
455
cc->set_pc = rx_cpu_set_pc;
456
457
+#ifndef CONFIG_USER_ONLY
458
+ cc->sysemu_ops = &rx_sysemu_ops;
459
+#endif
460
cc->gdb_read_register = rx_cpu_gdb_read_register;
461
cc->gdb_write_register = rx_cpu_gdb_write_register;
462
cc->get_phys_page_debug = rx_cpu_get_phys_page_debug;
463
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
464
index XXXXXXX..XXXXXXX 100644
465
--- a/target/s390x/cpu.c
466
+++ b/target/s390x/cpu.c
467
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_reset_full(DeviceState *dev)
468
return s390_cpu_reset(s, S390_CPU_RESET_CLEAR);
469
}
136
}
470
137
-#endif
471
+#ifndef CONFIG_USER_ONLY
138
+#endif /* !CONFIG_USER_ONLY */
472
+#include "hw/core/sysemu-cpu-ops.h"
139
473
+
140
/**
474
+static const struct SysemuCPUOps s390_sysemu_ops = {
141
* _spr_register
475
+};
476
+#endif
477
+
478
#ifdef CONFIG_TCG
479
#include "hw/core/tcg-cpu-ops.h"
480
481
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
482
cc->legacy_vmsd = &vmstate_s390_cpu;
483
cc->get_crash_info = s390_cpu_get_crash_info;
484
cc->write_elf64_note = s390_cpu_write_elf64_note;
485
+ cc->sysemu_ops = &s390_sysemu_ops;
486
#endif
487
cc->disas_set_info = s390_cpu_disas_set_info;
488
cc->gdb_num_core_regs = S390_NUM_CORE_REGS;
489
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
490
index XXXXXXX..XXXXXXX 100644
491
--- a/target/sh4/cpu.c
492
+++ b/target/sh4/cpu.c
493
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_sh_cpu = {
494
.name = "cpu",
495
.unmigratable = 1,
496
};
497
+
498
+#include "hw/core/sysemu-cpu-ops.h"
499
+
500
+static const struct SysemuCPUOps sh4_sysemu_ops = {
501
+};
502
#endif
503
504
#include "hw/core/tcg-cpu-ops.h"
505
@@ -XXX,XX +XXX,XX @@ static void superh_cpu_class_init(ObjectClass *oc, void *data)
506
cc->gdb_write_register = superh_cpu_gdb_write_register;
507
#ifndef CONFIG_USER_ONLY
508
cc->get_phys_page_debug = superh_cpu_get_phys_page_debug;
509
+ cc->sysemu_ops = &sh4_sysemu_ops;
510
dc->vmsd = &vmstate_sh_cpu;
511
#endif
512
cc->disas_set_info = superh_cpu_disas_set_info;
513
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
514
index XXXXXXX..XXXXXXX 100644
515
--- a/target/sparc/cpu.c
516
+++ b/target/sparc/cpu.c
517
@@ -XXX,XX +XXX,XX @@ static Property sparc_cpu_properties[] = {
518
DEFINE_PROP_END_OF_LIST()
519
};
520
521
+#ifndef CONFIG_USER_ONLY
522
+#include "hw/core/sysemu-cpu-ops.h"
523
+
524
+static const struct SysemuCPUOps sparc_sysemu_ops = {
525
+};
526
+#endif
527
+
528
#ifdef CONFIG_TCG
529
#include "hw/core/tcg-cpu-ops.h"
530
531
@@ -XXX,XX +XXX,XX @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
532
#ifndef CONFIG_USER_ONLY
533
cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug;
534
cc->legacy_vmsd = &vmstate_sparc_cpu;
535
+ cc->sysemu_ops = &sparc_sysemu_ops;
536
#endif
537
cc->disas_set_info = cpu_sparc_disas_set_info;
538
539
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
540
index XXXXXXX..XXXXXXX 100644
541
--- a/target/tricore/cpu.c
542
+++ b/target/tricore/cpu.c
543
@@ -XXX,XX +XXX,XX @@ static void tc27x_initfn(Object *obj)
544
set_feature(&cpu->env, TRICORE_FEATURE_161);
545
}
546
547
+#include "hw/core/sysemu-cpu-ops.h"
548
+
549
+static const struct SysemuCPUOps tricore_sysemu_ops = {
550
+};
551
+
552
#include "hw/core/tcg-cpu-ops.h"
553
554
static struct TCGCPUOps tricore_tcg_ops = {
555
@@ -XXX,XX +XXX,XX @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)
556
cc->dump_state = tricore_cpu_dump_state;
557
cc->set_pc = tricore_cpu_set_pc;
558
cc->get_phys_page_debug = tricore_cpu_get_phys_page_debug;
559
+ cc->sysemu_ops = &tricore_sysemu_ops;
560
cc->tcg_ops = &tricore_tcg_ops;
561
}
562
563
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
564
index XXXXXXX..XXXXXXX 100644
565
--- a/target/xtensa/cpu.c
566
+++ b/target/xtensa/cpu.c
567
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_xtensa_cpu = {
568
.name = "cpu",
569
.unmigratable = 1,
570
};
571
+
572
+#include "hw/core/sysemu-cpu-ops.h"
573
+
574
+static const struct SysemuCPUOps xtensa_sysemu_ops = {
575
+};
576
#endif
577
578
#include "hw/core/tcg-cpu-ops.h"
579
@@ -XXX,XX +XXX,XX @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)
580
cc->gdb_write_register = xtensa_cpu_gdb_write_register;
581
cc->gdb_stop_before_watchpoint = true;
582
#ifndef CONFIG_USER_ONLY
583
+ cc->sysemu_ops = &xtensa_sysemu_ops;
584
cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug;
585
dc->vmsd = &vmstate_xtensa_cpu;
586
#endif
587
--
142
--
588
2.25.1
143
2.34.1
589
144
590
145
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Migration is specific to system emulation.
3
Since we *might* have user emulation with softmmu,
4
replace the system emulation check by !user emulation one.
4
5
5
- Move the CPUClass::vmsd field to SysemuCPUOps,
6
Invert the #ifdef'ry in TCGCPUOps structure for clarity.
6
- restrict VMSTATE_CPU() macro to sysemu,
7
- vmstate_dummy is now unused, remove it.
8
7
9
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
8
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
10
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
9
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
11
Message-Id: <20210517105140.1062037-16-f4bug@amsat.org>
10
Message-Id: <20230613133347.82210-6-philmd@linaro.org>
12
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13
---
12
---
14
include/hw/core/cpu.h | 8 ++------
13
include/hw/core/cpu.h | 4 +-
15
include/hw/core/sysemu-cpu-ops.h | 6 ++++++
14
include/hw/core/tcg-cpu-ops.h | 102 +++++++++++++++++-----------------
16
include/migration/vmstate.h | 2 --
15
2 files changed, 53 insertions(+), 53 deletions(-)
17
cpu.c | 15 +++++++--------
18
stubs/vmstate.c | 2 --
19
target/arm/cpu.c | 2 +-
20
target/i386/cpu.c | 2 +-
21
target/mips/cpu.c | 2 +-
22
target/ppc/cpu_init.c | 2 +-
23
target/riscv/cpu.c | 2 +-
24
target/s390x/cpu.c | 2 +-
25
target/sparc/cpu.c | 2 +-
26
12 files changed, 22 insertions(+), 25 deletions(-)
27
16
28
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
17
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
29
index XXXXXXX..XXXXXXX 100644
18
index XXXXXXX..XXXXXXX 100644
30
--- a/include/hw/core/cpu.h
19
--- a/include/hw/core/cpu.h
31
+++ b/include/hw/core/cpu.h
20
+++ b/include/hw/core/cpu.h
32
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
21
@@ -XXX,XX +XXX,XX @@ void page_size_init(void);
33
* 32-bit VM coredump.
22
34
* @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF
35
* note to a 32-bit VM coredump.
36
- * @legacy_vmsd: Legacy state description for migration.
37
- * Do not use in new targets, use #DeviceClass::vmsd instead.
38
* @gdb_num_core_regs: Number of core registers accessible to GDB.
39
* @gdb_core_xml_file: File name for core registers GDB XML description.
40
* @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop
41
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
42
int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
43
void *opaque);
44
45
- const VMStateDescription *legacy_vmsd;
46
const char *gdb_core_xml_file;
47
gchar * (*gdb_arch_name)(CPUState *cpu);
48
const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname);
49
@@ -XXX,XX +XXX,XX @@ bool target_words_bigendian(void);
50
#ifdef NEED_CPU_H
23
#ifdef NEED_CPU_H
51
24
52
#ifdef CONFIG_SOFTMMU
25
-#ifdef CONFIG_SOFTMMU
53
+
26
+#ifndef CONFIG_USER_ONLY
27
54
extern const VMStateDescription vmstate_cpu_common;
28
extern const VMStateDescription vmstate_cpu_common;
55
-#else
29
56
-#define vmstate_cpu_common vmstate_dummy
57
-#endif
58
59
#define VMSTATE_CPU() { \
60
.name = "parent_obj", \
61
@@ -XXX,XX +XXX,XX @@ extern const VMStateDescription vmstate_cpu_common;
30
@@ -XXX,XX +XXX,XX @@ extern const VMStateDescription vmstate_cpu_common;
62
.flags = VMS_STRUCT, \
31
.flags = VMS_STRUCT, \
63
.offset = 0, \
32
.offset = 0, \
64
}
33
}
65
+#endif /* CONFIG_SOFTMMU */
34
-#endif /* CONFIG_SOFTMMU */
35
+#endif /* !CONFIG_USER_ONLY */
66
36
67
#endif /* NEED_CPU_H */
37
#endif /* NEED_CPU_H */
68
38
69
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
39
diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h
70
index XXXXXXX..XXXXXXX 100644
40
index XXXXXXX..XXXXXXX 100644
71
--- a/include/hw/core/sysemu-cpu-ops.h
41
--- a/include/hw/core/tcg-cpu-ops.h
72
+++ b/include/hw/core/sysemu-cpu-ops.h
42
+++ b/include/hw/core/tcg-cpu-ops.h
73
@@ -XXX,XX +XXX,XX @@
43
@@ -XXX,XX +XXX,XX @@ struct TCGCPUOps {
74
* struct SysemuCPUOps: System operations specific to a CPU class
44
*/
75
*/
45
void (*do_interrupt)(CPUState *cpu);
76
typedef struct SysemuCPUOps {
46
#endif /* !CONFIG_USER_ONLY || !TARGET_I386 */
47
-#ifdef CONFIG_SOFTMMU
48
+#ifdef CONFIG_USER_ONLY
77
+ /**
49
+ /**
78
+ * @legacy_vmsd: Legacy state for migration.
50
+ * record_sigsegv:
79
+ * Do not use in new targets, use #DeviceClass::vmsd instead.
51
+ * @cpu: cpu context
52
+ * @addr: faulting guest address
53
+ * @access_type: access was read/write/execute
54
+ * @maperr: true for invalid page, false for permission fault
55
+ * @ra: host pc for unwinding
56
+ *
57
+ * We are about to raise SIGSEGV with si_code set for @maperr,
58
+ * and si_addr set for @addr. Record anything further needed
59
+ * for the signal ucontext_t.
60
+ *
61
+ * If the emulated kernel does not provide anything to the signal
62
+ * handler with anything besides the user context registers, and
63
+ * the siginfo_t, then this hook need do nothing and may be omitted.
64
+ * Otherwise, record the data and return; the caller will raise
65
+ * the signal, unwind the cpu state, and return to the main loop.
66
+ *
67
+ * If it is simpler to re-use the sysemu tlb_fill code, @ra is provided
68
+ * so that a "normal" cpu exception can be raised. In this case,
69
+ * the signal must be raised by the architecture cpu_loop.
80
+ */
70
+ */
81
+ const VMStateDescription *legacy_vmsd;
71
+ void (*record_sigsegv)(CPUState *cpu, vaddr addr,
82
+
72
+ MMUAccessType access_type,
83
} SysemuCPUOps;
73
+ bool maperr, uintptr_t ra);
84
74
+ /**
85
#endif /* SYSEMU_CPU_OPS_H */
75
+ * record_sigbus:
86
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
76
+ * @cpu: cpu context
87
index XXXXXXX..XXXXXXX 100644
77
+ * @addr: misaligned guest address
88
--- a/include/migration/vmstate.h
78
+ * @access_type: access was read/write/execute
89
+++ b/include/migration/vmstate.h
79
+ * @ra: host pc for unwinding
90
@@ -XXX,XX +XXX,XX @@ struct VMStateDescription {
80
+ *
91
const VMStateDescription **subsections;
81
+ * We are about to raise SIGBUS with si_code BUS_ADRALN,
82
+ * and si_addr set for @addr. Record anything further needed
83
+ * for the signal ucontext_t.
84
+ *
85
+ * If the emulated kernel does not provide the signal handler with
86
+ * anything besides the user context registers, and the siginfo_t,
87
+ * then this hook need do nothing and may be omitted.
88
+ * Otherwise, record the data and return; the caller will raise
89
+ * the signal, unwind the cpu state, and return to the main loop.
90
+ *
91
+ * If it is simpler to re-use the sysemu do_unaligned_access code,
92
+ * @ra is provided so that a "normal" cpu exception can be raised.
93
+ * In this case, the signal must be raised by the architecture cpu_loop.
94
+ */
95
+ void (*record_sigbus)(CPUState *cpu, vaddr addr,
96
+ MMUAccessType access_type, uintptr_t ra);
97
+#else
98
/** @cpu_exec_interrupt: Callback for processing interrupts in cpu_exec */
99
bool (*cpu_exec_interrupt)(CPUState *cpu, int interrupt_request);
100
/**
101
@@ -XXX,XX +XXX,XX @@ struct TCGCPUOps {
102
*/
103
bool (*io_recompile_replay_branch)(CPUState *cpu,
104
const TranslationBlock *tb);
105
-#else
106
- /**
107
- * record_sigsegv:
108
- * @cpu: cpu context
109
- * @addr: faulting guest address
110
- * @access_type: access was read/write/execute
111
- * @maperr: true for invalid page, false for permission fault
112
- * @ra: host pc for unwinding
113
- *
114
- * We are about to raise SIGSEGV with si_code set for @maperr,
115
- * and si_addr set for @addr. Record anything further needed
116
- * for the signal ucontext_t.
117
- *
118
- * If the emulated kernel does not provide anything to the signal
119
- * handler with anything besides the user context registers, and
120
- * the siginfo_t, then this hook need do nothing and may be omitted.
121
- * Otherwise, record the data and return; the caller will raise
122
- * the signal, unwind the cpu state, and return to the main loop.
123
- *
124
- * If it is simpler to re-use the sysemu tlb_fill code, @ra is provided
125
- * so that a "normal" cpu exception can be raised. In this case,
126
- * the signal must be raised by the architecture cpu_loop.
127
- */
128
- void (*record_sigsegv)(CPUState *cpu, vaddr addr,
129
- MMUAccessType access_type,
130
- bool maperr, uintptr_t ra);
131
- /**
132
- * record_sigbus:
133
- * @cpu: cpu context
134
- * @addr: misaligned guest address
135
- * @access_type: access was read/write/execute
136
- * @ra: host pc for unwinding
137
- *
138
- * We are about to raise SIGBUS with si_code BUS_ADRALN,
139
- * and si_addr set for @addr. Record anything further needed
140
- * for the signal ucontext_t.
141
- *
142
- * If the emulated kernel does not provide the signal handler with
143
- * anything besides the user context registers, and the siginfo_t,
144
- * then this hook need do nothing and may be omitted.
145
- * Otherwise, record the data and return; the caller will raise
146
- * the signal, unwind the cpu state, and return to the main loop.
147
- *
148
- * If it is simpler to re-use the sysemu do_unaligned_access code,
149
- * @ra is provided so that a "normal" cpu exception can be raised.
150
- * In this case, the signal must be raised by the architecture cpu_loop.
151
- */
152
- void (*record_sigbus)(CPUState *cpu, vaddr addr,
153
- MMUAccessType access_type, uintptr_t ra);
154
-#endif /* CONFIG_SOFTMMU */
155
+#endif /* !CONFIG_USER_ONLY */
156
#endif /* NEED_CPU_H */
157
92
};
158
};
93
94
-extern const VMStateDescription vmstate_dummy;
95
-
96
extern const VMStateInfo vmstate_info_bool;
97
98
extern const VMStateInfo vmstate_info_int8;
99
diff --git a/cpu.c b/cpu.c
100
index XXXXXXX..XXXXXXX 100644
101
--- a/cpu.c
102
+++ b/cpu.c
103
@@ -XXX,XX +XXX,XX @@ const VMStateDescription vmstate_cpu_common = {
104
105
void cpu_exec_realizefn(CPUState *cpu, Error **errp)
106
{
107
+#ifndef CONFIG_USER_ONLY
108
CPUClass *cc = CPU_GET_CLASS(cpu);
109
+#endif
110
111
cpu_list_add(cpu);
112
if (!accel_cpu_realizefn(cpu, errp)) {
113
@@ -XXX,XX +XXX,XX @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
114
#ifdef CONFIG_USER_ONLY
115
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
116
qdev_get_vmsd(DEVICE(cpu))->unmigratable);
117
- assert(cc->legacy_vmsd == NULL);
118
#else
119
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
120
vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu);
121
}
122
- if (cc->legacy_vmsd != NULL) {
123
- vmstate_register(NULL, cpu->cpu_index, cc->legacy_vmsd, cpu);
124
+ if (cc->sysemu_ops->legacy_vmsd != NULL) {
125
+ vmstate_register(NULL, cpu->cpu_index, cc->sysemu_ops->legacy_vmsd, cpu);
126
}
127
#endif /* CONFIG_USER_ONLY */
128
}
129
130
void cpu_exec_unrealizefn(CPUState *cpu)
131
{
132
+#ifndef CONFIG_USER_ONLY
133
CPUClass *cc = CPU_GET_CLASS(cpu);
134
135
-#ifdef CONFIG_USER_ONLY
136
- assert(cc->legacy_vmsd == NULL);
137
-#else
138
- if (cc->legacy_vmsd != NULL) {
139
- vmstate_unregister(NULL, cc->legacy_vmsd, cpu);
140
+ if (cc->sysemu_ops->legacy_vmsd != NULL) {
141
+ vmstate_unregister(NULL, cc->sysemu_ops->legacy_vmsd, cpu);
142
}
143
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
144
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
145
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
146
index XXXXXXX..XXXXXXX 100644
147
--- a/stubs/vmstate.c
148
+++ b/stubs/vmstate.c
149
@@ -XXX,XX +XXX,XX @@
150
#include "qemu/osdep.h"
151
#include "migration/vmstate.h"
152
153
-const VMStateDescription vmstate_dummy = {};
154
-
155
int vmstate_register_with_alias_id(VMStateIf *obj,
156
uint32_t instance_id,
157
const VMStateDescription *vmsd,
158
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
159
index XXXXXXX..XXXXXXX 100644
160
--- a/target/arm/cpu.c
161
+++ b/target/arm/cpu.c
162
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
163
#include "hw/core/sysemu-cpu-ops.h"
164
165
static const struct SysemuCPUOps arm_sysemu_ops = {
166
+ .legacy_vmsd = &vmstate_arm_cpu,
167
};
168
#endif
169
170
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
171
#ifndef CONFIG_USER_ONLY
172
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
173
cc->asidx_from_attrs = arm_asidx_from_attrs;
174
- cc->legacy_vmsd = &vmstate_arm_cpu;
175
cc->virtio_is_big_endian = arm_cpu_virtio_is_big_endian;
176
cc->write_elf64_note = arm_cpu_write_elf64_note;
177
cc->write_elf32_note = arm_cpu_write_elf32_note;
178
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
179
index XXXXXXX..XXXXXXX 100644
180
--- a/target/i386/cpu.c
181
+++ b/target/i386/cpu.c
182
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
183
#include "hw/core/sysemu-cpu-ops.h"
184
185
static const struct SysemuCPUOps i386_sysemu_ops = {
186
+ .legacy_vmsd = &vmstate_x86_cpu,
187
};
188
#endif
189
190
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
191
cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
192
cc->write_elf32_note = x86_cpu_write_elf32_note;
193
cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
194
- cc->legacy_vmsd = &vmstate_x86_cpu;
195
cc->sysemu_ops = &i386_sysemu_ops;
196
#endif /* !CONFIG_USER_ONLY */
197
198
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
199
index XXXXXXX..XXXXXXX 100644
200
--- a/target/mips/cpu.c
201
+++ b/target/mips/cpu.c
202
@@ -XXX,XX +XXX,XX @@ static Property mips_cpu_properties[] = {
203
#include "hw/core/sysemu-cpu-ops.h"
204
205
static const struct SysemuCPUOps mips_sysemu_ops = {
206
+ .legacy_vmsd = &vmstate_mips_cpu,
207
};
208
#endif
209
210
@@ -XXX,XX +XXX,XX @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
211
cc->gdb_write_register = mips_cpu_gdb_write_register;
212
#ifndef CONFIG_USER_ONLY
213
cc->get_phys_page_debug = mips_cpu_get_phys_page_debug;
214
- cc->legacy_vmsd = &vmstate_mips_cpu;
215
cc->sysemu_ops = &mips_sysemu_ops;
216
#endif
217
cc->disas_set_info = mips_cpu_disas_set_info;
218
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
219
index XXXXXXX..XXXXXXX 100644
220
--- a/target/ppc/cpu_init.c
221
+++ b/target/ppc/cpu_init.c
222
@@ -XXX,XX +XXX,XX @@ static Property ppc_cpu_properties[] = {
223
#include "hw/core/sysemu-cpu-ops.h"
224
225
static const struct SysemuCPUOps ppc_sysemu_ops = {
226
+ .legacy_vmsd = &vmstate_ppc_cpu,
227
};
228
#endif
229
230
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
231
cc->gdb_write_register = ppc_cpu_gdb_write_register;
232
#ifndef CONFIG_USER_ONLY
233
cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
234
- cc->legacy_vmsd = &vmstate_ppc_cpu;
235
cc->sysemu_ops = &ppc_sysemu_ops;
236
#endif
237
#if defined(CONFIG_SOFTMMU)
238
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
239
index XXXXXXX..XXXXXXX 100644
240
--- a/target/riscv/cpu.c
241
+++ b/target/riscv/cpu.c
242
@@ -XXX,XX +XXX,XX @@ static const char *riscv_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
243
#include "hw/core/sysemu-cpu-ops.h"
244
245
static const struct SysemuCPUOps riscv_sysemu_ops = {
246
+ .legacy_vmsd = &vmstate_riscv_cpu,
247
};
248
#endif
249
250
@@ -XXX,XX +XXX,XX @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
251
cc->disas_set_info = riscv_cpu_disas_set_info;
252
#ifndef CONFIG_USER_ONLY
253
cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
254
- cc->legacy_vmsd = &vmstate_riscv_cpu;
255
cc->sysemu_ops = &riscv_sysemu_ops;
256
cc->write_elf64_note = riscv_cpu_write_elf64_note;
257
cc->write_elf32_note = riscv_cpu_write_elf32_note;
258
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
259
index XXXXXXX..XXXXXXX 100644
260
--- a/target/s390x/cpu.c
261
+++ b/target/s390x/cpu.c
262
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_reset_full(DeviceState *dev)
263
#include "hw/core/sysemu-cpu-ops.h"
264
265
static const struct SysemuCPUOps s390_sysemu_ops = {
266
+ .legacy_vmsd = &vmstate_s390_cpu,
267
};
268
#endif
269
270
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
271
cc->gdb_write_register = s390_cpu_gdb_write_register;
272
#ifndef CONFIG_USER_ONLY
273
cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
274
- cc->legacy_vmsd = &vmstate_s390_cpu;
275
cc->get_crash_info = s390_cpu_get_crash_info;
276
cc->write_elf64_note = s390_cpu_write_elf64_note;
277
cc->sysemu_ops = &s390_sysemu_ops;
278
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
279
index XXXXXXX..XXXXXXX 100644
280
--- a/target/sparc/cpu.c
281
+++ b/target/sparc/cpu.c
282
@@ -XXX,XX +XXX,XX @@ static Property sparc_cpu_properties[] = {
283
#include "hw/core/sysemu-cpu-ops.h"
284
285
static const struct SysemuCPUOps sparc_sysemu_ops = {
286
+ .legacy_vmsd = &vmstate_sparc_cpu,
287
};
288
#endif
289
290
@@ -XXX,XX +XXX,XX @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
291
cc->gdb_write_register = sparc_cpu_gdb_write_register;
292
#ifndef CONFIG_USER_ONLY
293
cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug;
294
- cc->legacy_vmsd = &vmstate_sparc_cpu;
295
cc->sysemu_ops = &sparc_sysemu_ops;
296
#endif
297
cc->disas_set_info = cpu_sparc_disas_set_info;
298
--
159
--
299
2.25.1
160
2.34.1
300
161
301
162
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Only the TCG accelerator uses the TranslationBlock API.
3
Since we *might* have user emulation with softmmu,
4
Move the tb-context.h / tb-hash.h / tb-lookup.h from the
4
replace the system emulation check by !user emulation one.
5
global namespace to the TCG one (in accel/tcg).
6
5
7
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
Invert some if() ladders for clarity.
8
Message-Id: <20210524170453.3791436-3-f4bug@amsat.org>
7
8
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
10
Message-Id: <20230613133347.82210-7-philmd@linaro.org>
9
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
---
12
---
11
{include/exec => accel/tcg}/tb-context.h | 0
13
accel/tcg/internal.h | 6 +++---
12
{include/exec => accel/tcg}/tb-hash.h | 0
14
accel/tcg/cpu-exec.c | 4 ++--
13
{include/exec => accel/tcg}/tb-lookup.h | 2 +-
15
2 files changed, 5 insertions(+), 5 deletions(-)
14
accel/tcg/cpu-exec.c | 6 +++---
15
accel/tcg/cputlb.c | 2 +-
16
accel/tcg/tcg-runtime.c | 2 +-
17
accel/tcg/translate-all.c | 4 ++--
18
MAINTAINERS | 1 -
19
8 files changed, 8 insertions(+), 9 deletions(-)
20
rename {include/exec => accel/tcg}/tb-context.h (100%)
21
rename {include/exec => accel/tcg}/tb-hash.h (100%)
22
rename {include/exec => accel/tcg}/tb-lookup.h (98%)
23
16
24
diff --git a/include/exec/tb-context.h b/accel/tcg/tb-context.h
17
diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h
25
similarity index 100%
26
rename from include/exec/tb-context.h
27
rename to accel/tcg/tb-context.h
28
diff --git a/include/exec/tb-hash.h b/accel/tcg/tb-hash.h
29
similarity index 100%
30
rename from include/exec/tb-hash.h
31
rename to accel/tcg/tb-hash.h
32
diff --git a/include/exec/tb-lookup.h b/accel/tcg/tb-lookup.h
33
similarity index 98%
34
rename from include/exec/tb-lookup.h
35
rename to accel/tcg/tb-lookup.h
36
index XXXXXXX..XXXXXXX 100644
18
index XXXXXXX..XXXXXXX 100644
37
--- a/include/exec/tb-lookup.h
19
--- a/accel/tcg/internal.h
38
+++ b/accel/tcg/tb-lookup.h
20
+++ b/accel/tcg/internal.h
39
@@ -XXX,XX +XXX,XX @@
21
@@ -XXX,XX +XXX,XX @@
22
* memory related structures are protected with mmap_lock.
23
* In !user-mode we use per-page locks.
24
*/
25
-#ifdef CONFIG_SOFTMMU
26
-#define assert_memory_lock()
27
-#else
28
+#ifdef CONFIG_USER_ONLY
29
#define assert_memory_lock() tcg_debug_assert(have_mmap_lock())
30
+#else
31
+#define assert_memory_lock()
40
#endif
32
#endif
41
33
42
#include "exec/exec-all.h"
34
#if defined(CONFIG_SOFTMMU) && defined(CONFIG_DEBUG_TCG)
43
-#include "exec/tb-hash.h"
44
+#include "tb-hash.h"
45
46
/* Might cause an exception, so have a longjmp destination ready */
47
static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc,
48
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
35
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
49
index XXXXXXX..XXXXXXX 100644
36
index XXXXXXX..XXXXXXX 100644
50
--- a/accel/tcg/cpu-exec.c
37
--- a/accel/tcg/cpu-exec.c
51
+++ b/accel/tcg/cpu-exec.c
38
+++ b/accel/tcg/cpu-exec.c
52
@@ -XXX,XX +XXX,XX @@
39
@@ -XXX,XX +XXX,XX @@ void cpu_exec_step_atomic(CPUState *cpu)
53
#include "qemu/compiler.h"
40
cpu_tb_exec(cpu, tb, &tb_exit);
54
#include "qemu/timer.h"
41
cpu_exec_exit(cpu);
55
#include "qemu/rcu.h"
42
} else {
56
-#include "exec/tb-hash.h"
43
-#ifndef CONFIG_SOFTMMU
57
-#include "exec/tb-lookup.h"
44
+#ifdef CONFIG_USER_ONLY
58
-#include "exec/tb-context.h"
45
clear_helper_retaddr();
59
#include "exec/log.h"
46
if (have_mmap_lock()) {
60
#include "qemu/main-loop.h"
47
mmap_unlock();
61
#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
48
@@ -XXX,XX +XXX,XX @@ static int cpu_exec_setjmp(CPUState *cpu, SyncClocks *sc)
62
@@ -XXX,XX +XXX,XX @@
49
/* Non-buggy compilers preserve this; assert the correct value. */
63
#include "exec/cpu-all.h"
50
g_assert(cpu == current_cpu);
64
#include "sysemu/cpu-timers.h"
51
65
#include "sysemu/replay.h"
52
-#ifndef CONFIG_SOFTMMU
66
+#include "tb-hash.h"
53
+#ifdef CONFIG_USER_ONLY
67
+#include "tb-lookup.h"
54
clear_helper_retaddr();
68
+#include "tb-context.h"
55
if (have_mmap_lock()) {
69
#include "internal.h"
56
mmap_unlock();
70
71
/* -icount align implementation. */
72
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
73
index XXXXXXX..XXXXXXX 100644
74
--- a/accel/tcg/cputlb.c
75
+++ b/accel/tcg/cputlb.c
76
@@ -XXX,XX +XXX,XX @@
77
#include "exec/memory.h"
78
#include "exec/cpu_ldst.h"
79
#include "exec/cputlb.h"
80
-#include "exec/tb-hash.h"
81
#include "exec/memory-internal.h"
82
#include "exec/ram_addr.h"
83
#include "tcg/tcg.h"
84
@@ -XXX,XX +XXX,XX @@
85
#include "exec/translate-all.h"
86
#include "trace/trace-root.h"
87
#include "trace/mem.h"
88
+#include "tb-hash.h"
89
#include "internal.h"
90
#ifdef CONFIG_PLUGIN
91
#include "qemu/plugin-memory.h"
92
diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
93
index XXXXXXX..XXXXXXX 100644
94
--- a/accel/tcg/tcg-runtime.c
95
+++ b/accel/tcg/tcg-runtime.c
96
@@ -XXX,XX +XXX,XX @@
97
#include "disas/disas.h"
98
#include "exec/log.h"
99
#include "tcg/tcg.h"
100
-#include "exec/tb-lookup.h"
101
+#include "tb-lookup.h"
102
103
/* 32-bit helpers */
104
105
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
106
index XXXXXXX..XXXXXXX 100644
107
--- a/accel/tcg/translate-all.c
108
+++ b/accel/tcg/translate-all.c
109
@@ -XXX,XX +XXX,XX @@
110
#endif
111
112
#include "exec/cputlb.h"
113
-#include "exec/tb-hash.h"
114
-#include "exec/tb-context.h"
115
#include "exec/translate-all.h"
116
#include "qemu/bitmap.h"
117
#include "qemu/error-report.h"
118
@@ -XXX,XX +XXX,XX @@
119
#include "sysemu/tcg.h"
120
#include "qapi/error.h"
121
#include "hw/core/tcg-cpu-ops.h"
122
+#include "tb-hash.h"
123
+#include "tb-context.h"
124
#include "internal.h"
125
126
/* #define DEBUG_TB_INVALIDATE */
127
diff --git a/MAINTAINERS b/MAINTAINERS
128
index XXXXXXX..XXXXXXX 100644
129
--- a/MAINTAINERS
130
+++ b/MAINTAINERS
131
@@ -XXX,XX +XXX,XX @@ F: docs/devel/decodetree.rst
132
F: include/exec/cpu*.h
133
F: include/exec/exec-all.h
134
F: include/exec/helper*.h
135
-F: include/exec/tb-hash.h
136
F: include/sysemu/cpus.h
137
F: include/sysemu/tcg.h
138
F: include/hw/core/tcg-cpu-ops.h
139
--
57
--
140
2.25.1
58
2.34.1
141
59
142
60
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
3
We use the CONFIG_USER_ONLY key to describe user emulation,
4
and the CONFIG_SOFTMMU key to describe system emulation. Alias
5
it as 'CONFIG_SYSTEM_ONLY' for parity with user emulation.
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5
Message-Id: <20210517105140.1062037-20-f4bug@amsat.org>
9
Message-Id: <20230613133347.82210-8-philmd@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
---
11
---
8
include/hw/core/cpu.h | 3 ---
12
meson.build | 1 +
9
include/hw/core/sysemu-cpu-ops.h | 5 +++++
13
1 file changed, 1 insertion(+)
10
hw/core/cpu-sysemu.c | 4 ++--
11
target/arm/cpu.c | 2 +-
12
target/i386/cpu.c | 2 +-
13
5 files changed, 9 insertions(+), 7 deletions(-)
14
14
15
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
15
diff --git a/meson.build b/meson.build
16
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
17
--- a/include/hw/core/cpu.h
17
--- a/meson.build
18
+++ b/include/hw/core/cpu.h
18
+++ b/meson.build
19
@@ -XXX,XX +XXX,XX @@ struct SysemuCPUOps;
19
@@ -XXX,XX +XXX,XX @@ foreach target : target_dirs
20
* associated memory transaction attributes to use for the access.
20
endif
21
* CPUs which use memory transaction attributes should implement this
21
config_target += { 'CONFIG_BSD_USER': 'y' }
22
* instead of get_phys_page_debug.
22
elif target.endswith('softmmu')
23
- * @asidx_from_attrs: Callback to return the CPU AddressSpace to use for
23
+ config_target += { 'CONFIG_SYSTEM_ONLY': 'y' }
24
- * a memory access with the specified memory transaction attributes.
24
config_target += { 'CONFIG_SOFTMMU': 'y' }
25
* @gdb_read_register: Callback for letting GDB read a register.
25
endif
26
* @gdb_write_register: Callback for letting GDB write a register.
26
if target.endswith('-user')
27
* @gdb_num_core_regs: Number of core registers accessible to GDB.
28
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
29
hwaddr (*get_phys_page_debug)(CPUState *cpu, vaddr addr);
30
hwaddr (*get_phys_page_attrs_debug)(CPUState *cpu, vaddr addr,
31
MemTxAttrs *attrs);
32
- int (*asidx_from_attrs)(CPUState *cpu, MemTxAttrs attrs);
33
int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
34
int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
35
36
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
37
index XXXXXXX..XXXXXXX 100644
38
--- a/include/hw/core/sysemu-cpu-ops.h
39
+++ b/include/hw/core/sysemu-cpu-ops.h
40
@@ -XXX,XX +XXX,XX @@
41
* struct SysemuCPUOps: System operations specific to a CPU class
42
*/
43
typedef struct SysemuCPUOps {
44
+ /**
45
+ * @asidx_from_attrs: Callback to return the CPU AddressSpace to use for
46
+ * a memory access with the specified memory transaction attributes.
47
+ */
48
+ int (*asidx_from_attrs)(CPUState *cpu, MemTxAttrs attrs);
49
/**
50
* @get_crash_info: Callback for reporting guest crash information in
51
* GUEST_PANICKED events.
52
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
53
index XXXXXXX..XXXXXXX 100644
54
--- a/hw/core/cpu-sysemu.c
55
+++ b/hw/core/cpu-sysemu.c
56
@@ -XXX,XX +XXX,XX @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
57
CPUClass *cc = CPU_GET_CLASS(cpu);
58
int ret = 0;
59
60
- if (cc->asidx_from_attrs) {
61
- ret = cc->asidx_from_attrs(cpu, attrs);
62
+ if (cc->sysemu_ops->asidx_from_attrs) {
63
+ ret = cc->sysemu_ops->asidx_from_attrs(cpu, attrs);
64
assert(ret < cpu->num_ases && ret >= 0);
65
}
66
return ret;
67
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
68
index XXXXXXX..XXXXXXX 100644
69
--- a/target/arm/cpu.c
70
+++ b/target/arm/cpu.c
71
@@ -XXX,XX +XXX,XX @@ static gchar *arm_gdb_arch_name(CPUState *cs)
72
#include "hw/core/sysemu-cpu-ops.h"
73
74
static const struct SysemuCPUOps arm_sysemu_ops = {
75
+ .asidx_from_attrs = arm_asidx_from_attrs,
76
.write_elf32_note = arm_cpu_write_elf32_note,
77
.write_elf64_note = arm_cpu_write_elf64_note,
78
.virtio_is_big_endian = arm_cpu_virtio_is_big_endian,
79
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
80
cc->gdb_write_register = arm_cpu_gdb_write_register;
81
#ifndef CONFIG_USER_ONLY
82
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
83
- cc->asidx_from_attrs = arm_asidx_from_attrs;
84
cc->sysemu_ops = &arm_sysemu_ops;
85
#endif
86
cc->gdb_num_core_regs = 26;
87
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
88
index XXXXXXX..XXXXXXX 100644
89
--- a/target/i386/cpu.c
90
+++ b/target/i386/cpu.c
91
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
92
#include "hw/core/sysemu-cpu-ops.h"
93
94
static const struct SysemuCPUOps i386_sysemu_ops = {
95
+ .asidx_from_attrs = x86_asidx_from_attrs,
96
.get_crash_info = x86_cpu_get_crash_info,
97
.write_elf32_note = x86_cpu_write_elf32_note,
98
.write_elf64_note = x86_cpu_write_elf64_note,
99
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
100
cc->get_paging_enabled = x86_cpu_get_paging_enabled;
101
102
#ifndef CONFIG_USER_ONLY
103
- cc->asidx_from_attrs = x86_asidx_from_attrs;
104
cc->get_memory_mapping = x86_cpu_get_memory_mapping;
105
cc->get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug;
106
cc->sysemu_ops = &i386_sysemu_ops;
107
--
27
--
108
2.25.1
28
2.34.1
109
29
110
30
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
cpu_get_crash_info() is called on GUEST_PANICKED events,
3
Since we *might* have user emulation with softmmu,
4
which only occur in system emulation.
4
use the clearer 'CONFIG_SYSTEM_ONLY' key to check
5
5
for system emulation.
6
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Message-Id: <20210517105140.1062037-18-f4bug@amsat.org>
9
Message-Id: <20230613133347.82210-9-philmd@linaro.org>
9
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
---
11
---
11
include/hw/core/cpu.h | 1 -
12
meson.build | 4 ++--
12
include/hw/core/sysemu-cpu-ops.h | 5 +++++
13
accel/qtest/meson.build | 2 +-
13
hw/core/cpu-sysemu.c | 4 ++--
14
accel/stubs/meson.build | 2 +-
14
target/i386/cpu.c | 2 +-
15
accel/tcg/meson.build | 6 +++---
15
target/s390x/cpu.c | 2 +-
16
dump/meson.build | 2 +-
16
5 files changed, 9 insertions(+), 5 deletions(-)
17
hw/i386/kvm/meson.build | 2 +-
17
18
migration/meson.build | 2 +-
18
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
19
monitor/meson.build | 2 +-
19
index XXXXXXX..XXXXXXX 100644
20
qapi/meson.build | 2 +-
20
--- a/include/hw/core/cpu.h
21
semihosting/meson.build | 2 +-
21
+++ b/include/hw/core/cpu.h
22
softmmu/meson.build | 4 ++--
22
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
23
target/i386/tcg/sysemu/meson.build | 2 +-
23
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
24
ui/meson.build | 4 ++--
24
uint8_t *buf, int len, bool is_write);
25
13 files changed, 18 insertions(+), 18 deletions(-)
25
void (*dump_state)(CPUState *cpu, FILE *, int flags);
26
26
- GuestPanicInformation* (*get_crash_info)(CPUState *cpu);
27
diff --git a/meson.build b/meson.build
27
void (*dump_statistics)(CPUState *cpu, int flags);
28
index XXXXXXX..XXXXXXX 100644
28
int64_t (*get_arch_id)(CPUState *cpu);
29
--- a/meson.build
29
bool (*get_paging_enabled)(const CPUState *cpu);
30
+++ b/meson.build
30
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
31
@@ -XXX,XX +XXX,XX @@ config_all += config_host
31
index XXXXXXX..XXXXXXX 100644
32
config_all += config_all_disas
32
--- a/include/hw/core/sysemu-cpu-ops.h
33
config_all += {
33
+++ b/include/hw/core/sysemu-cpu-ops.h
34
'CONFIG_XEN': xen.found(),
34
@@ -XXX,XX +XXX,XX @@
35
- 'CONFIG_SOFTMMU': have_system,
35
* struct SysemuCPUOps: System operations specific to a CPU class
36
+ 'CONFIG_SYSTEM_ONLY': have_system,
36
*/
37
'CONFIG_USER_ONLY': have_user,
37
typedef struct SysemuCPUOps {
38
'CONFIG_ALL': true,
38
+ /**
39
+ * @get_crash_info: Callback for reporting guest crash information in
40
+ * GUEST_PANICKED events.
41
+ */
42
+ GuestPanicInformation* (*get_crash_info)(CPUState *cpu);
43
/**
44
* @virtio_is_big_endian: Callback to return %true if a CPU which supports
45
* runtime configurable endianness is currently big-endian.
46
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
47
index XXXXXXX..XXXXXXX 100644
48
--- a/hw/core/cpu-sysemu.c
49
+++ b/hw/core/cpu-sysemu.c
50
@@ -XXX,XX +XXX,XX @@ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
51
CPUClass *cc = CPU_GET_CLASS(cpu);
52
GuestPanicInformation *res = NULL;
53
54
- if (cc->get_crash_info) {
55
- res = cc->get_crash_info(cpu);
56
+ if (cc->sysemu_ops->get_crash_info) {
57
+ res = cc->sysemu_ops->get_crash_info(cpu);
58
}
59
return res;
60
}
39
}
61
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
40
@@ -XXX,XX +XXX,XX @@ endif
62
index XXXXXXX..XXXXXXX 100644
41
softmmu_ss.add(authz, blockdev, chardev, crypto, io, qmp)
63
--- a/target/i386/cpu.c
42
common_ss.add(qom, qemuutil)
64
+++ b/target/i386/cpu.c
43
65
@@ -XXX,XX +XXX,XX @@ static Property x86_cpu_properties[] = {
44
-common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: [softmmu_ss])
66
#include "hw/core/sysemu-cpu-ops.h"
45
+common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [softmmu_ss])
67
46
common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
68
static const struct SysemuCPUOps i386_sysemu_ops = {
47
69
+ .get_crash_info = x86_cpu_get_crash_info,
48
common_all = common_ss.apply(config_all, strict: false)
70
.legacy_vmsd = &vmstate_x86_cpu,
49
diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build
71
};
50
index XXXXXXX..XXXXXXX 100644
72
#endif
51
--- a/accel/qtest/meson.build
73
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
52
+++ b/accel/qtest/meson.build
74
cc->asidx_from_attrs = x86_asidx_from_attrs;
53
@@ -1 +1 @@
75
cc->get_memory_mapping = x86_cpu_get_memory_mapping;
54
-qtest_module_ss.add(when: ['CONFIG_SOFTMMU'], if_true: files('qtest.c'))
76
cc->get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug;
55
+qtest_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files('qtest.c'))
77
- cc->get_crash_info = x86_cpu_get_crash_info;
56
diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build
78
cc->write_elf64_note = x86_cpu_write_elf64_note;
57
index XXXXXXX..XXXXXXX 100644
79
cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
58
--- a/accel/stubs/meson.build
80
cc->write_elf32_note = x86_cpu_write_elf32_note;
59
+++ b/accel/stubs/meson.build
81
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
60
@@ -XXX,XX +XXX,XX @@ sysemu_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
82
index XXXXXXX..XXXXXXX 100644
61
sysemu_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
83
--- a/target/s390x/cpu.c
62
sysemu_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
84
+++ b/target/s390x/cpu.c
63
85
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_reset_full(DeviceState *dev)
64
-specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: sysemu_stubs_ss)
86
#include "hw/core/sysemu-cpu-ops.h"
65
+specific_ss.add_all(when: ['CONFIG_SYSTEM_ONLY'], if_true: sysemu_stubs_ss)
87
66
diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
88
static const struct SysemuCPUOps s390_sysemu_ops = {
67
index XXXXXXX..XXXXXXX 100644
89
+ .get_crash_info = s390_cpu_get_crash_info,
68
--- a/accel/tcg/meson.build
90
.legacy_vmsd = &vmstate_s390_cpu,
69
+++ b/accel/tcg/meson.build
91
};
70
@@ -XXX,XX +XXX,XX @@ tcg_ss.add(files(
92
#endif
71
'translator.c',
93
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
72
))
94
cc->gdb_write_register = s390_cpu_gdb_write_register;
73
tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c'))
95
#ifndef CONFIG_USER_ONLY
74
-tcg_ss.add(when: 'CONFIG_SOFTMMU', if_false: files('user-exec-stub.c'))
96
cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
75
+tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c'))
97
- cc->get_crash_info = s390_cpu_get_crash_info;
76
tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c')])
98
cc->write_elf64_note = s390_cpu_write_elf64_note;
77
tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
99
cc->sysemu_ops = &s390_sysemu_ops;
78
tcg_ss.add(when: 'CONFIG_LINUX', if_true: files('perf.c'))
100
#endif
79
specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
80
81
-specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
82
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
83
'cputlb.c',
84
'monitor.c',
85
))
86
87
-tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
88
+tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
89
'tcg-accel-ops.c',
90
'tcg-accel-ops-mttcg.c',
91
'tcg-accel-ops-icount.c',
92
diff --git a/dump/meson.build b/dump/meson.build
93
index XXXXXXX..XXXXXXX 100644
94
--- a/dump/meson.build
95
+++ b/dump/meson.build
96
@@ -XXX,XX +XXX,XX @@
97
softmmu_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo])
98
-specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('win_dump.c'))
99
+specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('win_dump.c'))
100
diff --git a/hw/i386/kvm/meson.build b/hw/i386/kvm/meson.build
101
index XXXXXXX..XXXXXXX 100644
102
--- a/hw/i386/kvm/meson.build
103
+++ b/hw/i386/kvm/meson.build
104
@@ -XXX,XX +XXX,XX @@ xen_stubs_ss.add(when: 'CONFIG_XEN_EMU', if_false: files(
105
'xen-stubs.c',
106
))
107
108
-specific_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: xen_stubs_ss)
109
+specific_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: xen_stubs_ss)
110
diff --git a/migration/meson.build b/migration/meson.build
111
index XXXXXXX..XXXXXXX 100644
112
--- a/migration/meson.build
113
+++ b/migration/meson.build
114
@@ -XXX,XX +XXX,XX @@ if get_option('live_block_migration').allowed()
115
endif
116
softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c'))
117
118
-specific_ss.add(when: 'CONFIG_SOFTMMU',
119
+specific_ss.add(when: 'CONFIG_SYSTEM_ONLY',
120
if_true: files('ram.c',
121
'target.c'))
122
diff --git a/monitor/meson.build b/monitor/meson.build
123
index XXXXXXX..XXXXXXX 100644
124
--- a/monitor/meson.build
125
+++ b/monitor/meson.build
126
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
127
))
128
softmmu_ss.add([spice_headers, files('qmp-cmds.c')])
129
130
-specific_ss.add(when: 'CONFIG_SOFTMMU',
131
+specific_ss.add(when: 'CONFIG_SYSTEM_ONLY',
132
        if_true: [files( 'hmp-cmds-target.c', 'hmp-target.c'), spice])
133
diff --git a/qapi/meson.build b/qapi/meson.build
134
index XXXXXXX..XXXXXXX 100644
135
--- a/qapi/meson.build
136
+++ b/qapi/meson.build
137
@@ -XXX,XX +XXX,XX @@ foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
138
if output.endswith('.trace-events')
139
qapi_trace_events += qapi_files[i]
140
endif
141
- specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
142
+ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: qapi_files[i])
143
i = i + 1
144
endforeach
145
diff --git a/semihosting/meson.build b/semihosting/meson.build
146
index XXXXXXX..XXXXXXX 100644
147
--- a/semihosting/meson.build
148
+++ b/semihosting/meson.build
149
@@ -XXX,XX +XXX,XX @@ specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
150
'syscalls.c',
151
))
152
153
-specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SOFTMMU'], if_true: files(
154
+specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_true: files(
155
'config.c',
156
'console.c',
157
'uaccess.c',
158
diff --git a/softmmu/meson.build b/softmmu/meson.build
159
index XXXXXXX..XXXXXXX 100644
160
--- a/softmmu/meson.build
161
+++ b/softmmu/meson.build
162
@@ -XXX,XX +XXX,XX @@
163
-specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
164
+specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files(
165
'arch_init.c',
166
'ioport.c',
167
'memory.c',
168
@@ -XXX,XX +XXX,XX @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
169
'watchpoint.c',
170
)])
171
172
-specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files(
173
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: [files(
174
'icount.c',
175
)])
176
177
diff --git a/target/i386/tcg/sysemu/meson.build b/target/i386/tcg/sysemu/meson.build
178
index XXXXXXX..XXXXXXX 100644
179
--- a/target/i386/tcg/sysemu/meson.build
180
+++ b/target/i386/tcg/sysemu/meson.build
181
@@ -XXX,XX +XXX,XX @@
182
-i386_softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_SOFTMMU'], if_true: files(
183
+i386_softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_SYSTEM_ONLY'], if_true: files(
184
'tcg-cpu.c',
185
'smm_helper.c',
186
'excp_helper.c',
187
diff --git a/ui/meson.build b/ui/meson.build
188
index XXXXXXX..XXXXXXX 100644
189
--- a/ui/meson.build
190
+++ b/ui/meson.build
191
@@ -XXX,XX +XXX,XX @@
192
softmmu_ss.add(pixman)
193
-specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path
194
-specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) # for the include path
195
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: pixman) # for the include path
196
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: opengl) # for the include path
197
198
softmmu_ss.add(png)
199
softmmu_ss.add(files(
101
--
200
--
102
2.25.1
201
2.34.1
103
202
104
203
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
The current cpu.c contains sysemu-specific methods.
3
We use the user_ss[] array to hold the user emulation sources,
4
To avoid building them in user-mode builds, split the
4
and the softmmu_ss[] array to hold the system emulation ones.
5
current cpu.c as cpu-common.c / cpu-sysemu.c.
5
Hold the latter in the 'system_ss[]' array for parity with user
6
emulation.
6
7
7
Start by moving cpu_get_crash_info().
8
Mechanical change doing:
8
9
9
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
$ sed -i -e s/softmmu_ss/system_ss/g $(git grep -l softmmu_ss)
11
12
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
10
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
13
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
11
Message-Id: <20210517105140.1062037-6-f4bug@amsat.org>
14
Message-Id: <20230613133347.82210-10-philmd@linaro.org>
12
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
15
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13
---
16
---
14
hw/core/{cpu.c => cpu-common.c} | 17 -----------------
17
docs/devel/build-system.rst | 14 +--
15
hw/core/cpu-sysemu.c | 34 +++++++++++++++++++++++++++++++++
18
meson.build | 12 +--
16
hw/core/meson.build | 3 ++-
19
accel/meson.build | 4 +-
17
3 files changed, 36 insertions(+), 18 deletions(-)
20
audio/meson.build | 8 +-
18
rename hw/core/{cpu.c => cpu-common.c} (96%)
21
backends/meson.build | 20 ++--
19
create mode 100644 hw/core/cpu-sysemu.c
22
backends/tpm/meson.build | 8 +-
23
block/meson.build | 6 +-
24
block/monitor/meson.build | 2 +-
25
chardev/meson.build | 2 +-
26
disas/meson.build | 2 +-
27
dump/meson.build | 2 +-
28
ebpf/meson.build | 2 +-
29
fsdev/meson.build | 4 +-
30
gdbstub/meson.build | 10 +-
31
hw/9pfs/meson.build | 2 +-
32
hw/acpi/meson.build | 10 +-
33
hw/adc/meson.build | 10 +-
34
hw/arm/meson.build | 8 +-
35
hw/audio/meson.build | 28 +++---
36
hw/block/meson.build | 28 +++---
37
hw/char/meson.build | 70 +++++++-------
38
hw/core/meson.build | 22 ++---
39
hw/cpu/meson.build | 6 +-
40
hw/cxl/meson.build | 4 +-
41
hw/display/meson.build | 76 +++++++--------
42
hw/dma/meson.build | 32 +++----
43
hw/gpio/meson.build | 26 ++---
44
hw/i2c/meson.build | 2 +-
45
hw/ide/meson.build | 28 +++---
46
hw/input/meson.build | 32 +++----
47
hw/intc/meson.build | 44 ++++-----
48
hw/ipack/meson.build | 2 +-
49
hw/ipmi/meson.build | 2 +-
50
hw/isa/meson.build | 18 ++--
51
hw/mem/meson.build | 8 +-
52
hw/misc/macio/meson.build | 2 +-
53
hw/misc/meson.build | 148 ++++++++++++++---------------
54
hw/net/can/meson.build | 16 ++--
55
hw/net/meson.build | 96 +++++++++----------
56
hw/nubus/meson.build | 2 +-
57
hw/nvme/meson.build | 2 +-
58
hw/nvram/meson.build | 26 ++---
59
hw/pci-bridge/meson.build | 4 +-
60
hw/pci-host/meson.build | 2 +-
61
hw/pci/meson.build | 8 +-
62
hw/pcmcia/meson.build | 4 +-
63
hw/rdma/meson.build | 2 +-
64
hw/remote/meson.build | 2 +-
65
hw/rtc/meson.build | 28 +++---
66
hw/scsi/meson.build | 2 +-
67
hw/sd/meson.build | 24 ++---
68
hw/sensor/meson.build | 18 ++--
69
hw/smbios/meson.build | 6 +-
70
hw/ssi/meson.build | 26 ++---
71
hw/timer/meson.build | 74 +++++++--------
72
hw/tpm/meson.build | 14 +--
73
hw/usb/meson.build | 74 +++++++--------
74
hw/virtio/meson.build | 12 +--
75
hw/watchdog/meson.build | 18 ++--
76
hw/xen/meson.build | 4 +-
77
migration/meson.build | 10 +-
78
monitor/meson.build | 4 +-
79
net/can/meson.build | 2 +-
80
net/meson.build | 38 ++++----
81
qom/meson.build | 2 +-
82
replay/meson.build | 2 +-
83
softmmu/meson.build | 8 +-
84
stats/meson.build | 2 +-
85
target/alpha/meson.build | 6 +-
86
target/arm/hvf/meson.build | 2 +-
87
target/arm/meson.build | 6 +-
88
target/arm/tcg/meson.build | 2 +-
89
target/avr/meson.build | 6 +-
90
target/cris/meson.build | 6 +-
91
target/hppa/meson.build | 6 +-
92
target/i386/hax/meson.build | 6 +-
93
target/i386/hvf/meson.build | 2 +-
94
target/i386/kvm/meson.build | 4 +-
95
target/i386/meson.build | 8 +-
96
target/i386/nvmm/meson.build | 4 +-
97
target/i386/tcg/sysemu/meson.build | 2 +-
98
target/i386/whpx/meson.build | 2 +-
99
target/loongarch/meson.build | 6 +-
100
target/m68k/meson.build | 6 +-
101
target/microblaze/meson.build | 6 +-
102
target/mips/meson.build | 4 +-
103
target/mips/sysemu/meson.build | 2 +-
104
target/mips/tcg/sysemu/meson.build | 2 +-
105
target/nios2/meson.build | 6 +-
106
target/openrisc/meson.build | 6 +-
107
target/ppc/meson.build | 10 +-
108
target/riscv/meson.build | 6 +-
109
target/s390x/kvm/meson.build | 2 +-
110
target/s390x/meson.build | 6 +-
111
target/sh4/meson.build | 6 +-
112
target/sparc/meson.build | 6 +-
113
target/tricore/meson.build | 4 +-
114
target/xtensa/meson.build | 6 +-
115
tcg/meson.build | 2 +-
116
trace/meson.build | 2 +-
117
ui/meson.build | 26 ++---
118
101 files changed, 706 insertions(+), 706 deletions(-)
20
119
21
diff --git a/hw/core/cpu.c b/hw/core/cpu-common.c
120
diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst
22
similarity index 96%
121
index XXXXXXX..XXXXXXX 100644
23
rename from hw/core/cpu.c
122
--- a/docs/devel/build-system.rst
24
rename to hw/core/cpu-common.c
123
+++ b/docs/devel/build-system.rst
25
index XXXXXXX..XXXXXXX 100644
124
@@ -XXX,XX +XXX,XX @@ Target-independent emulator sourcesets:
26
--- a/hw/core/cpu.c
125
This includes error handling infrastructure, standard data structures,
27
+++ b/hw/core/cpu-common.c
126
platform portability wrapper functions, etc.
28
@@ -XXX,XX +XXX,XX @@ static bool cpu_common_virtio_is_big_endian(CPUState *cpu)
127
29
return target_words_bigendian();
128
- Target-independent code lives in the ``common_ss``, ``softmmu_ss`` and
30
}
129
+ Target-independent code lives in the ``common_ss``, ``system_ss`` and
31
130
``user_ss`` sourcesets. ``common_ss`` is linked into all emulators,
32
-/*
131
- ``softmmu_ss`` only in system emulators, ``user_ss`` only in user-mode
33
- * XXX the following #if is always true because this is a common_ss
132
+ ``system_ss`` only in system emulators, ``user_ss`` only in user-mode
34
- * module, so target CONFIG_* is never defined.
133
emulators.
35
- */
134
36
-#if !defined(CONFIG_USER_ONLY)
135
Target-independent sourcesets must exercise particular care when using
37
-GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
136
@@ -XXX,XX +XXX,XX @@ Target-independent emulator sourcesets:
38
-{
137
symbol::
39
- CPUClass *cc = CPU_GET_CLASS(cpu);
138
40
- GuestPanicInformation *res = NULL;
139
# Some targets have CONFIG_ACPI, some don't, so this is not enough
41
-
140
- softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi.c'),
42
- if (cc->get_crash_info) {
141
+ system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi.c'),
43
- res = cc->get_crash_info(cpu);
142
if_false: files('acpi-stub.c'))
44
- }
143
45
- return res;
144
# This is required as well:
46
-}
145
- softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c'))
47
-#endif
146
+ system_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c'))
48
-
147
49
void cpu_dump_state(CPUState *cpu, FILE *f, int flags)
148
Target-dependent emulator sourcesets:
50
{
149
In the target-dependent set lives CPU emulation, some device emulation and
51
CPUClass *cc = CPU_GET_CLASS(cpu);
150
@@ -XXX,XX +XXX,XX @@ Target-dependent emulator sourcesets:
52
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
151
for all emulators and for system emulators only. For example::
53
new file mode 100644
152
54
index XXXXXXX..XXXXXXX
153
arm_ss = ss.source_set()
55
--- /dev/null
154
- arm_softmmu_ss = ss.source_set()
56
+++ b/hw/core/cpu-sysemu.c
155
+ arm_system_ss = ss.source_set()
57
@@ -XXX,XX +XXX,XX @@
156
...
58
+/*
157
target_arch += {'arm': arm_ss}
59
+ * QEMU CPU model (system emulation specific)
158
- target_softmmu_arch += {'arm': arm_softmmu_ss}
60
+ *
159
+ target_softmmu_arch += {'arm': arm_system_ss}
61
+ * Copyright (c) 2012-2014 SUSE LINUX Products GmbH
160
62
+ *
161
Module sourcesets:
63
+ * This program is free software; you can redistribute it and/or
162
There are two dictionaries for modules: ``modules`` is used for
64
+ * modify it under the terms of the GNU General Public License
163
target-independent modules and ``target_modules`` is used for
65
+ * as published by the Free Software Foundation; either version 2
164
target-dependent modules. When modules are disabled the ``module``
66
+ * of the License, or (at your option) any later version.
165
- source sets are added to ``softmmu_ss`` and the ``target_modules``
67
+ *
166
+ source sets are added to ``system_ss`` and the ``target_modules``
68
+ * This program is distributed in the hope that it will be useful,
167
source sets are added to ``specific_ss``.
69
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
168
70
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
169
Both dictionaries are nested. One dictionary is created per
71
+ * GNU General Public License for more details.
170
diff --git a/meson.build b/meson.build
72
+ *
171
index XXXXXXX..XXXXXXX 100644
73
+ * You should have received a copy of the GNU General Public License
172
--- a/meson.build
74
+ * along with this program; if not, see
173
+++ b/meson.build
75
+ * <http://www.gnu.org/licenses/gpl-2.0.html>
174
@@ -XXX,XX +XXX,XX @@ hwcore_ss = ss.source_set()
76
+ */
175
io_ss = ss.source_set()
77
+
176
qmp_ss = ss.source_set()
78
+#include "qemu/osdep.h"
177
qom_ss = ss.source_set()
79
+#include "qapi/error.h"
178
-softmmu_ss = ss.source_set()
80
+#include "hw/core/cpu.h"
179
+system_ss = ss.source_set()
81
+
180
specific_fuzz_ss = ss.source_set()
82
+GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
181
specific_ss = ss.source_set()
83
+{
182
stub_ss = ss.source_set()
84
+ CPUClass *cc = CPU_GET_CLASS(cpu);
183
@@ -XXX,XX +XXX,XX @@ if have_block
85
+ GuestPanicInformation *res = NULL;
184
# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
86
+
185
# os-win32.c does not
87
+ if (cc->get_crash_info) {
186
blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
88
+ res = cc->get_crash_info(cpu);
187
- softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
89
+ }
188
+ system_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
90
+ return res;
189
endif
91
+}
190
191
common_ss.add(files('cpus-common.c'))
192
@@ -XXX,XX +XXX,XX @@ foreach d, list : modules
193
if d == 'block'
194
block_ss.add_all(module_ss)
195
else
196
- softmmu_ss.add_all(module_ss)
197
+ system_ss.add_all(module_ss)
198
endif
199
endif
200
endforeach
201
@@ -XXX,XX +XXX,XX @@ libmigration = static_library('migration', sources: migration_files + genh,
202
build_by_default: false)
203
migration = declare_dependency(link_with: libmigration,
204
dependencies: [zlib, qom, io])
205
-softmmu_ss.add(migration)
206
+system_ss.add(migration)
207
208
block_ss = block_ss.apply(config_host, strict: false)
209
libblock = static_library('block', block_ss.sources() + genh,
210
@@ -XXX,XX +XXX,XX @@ if emulator_modules.length() > 0
211
alias_target('modules', emulator_modules)
212
endif
213
214
-softmmu_ss.add(authz, blockdev, chardev, crypto, io, qmp)
215
+system_ss.add(authz, blockdev, chardev, crypto, io, qmp)
216
common_ss.add(qom, qemuutil)
217
218
-common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [softmmu_ss])
219
+common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss])
220
common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
221
222
common_all = common_ss.apply(config_all, strict: false)
223
diff --git a/accel/meson.build b/accel/meson.build
224
index XXXXXXX..XXXXXXX 100644
225
--- a/accel/meson.build
226
+++ b/accel/meson.build
227
@@ -XXX,XX +XXX,XX @@
228
specific_ss.add(files('accel-common.c', 'accel-blocker.c'))
229
-softmmu_ss.add(files('accel-softmmu.c'))
230
+system_ss.add(files('accel-softmmu.c'))
231
user_ss.add(files('accel-user.c'))
232
233
subdir('tcg')
234
@@ -XXX,XX +XXX,XX @@ if have_system
235
endif
236
237
# qtest
238
-softmmu_ss.add(files('dummy-cpus.c'))
239
+system_ss.add(files('dummy-cpus.c'))
240
diff --git a/audio/meson.build b/audio/meson.build
241
index XXXXXXX..XXXXXXX 100644
242
--- a/audio/meson.build
243
+++ b/audio/meson.build
244
@@ -XXX,XX +XXX,XX @@
245
-softmmu_ss.add([spice_headers, files('audio.c')])
246
-softmmu_ss.add(files(
247
+system_ss.add([spice_headers, files('audio.c')])
248
+system_ss.add(files(
249
'audio-hmp-cmds.c',
250
'audio_legacy.c',
251
'mixeng.c',
252
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
253
'wavcapture.c',
254
))
255
256
-softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.m'))
257
-softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
258
+system_ss.add(when: coreaudio, if_true: files('coreaudio.m'))
259
+system_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
260
261
audio_modules = {}
262
foreach m : [
263
diff --git a/backends/meson.build b/backends/meson.build
264
index XXXXXXX..XXXXXXX 100644
265
--- a/backends/meson.build
266
+++ b/backends/meson.build
267
@@ -XXX,XX +XXX,XX @@
268
-softmmu_ss.add([files(
269
+system_ss.add([files(
270
'cryptodev-builtin.c',
271
'cryptodev-hmp-cmds.c',
272
'cryptodev.c',
273
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add([files(
274
'confidential-guest-support.c',
275
), numa])
276
277
-softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
278
-softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
279
-softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
280
+system_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
281
+system_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
282
+system_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
283
if keyutils.found()
284
- softmmu_ss.add(keyutils, files('cryptodev-lkcf.c'))
285
+ system_ss.add(keyutils, files('cryptodev-lkcf.c'))
286
endif
287
if have_vhost_user
288
- softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c'))
289
+ system_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c'))
290
endif
291
-softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
292
+system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
293
if have_vhost_user_crypto
294
- softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost-user.c'))
295
+ system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost-user.c'))
296
endif
297
-softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
298
-softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
299
+system_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
300
+system_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
301
302
subdir('tpm')
303
diff --git a/backends/tpm/meson.build b/backends/tpm/meson.build
304
index XXXXXXX..XXXXXXX 100644
305
--- a/backends/tpm/meson.build
306
+++ b/backends/tpm/meson.build
307
@@ -XXX,XX +XXX,XX @@
308
if have_tpm
309
- softmmu_ss.add(files('tpm_backend.c'))
310
- softmmu_ss.add(files('tpm_util.c'))
311
- softmmu_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
312
- softmmu_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
313
+ system_ss.add(files('tpm_backend.c'))
314
+ system_ss.add(files('tpm_util.c'))
315
+ system_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
316
+ system_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
317
endif
318
diff --git a/block/meson.build b/block/meson.build
319
index XXXXXXX..XXXXXXX 100644
320
--- a/block/meson.build
321
+++ b/block/meson.build
322
@@ -XXX,XX +XXX,XX @@ block_ss.add(files(
323
'write-threshold.c',
324
), zstd, zlib, gnutls)
325
326
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
327
-softmmu_ss.add(files('block-ram-registrar.c'))
328
+system_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
329
+system_ss.add(files('block-ram-registrar.c'))
330
331
if get_option('qcow1').allowed()
332
block_ss.add(files('qcow.c'))
333
@@ -XXX,XX +XXX,XX @@ block_ss.add(block_gen_c)
334
335
block_ss.add(files('stream.c'))
336
337
-softmmu_ss.add(files('qapi-sysemu.c'))
338
+system_ss.add(files('qapi-sysemu.c'))
339
340
subdir('export')
341
subdir('monitor')
342
diff --git a/block/monitor/meson.build b/block/monitor/meson.build
343
index XXXXXXX..XXXXXXX 100644
344
--- a/block/monitor/meson.build
345
+++ b/block/monitor/meson.build
346
@@ -XXX,XX +XXX,XX @@
347
-softmmu_ss.add(files('block-hmp-cmds.c'))
348
+system_ss.add(files('block-hmp-cmds.c'))
349
block_ss.add(files('bitmap-qmp-cmds.c'))
350
diff --git a/chardev/meson.build b/chardev/meson.build
351
index XXXXXXX..XXXXXXX 100644
352
--- a/chardev/meson.build
353
+++ b/chardev/meson.build
354
@@ -XXX,XX +XXX,XX @@ chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(
355
356
chardev_ss = chardev_ss.apply(config_host, strict: false)
357
358
-softmmu_ss.add(files(
359
+system_ss.add(files(
360
'char-hmp-cmds.c',
361
'msmouse.c',
362
'wctablet.c',
363
diff --git a/disas/meson.build b/disas/meson.build
364
index XXXXXXX..XXXXXXX 100644
365
--- a/disas/meson.build
366
+++ b/disas/meson.build
367
@@ -XXX,XX +XXX,XX @@ common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
368
common_ss.add(when: capstone, if_true: [files('capstone.c'), capstone])
369
common_ss.add(files('disas.c'))
370
371
-softmmu_ss.add(files('disas-mon.c'))
372
+system_ss.add(files('disas-mon.c'))
373
specific_ss.add(capstone)
374
diff --git a/dump/meson.build b/dump/meson.build
375
index XXXXXXX..XXXXXXX 100644
376
--- a/dump/meson.build
377
+++ b/dump/meson.build
378
@@ -XXX,XX +XXX,XX @@
379
-softmmu_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo])
380
+system_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo])
381
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('win_dump.c'))
382
diff --git a/ebpf/meson.build b/ebpf/meson.build
383
index XXXXXXX..XXXXXXX 100644
384
--- a/ebpf/meson.build
385
+++ b/ebpf/meson.build
386
@@ -1 +1 @@
387
-softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
388
+system_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
389
diff --git a/fsdev/meson.build b/fsdev/meson.build
390
index XXXXXXX..XXXXXXX 100644
391
--- a/fsdev/meson.build
392
+++ b/fsdev/meson.build
393
@@ -XXX,XX +XXX,XX @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
394
'9p-marshal.c',
395
'qemu-fsdev.c',
396
), if_false: files('qemu-fsdev-dummy.c'))
397
-softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
398
-softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
399
+system_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
400
+system_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
401
402
if have_virtfs_proxy_helper
403
executable('virtfs-proxy-helper',
404
diff --git a/gdbstub/meson.build b/gdbstub/meson.build
405
index XXXXXXX..XXXXXXX 100644
406
--- a/gdbstub/meson.build
407
+++ b/gdbstub/meson.build
408
@@ -XXX,XX +XXX,XX @@
409
# cflags so:
410
411
gdb_user_ss = ss.source_set()
412
-gdb_softmmu_ss = ss.source_set()
413
+gdb_system_ss = ss.source_set()
414
415
# We build two versions of gdbstub, one for each mode
416
gdb_user_ss.add(files('gdbstub.c', 'user.c'))
417
-gdb_softmmu_ss.add(files('gdbstub.c', 'softmmu.c'))
418
+gdb_system_ss.add(files('gdbstub.c', 'softmmu.c'))
419
420
gdb_user_ss = gdb_user_ss.apply(config_host, strict: false)
421
-gdb_softmmu_ss = gdb_softmmu_ss.apply(config_host, strict: false)
422
+gdb_system_ss = gdb_system_ss.apply(config_host, strict: false)
423
424
libgdb_user = static_library('gdb_user',
425
gdb_user_ss.sources() + genh,
426
@@ -XXX,XX +XXX,XX @@ libgdb_user = static_library('gdb_user',
427
build_by_default: have_user)
428
429
libgdb_softmmu = static_library('gdb_softmmu',
430
- gdb_softmmu_ss.sources() + genh,
431
+ gdb_system_ss.sources() + genh,
432
name_suffix: 'fa',
433
build_by_default: have_system)
434
435
gdb_user = declare_dependency(link_whole: libgdb_user)
436
user_ss.add(gdb_user)
437
gdb_softmmu = declare_dependency(link_whole: libgdb_softmmu)
438
-softmmu_ss.add(gdb_softmmu)
439
+system_ss.add(gdb_softmmu)
440
441
common_ss.add(files('syscalls.c'))
442
443
diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
444
index XXXXXXX..XXXXXXX 100644
445
--- a/hw/9pfs/meson.build
446
+++ b/hw/9pfs/meson.build
447
@@ -XXX,XX +XXX,XX @@ fs_ss.add(files(
448
fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
449
fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c'))
450
fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c'))
451
-softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
452
+system_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
453
454
specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c'))
455
diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
456
index XXXXXXX..XXXXXXX 100644
457
--- a/hw/acpi/meson.build
458
+++ b/hw/acpi/meson.build
459
@@ -XXX,XX +XXX,XX @@ acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
460
if have_tpm
461
acpi_ss.add(files('tpm.c'))
462
endif
463
-softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
464
-softmmu_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
465
-softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
466
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
467
+system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
468
+system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
469
+system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
470
+system_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
471
'acpi-x86-stub.c', 'ipmi-stub.c', 'ghes-stub.c',
472
'acpi-mem-hotplug-stub.c', 'acpi-cpu-hotplug-stub.c',
473
'acpi-pci-hotplug-stub.c', 'acpi-nvdimm-stub.c',
474
'cxl-stub.c', 'pci-bridge-stub.c'))
475
-softmmu_ss.add(files('acpi-qmp-cmds.c'))
476
+system_ss.add(files('acpi-qmp-cmds.c'))
477
diff --git a/hw/adc/meson.build b/hw/adc/meson.build
478
index XXXXXXX..XXXXXXX 100644
479
--- a/hw/adc/meson.build
480
+++ b/hw/adc/meson.build
481
@@ -XXX,XX +XXX,XX @@
482
-softmmu_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
483
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_adc.c'))
484
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_adc.c'))
485
-softmmu_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq-xadc.c'))
486
-softmmu_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c'))
487
+system_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
488
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_adc.c'))
489
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_adc.c'))
490
+system_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq-xadc.c'))
491
+system_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c'))
492
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
493
index XXXXXXX..XXXXXXX 100644
494
--- a/hw/arm/meson.build
495
+++ b/hw/arm/meson.build
496
@@ -XXX,XX +XXX,XX @@ arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c'))
497
arm_ss.add(when: 'CONFIG_XEN', if_true: files('xen_arm.c'))
498
arm_ss.add_all(xen_ss)
499
500
-softmmu_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c'))
501
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
502
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'))
503
-softmmu_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))
504
+system_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c'))
505
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
506
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'))
507
+system_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))
508
509
hw_arch += {'arm': arm_ss}
510
diff --git a/hw/audio/meson.build b/hw/audio/meson.build
511
index XXXXXXX..XXXXXXX 100644
512
--- a/hw/audio/meson.build
513
+++ b/hw/audio/meson.build
514
@@ -XXX,XX +XXX,XX @@
515
-softmmu_ss.add(files('soundhw.c'))
516
-softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
517
-softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
518
-softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
519
-softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
520
-softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
521
-softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
522
-softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
523
-softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
524
-softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
525
-softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
526
-softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
527
-softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c'))
528
-softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
529
+system_ss.add(files('soundhw.c'))
530
+system_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
531
+system_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
532
+system_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
533
+system_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
534
+system_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
535
+system_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
536
+system_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
537
+system_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
538
+system_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
539
+system_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
540
+system_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
541
+system_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c'))
542
+system_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
543
diff --git a/hw/block/meson.build b/hw/block/meson.build
544
index XXXXXXX..XXXXXXX 100644
545
--- a/hw/block/meson.build
546
+++ b/hw/block/meson.build
547
@@ -XXX,XX +XXX,XX @@
548
-softmmu_ss.add(files(
549
+system_ss.add(files(
550
'block.c',
551
'cdrom.c',
552
'hd-geometry.c'
553
))
554
-softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
555
-softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
556
-softmmu_ss.add(when: 'CONFIG_FDC_ISA', if_true: files('fdc-isa.c'))
557
-softmmu_ss.add(when: 'CONFIG_FDC_SYSBUS', if_true: files('fdc-sysbus.c'))
558
-softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
559
-softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
560
-softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
561
-softmmu_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
562
-softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
563
-softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80_sfdp.c'))
564
-softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
565
-softmmu_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c'))
566
-softmmu_ss.add(when: 'CONFIG_TC58128', if_true: files('tc58128.c'))
567
+system_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
568
+system_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
569
+system_ss.add(when: 'CONFIG_FDC_ISA', if_true: files('fdc-isa.c'))
570
+system_ss.add(when: 'CONFIG_FDC_SYSBUS', if_true: files('fdc-sysbus.c'))
571
+system_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
572
+system_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
573
+system_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
574
+system_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
575
+system_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
576
+system_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80_sfdp.c'))
577
+system_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
578
+system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c'))
579
+system_ss.add(when: 'CONFIG_TC58128', if_true: files('tc58128.c'))
580
581
specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c', 'virtio-blk-common.c'))
582
specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c', 'virtio-blk-common.c'))
583
diff --git a/hw/char/meson.build b/hw/char/meson.build
584
index XXXXXXX..XXXXXXX 100644
585
--- a/hw/char/meson.build
586
+++ b/hw/char/meson.build
587
@@ -XXX,XX +XXX,XX @@
588
-softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_uart.c'))
589
-softmmu_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c'))
590
-softmmu_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c'))
591
-softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_ser.c'))
592
-softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c'))
593
-softmmu_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c'))
594
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c'))
595
-softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
596
-softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
597
-softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
598
-softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
599
-softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
600
-softmmu_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c'))
601
-softmmu_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c'))
602
-softmmu_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c'))
603
-softmmu_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c'))
604
-softmmu_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c'))
605
-softmmu_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c'))
606
-softmmu_ss.add(when: 'CONFIG_SHAKTI_UART', if_true: files('shakti_uart.c'))
607
-softmmu_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-console.c'))
608
-softmmu_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen_console.c'))
609
-softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_uartlite.c'))
610
+system_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_uart.c'))
611
+system_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c'))
612
+system_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c'))
613
+system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_ser.c'))
614
+system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c'))
615
+system_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c'))
616
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c'))
617
+system_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
618
+system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
619
+system_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
620
+system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
621
+system_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
622
+system_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c'))
623
+system_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c'))
624
+system_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c'))
625
+system_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c'))
626
+system_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c'))
627
+system_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c'))
628
+system_ss.add(when: 'CONFIG_SHAKTI_UART', if_true: files('shakti_uart.c'))
629
+system_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-console.c'))
630
+system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen_console.c'))
631
+system_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_uartlite.c'))
632
633
-softmmu_ss.add(when: 'CONFIG_AVR_USART', if_true: files('avr_usart.c'))
634
-softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_uart.c'))
635
-softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-uart.c'))
636
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
637
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
638
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
639
-softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
640
-softmmu_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c'))
641
-softmmu_ss.add(when: 'CONFIG_SH_SCI', if_true: files('sh_serial.c'))
642
-softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
643
-softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
644
-softmmu_ss.add(when: 'CONFIG_HTIF', if_true: files('riscv_htif.c'))
645
-softmmu_ss.add(when: 'CONFIG_GOLDFISH_TTY', if_true: files('goldfish_tty.c'))
646
+system_ss.add(when: 'CONFIG_AVR_USART', if_true: files('avr_usart.c'))
647
+system_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_uart.c'))
648
+system_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-uart.c'))
649
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
650
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
651
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
652
+system_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
653
+system_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c'))
654
+system_ss.add(when: 'CONFIG_SH_SCI', if_true: files('sh_serial.c'))
655
+system_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
656
+system_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
657
+system_ss.add(when: 'CONFIG_HTIF', if_true: files('riscv_htif.c'))
658
+system_ss.add(when: 'CONFIG_GOLDFISH_TTY', if_true: files('goldfish_tty.c'))
659
660
specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c'))
661
specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c'))
92
diff --git a/hw/core/meson.build b/hw/core/meson.build
662
diff --git a/hw/core/meson.build b/hw/core/meson.build
93
index XXXXXXX..XXXXXXX 100644
663
index XXXXXXX..XXXXXXX 100644
94
--- a/hw/core/meson.build
664
--- a/hw/core/meson.build
95
+++ b/hw/core/meson.build
665
+++ b/hw/core/meson.build
96
@@ -XXX,XX +XXX,XX @@ hwcore_files = files(
666
@@ -XXX,XX +XXX,XX @@ endif
97
'qdev-clock.c',
667
668
common_ss.add(files('cpu-common.c'))
669
common_ss.add(files('machine-smp.c'))
670
-softmmu_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
671
-softmmu_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c'))
672
-softmmu_ss.add(when: ['CONFIG_GUEST_LOADER', fdt], if_true: files('guest-loader.c'))
673
-softmmu_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c'))
674
-softmmu_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c'))
675
-softmmu_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c'))
676
-softmmu_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c'))
677
-softmmu_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c'))
678
-softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c'))
679
-softmmu_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c'))
680
+system_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
681
+system_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c'))
682
+system_ss.add(when: ['CONFIG_GUEST_LOADER', fdt], if_true: files('guest-loader.c'))
683
+system_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c'))
684
+system_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c'))
685
+system_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c'))
686
+system_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c'))
687
+system_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c'))
688
+system_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c'))
689
+system_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c'))
690
691
-softmmu_ss.add(files(
692
+system_ss.add(files(
693
'cpu-sysemu.c',
694
'fw-path-provider.c',
695
'gpio.c',
696
diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build
697
index XXXXXXX..XXXXXXX 100644
698
--- a/hw/cpu/meson.build
699
+++ b/hw/cpu/meson.build
700
@@ -XXX,XX +XXX,XX @@
701
-softmmu_ss.add(files('core.c', 'cluster.c'))
702
+system_ss.add(files('core.c', 'cluster.c'))
703
704
-softmmu_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
705
-softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
706
+system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
707
+system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
708
specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
709
specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
710
diff --git a/hw/cxl/meson.build b/hw/cxl/meson.build
711
index XXXXXXX..XXXXXXX 100644
712
--- a/hw/cxl/meson.build
713
+++ b/hw/cxl/meson.build
714
@@ -XXX,XX +XXX,XX @@
715
-softmmu_ss.add(when: 'CONFIG_CXL',
716
+system_ss.add(when: 'CONFIG_CXL',
717
if_true: files(
718
'cxl-component-utils.c',
719
'cxl-device-utils.c',
720
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: 'CONFIG_CXL',
721
'cxl-host-stubs.c',
722
))
723
724
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('cxl-host-stubs.c'))
725
+system_ss.add(when: 'CONFIG_ALL', if_true: files('cxl-host-stubs.c'))
726
diff --git a/hw/display/meson.build b/hw/display/meson.build
727
index XXXXXXX..XXXXXXX 100644
728
--- a/hw/display/meson.build
729
+++ b/hw/display/meson.build
730
@@ -XXX,XX +XXX,XX @@
731
hw_display_modules = {}
732
733
-softmmu_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
734
-softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c'))
735
+system_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
736
+system_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c'))
737
738
-softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
739
-softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
740
+system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
741
+system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
742
743
-softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
744
-softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
745
-softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
746
-softmmu_ss.add(when: 'CONFIG_JAZZ_LED', if_true: files('jazz_led.c'))
747
-softmmu_ss.add(when: 'CONFIG_PL110', if_true: files('pl110.c'))
748
-softmmu_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c'))
749
-softmmu_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c'))
750
-softmmu_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c'))
751
-softmmu_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
752
+system_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
753
+system_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
754
+system_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
755
+system_ss.add(when: 'CONFIG_JAZZ_LED', if_true: files('jazz_led.c'))
756
+system_ss.add(when: 'CONFIG_PL110', if_true: files('pl110.c'))
757
+system_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c'))
758
+system_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c'))
759
+system_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c'))
760
+system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
761
762
-softmmu_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c'))
763
-softmmu_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c'))
764
-softmmu_ss.add(when: 'CONFIG_VGA_MMIO', if_true: files('vga-mmio.c'))
765
-softmmu_ss.add(when: 'CONFIG_VMWARE_VGA', if_true: files('vmware_vga.c'))
766
-softmmu_ss.add(when: 'CONFIG_BOCHS_DISPLAY', if_true: files('bochs-display.c'))
767
+system_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c'))
768
+system_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c'))
769
+system_ss.add(when: 'CONFIG_VGA_MMIO', if_true: files('vga-mmio.c'))
770
+system_ss.add(when: 'CONFIG_VMWARE_VGA', if_true: files('vmware_vga.c'))
771
+system_ss.add(when: 'CONFIG_BOCHS_DISPLAY', if_true: files('bochs-display.c'))
772
773
-softmmu_ss.add(when: 'CONFIG_BLIZZARD', if_true: files('blizzard.c'))
774
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_fimd.c'))
775
-softmmu_ss.add(when: 'CONFIG_FRAMEBUFFER', if_true: files('framebuffer.c'))
776
-softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('tc6393xb.c'))
777
+system_ss.add(when: 'CONFIG_BLIZZARD', if_true: files('blizzard.c'))
778
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_fimd.c'))
779
+system_ss.add(when: 'CONFIG_FRAMEBUFFER', if_true: files('framebuffer.c'))
780
+system_ss.add(when: 'CONFIG_ZAURUS', if_true: files('tc6393xb.c'))
781
782
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dss.c'))
783
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_lcd.c'))
784
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_fb.c'))
785
-softmmu_ss.add(when: 'CONFIG_SM501', if_true: files('sm501.c'))
786
-softmmu_ss.add(when: 'CONFIG_TCX', if_true: files('tcx.c'))
787
-softmmu_ss.add(when: 'CONFIG_CG3', if_true: files('cg3.c'))
788
-softmmu_ss.add(when: 'CONFIG_MACFB', if_true: files('macfb.c'))
789
-softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
790
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dss.c'))
791
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_lcd.c'))
792
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_fb.c'))
793
+system_ss.add(when: 'CONFIG_SM501', if_true: files('sm501.c'))
794
+system_ss.add(when: 'CONFIG_TCX', if_true: files('tcx.c'))
795
+system_ss.add(when: 'CONFIG_CG3', if_true: files('cg3.c'))
796
+system_ss.add(when: 'CONFIG_MACFB', if_true: files('macfb.c'))
797
+system_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
798
799
-softmmu_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
800
+system_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
801
802
if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
803
config_all_devices.has_key('CONFIG_VGA_PCI') or
804
config_all_devices.has_key('CONFIG_VMWARE_VGA') or
805
config_all_devices.has_key('CONFIG_ATI_VGA')
806
)
807
- softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
808
+ system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
809
if_false: files('acpi-vga-stub.c'))
810
endif
811
812
@@ -XXX,XX +XXX,XX @@ if config_all_devices.has_key('CONFIG_QXL')
813
hw_display_modules += {'qxl': qxl_ss}
814
endif
815
816
-softmmu_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c'))
817
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dp.c'))
818
+system_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c'))
819
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dp.c'))
820
821
-softmmu_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
822
+system_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
823
824
-softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c'))
825
+system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c'))
826
827
828
if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
829
@@ -XXX,XX +XXX,XX @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
830
hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
831
endif
832
833
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
834
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
835
836
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-vga-stub.c'))
837
+system_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-vga-stub.c'))
838
modules += { 'hw-display': hw_display_modules }
839
diff --git a/hw/dma/meson.build b/hw/dma/meson.build
840
index XXXXXXX..XXXXXXX 100644
841
--- a/hw/dma/meson.build
842
+++ b/hw/dma/meson.build
843
@@ -XXX,XX +XXX,XX @@
844
-softmmu_ss.add(when: 'CONFIG_RC4030', if_true: files('rc4030.c'))
845
-softmmu_ss.add(when: 'CONFIG_PL080', if_true: files('pl080.c'))
846
-softmmu_ss.add(when: 'CONFIG_PL330', if_true: files('pl330.c'))
847
-softmmu_ss.add(when: 'CONFIG_I82374', if_true: files('i82374.c'))
848
-softmmu_ss.add(when: 'CONFIG_I8257', if_true: files('i8257.c'))
849
-softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axidma.c'))
850
-softmmu_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('xlnx-zynq-devcfg.c'))
851
-softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c'))
852
-softmmu_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c'))
853
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.c'))
854
-softmmu_ss.add(when: 'CONFIG_XLNX_ZDMA', if_true: files('xlnx-zdma.c'))
855
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
856
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c'))
857
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c'))
858
-softmmu_ss.add(when: 'CONFIG_SIFIVE_PDMA', if_true: files('sifive_pdma.c'))
859
-softmmu_ss.add(when: 'CONFIG_XLNX_CSU_DMA', if_true: files('xlnx_csu_dma.c'))
860
+system_ss.add(when: 'CONFIG_RC4030', if_true: files('rc4030.c'))
861
+system_ss.add(when: 'CONFIG_PL080', if_true: files('pl080.c'))
862
+system_ss.add(when: 'CONFIG_PL330', if_true: files('pl330.c'))
863
+system_ss.add(when: 'CONFIG_I82374', if_true: files('i82374.c'))
864
+system_ss.add(when: 'CONFIG_I8257', if_true: files('i8257.c'))
865
+system_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axidma.c'))
866
+system_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('xlnx-zynq-devcfg.c'))
867
+system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c'))
868
+system_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c'))
869
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.c'))
870
+system_ss.add(when: 'CONFIG_XLNX_ZDMA', if_true: files('xlnx-zdma.c'))
871
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
872
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c'))
873
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c'))
874
+system_ss.add(when: 'CONFIG_SIFIVE_PDMA', if_true: files('sifive_pdma.c'))
875
+system_ss.add(when: 'CONFIG_XLNX_CSU_DMA', if_true: files('xlnx_csu_dma.c'))
876
diff --git a/hw/gpio/meson.build b/hw/gpio/meson.build
877
index XXXXXXX..XXXXXXX 100644
878
--- a/hw/gpio/meson.build
879
+++ b/hw/gpio/meson.build
880
@@ -XXX,XX +XXX,XX @@
881
-softmmu_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
882
-softmmu_ss.add(when: 'CONFIG_GPIO_MPC8XXX', if_true: files('mpc8xxx.c'))
883
-softmmu_ss.add(when: 'CONFIG_GPIO_PWR', if_true: files('gpio_pwr.c'))
884
-softmmu_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
885
-softmmu_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
886
-softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
887
+system_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
888
+system_ss.add(when: 'CONFIG_GPIO_MPC8XXX', if_true: files('mpc8xxx.c'))
889
+system_ss.add(when: 'CONFIG_GPIO_PWR', if_true: files('gpio_pwr.c'))
890
+system_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
891
+system_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
892
+system_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
893
894
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
895
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_gpio.c'))
896
-softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
897
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
898
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
899
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c'))
900
-softmmu_ss.add(when: 'CONFIG_SIFIVE_GPIO', if_true: files('sifive_gpio.c'))
901
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
902
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_gpio.c'))
903
+system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
904
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
905
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
906
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c'))
907
+system_ss.add(when: 'CONFIG_SIFIVE_GPIO', if_true: files('sifive_gpio.c'))
908
diff --git a/hw/i2c/meson.build b/hw/i2c/meson.build
909
index XXXXXXX..XXXXXXX 100644
910
--- a/hw/i2c/meson.build
911
+++ b/hw/i2c/meson.build
912
@@ -XXX,XX +XXX,XX @@ i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c'))
913
i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c'))
914
i2c_ss.add(when: 'CONFIG_PCA954X', if_true: files('i2c_mux_pca954x.c'))
915
i2c_ss.add(when: 'CONFIG_PMBUS', if_true: files('pmbus_device.c'))
916
-softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
917
+system_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
918
diff --git a/hw/ide/meson.build b/hw/ide/meson.build
919
index XXXXXXX..XXXXXXX 100644
920
--- a/hw/ide/meson.build
921
+++ b/hw/ide/meson.build
922
@@ -XXX,XX +XXX,XX @@
923
-softmmu_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
924
-softmmu_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
925
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
926
-softmmu_ss.add(when: 'CONFIG_IDE_CMD646', if_true: files('cmd646.c'))
927
-softmmu_ss.add(when: 'CONFIG_IDE_CORE', if_true: files('core.c', 'atapi.c'))
928
-softmmu_ss.add(when: 'CONFIG_IDE_ISA', if_true: files('isa.c', 'ioport.c'))
929
-softmmu_ss.add(when: 'CONFIG_IDE_MACIO', if_true: files('macio.c'))
930
-softmmu_ss.add(when: 'CONFIG_IDE_MMIO', if_true: files('mmio.c'))
931
-softmmu_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c'))
932
-softmmu_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c'))
933
-softmmu_ss.add(when: 'CONFIG_IDE_QDEV', if_true: files('qdev.c'))
934
-softmmu_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c'))
935
-softmmu_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c'))
936
-softmmu_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c'))
937
+system_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
938
+system_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
939
+system_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
940
+system_ss.add(when: 'CONFIG_IDE_CMD646', if_true: files('cmd646.c'))
941
+system_ss.add(when: 'CONFIG_IDE_CORE', if_true: files('core.c', 'atapi.c'))
942
+system_ss.add(when: 'CONFIG_IDE_ISA', if_true: files('isa.c', 'ioport.c'))
943
+system_ss.add(when: 'CONFIG_IDE_MACIO', if_true: files('macio.c'))
944
+system_ss.add(when: 'CONFIG_IDE_MMIO', if_true: files('mmio.c'))
945
+system_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c'))
946
+system_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c'))
947
+system_ss.add(when: 'CONFIG_IDE_QDEV', if_true: files('qdev.c'))
948
+system_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c'))
949
+system_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c'))
950
+system_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c'))
951
diff --git a/hw/input/meson.build b/hw/input/meson.build
952
index XXXXXXX..XXXXXXX 100644
953
--- a/hw/input/meson.build
954
+++ b/hw/input/meson.build
955
@@ -XXX,XX +XXX,XX @@
956
-softmmu_ss.add(files('hid.c'))
957
-softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
958
-softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
959
-softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
960
-softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
961
-softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
962
-softmmu_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c'))
963
-softmmu_ss.add(when: 'CONFIG_STELLARIS_INPUT', if_true: files('stellaris_input.c'))
964
-softmmu_ss.add(when: 'CONFIG_TSC2005', if_true: files('tsc2005.c'))
965
+system_ss.add(files('hid.c'))
966
+system_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
967
+system_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
968
+system_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
969
+system_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
970
+system_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
971
+system_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c'))
972
+system_ss.add(when: 'CONFIG_STELLARIS_INPUT', if_true: files('stellaris_input.c'))
973
+system_ss.add(when: 'CONFIG_TSC2005', if_true: files('tsc2005.c'))
974
975
-softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input.c'))
976
-softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-hid.c'))
977
-softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host.c'))
978
-softmmu_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c'))
979
+system_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input.c'))
980
+system_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-hid.c'))
981
+system_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host.c'))
982
+system_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c'))
983
984
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c'))
985
-softmmu_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c'))
986
-softmmu_ss.add(when: 'CONFIG_LASIPS2', if_true: files('lasips2.c'))
987
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c'))
988
+system_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c'))
989
+system_ss.add(when: 'CONFIG_LASIPS2', if_true: files('lasips2.c'))
990
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
991
index XXXXXXX..XXXXXXX 100644
992
--- a/hw/intc/meson.build
993
+++ b/hw/intc/meson.build
994
@@ -XXX,XX +XXX,XX @@
995
-softmmu_ss.add(files('intc.c'))
996
-softmmu_ss.add(when: 'CONFIG_ARM_GIC', if_true: files(
997
+system_ss.add(files('intc.c'))
998
+system_ss.add(when: 'CONFIG_ARM_GIC', if_true: files(
999
'arm_gic.c',
1000
'arm_gic_common.c',
1001
'arm_gicv2m.c',
1002
'arm_gicv3_common.c',
1003
'arm_gicv3_its_common.c',
1004
))
1005
-softmmu_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files(
1006
+system_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files(
1007
'arm_gicv3.c',
1008
'arm_gicv3_dist.c',
1009
'arm_gicv3_its.c',
1010
'arm_gicv3_redist.c',
1011
))
1012
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c'))
1013
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c'))
1014
-softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c'))
1015
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))
1016
-softmmu_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'))
1017
-softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
1018
-softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
1019
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
1020
-softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'))
1021
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c'))
1022
-softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
1023
-softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c'))
1024
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c', 'bcm2836_control.c'))
1025
-softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_gic.c'))
1026
-softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_intctl.c'))
1027
-softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_intc.c'))
1028
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-ipi.c'))
1029
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-pmu-iomod-intc.c'))
1030
+system_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c'))
1031
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c'))
1032
+system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c'))
1033
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))
1034
+system_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'))
1035
+system_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
1036
+system_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
1037
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
1038
+system_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'))
1039
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c'))
1040
+system_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
1041
+system_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c'))
1042
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c', 'bcm2836_control.c'))
1043
+system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_gic.c'))
1044
+system_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_intctl.c'))
1045
+system_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_intc.c'))
1046
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-ipi.c'))
1047
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-pmu-iomod-intc.c'))
1048
1049
if config_all_devices.has_key('CONFIG_APIC') or \
1050
config_all_devices.has_key('CONFIG_I8259') or \
1051
config_all_devices.has_key('CONFIG_MC146818RTC')
1052
- softmmu_ss.add(files('kvm_irqcount.c'))
1053
+ system_ss.add(files('kvm_irqcount.c'))
1054
endif
1055
1056
specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c'))
1057
diff --git a/hw/ipack/meson.build b/hw/ipack/meson.build
1058
index XXXXXXX..XXXXXXX 100644
1059
--- a/hw/ipack/meson.build
1060
+++ b/hw/ipack/meson.build
1061
@@ -1 +1 @@
1062
-softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipack.c', 'tpci200.c'))
1063
+system_ss.add(when: 'CONFIG_IPACK', if_true: files('ipack.c', 'tpci200.c'))
1064
diff --git a/hw/ipmi/meson.build b/hw/ipmi/meson.build
1065
index XXXXXXX..XXXXXXX 100644
1066
--- a/hw/ipmi/meson.build
1067
+++ b/hw/ipmi/meson.build
1068
@@ -XXX,XX +XXX,XX @@ ipmi_ss.add(when: 'CONFIG_ISA_IPMI_BT', if_true: files('isa_ipmi_bt.c'))
1069
ipmi_ss.add(when: 'CONFIG_PCI_IPMI_BT', if_true: files('pci_ipmi_bt.c'))
1070
ipmi_ss.add(when: 'CONFIG_IPMI_SSIF', if_true: files('smbus_ipmi.c'))
1071
1072
-softmmu_ss.add_all(when: 'CONFIG_IPMI', if_true: ipmi_ss)
1073
+system_ss.add_all(when: 'CONFIG_IPMI', if_true: ipmi_ss)
1074
diff --git a/hw/isa/meson.build b/hw/isa/meson.build
1075
index XXXXXXX..XXXXXXX 100644
1076
--- a/hw/isa/meson.build
1077
+++ b/hw/isa/meson.build
1078
@@ -XXX,XX +XXX,XX @@
1079
-softmmu_ss.add(when: 'CONFIG_APM', if_true: files('apm.c'))
1080
-softmmu_ss.add(when: 'CONFIG_I82378', if_true: files('i82378.c'))
1081
-softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c'))
1082
-softmmu_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c'))
1083
-softmmu_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c'))
1084
-softmmu_ss.add(when: 'CONFIG_PIIX3', if_true: files('piix3.c'))
1085
-softmmu_ss.add(when: 'CONFIG_PIIX4', if_true: files('piix4.c'))
1086
-softmmu_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c'))
1087
-softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c'))
1088
+system_ss.add(when: 'CONFIG_APM', if_true: files('apm.c'))
1089
+system_ss.add(when: 'CONFIG_I82378', if_true: files('i82378.c'))
1090
+system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c'))
1091
+system_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c'))
1092
+system_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c'))
1093
+system_ss.add(when: 'CONFIG_PIIX3', if_true: files('piix3.c'))
1094
+system_ss.add(when: 'CONFIG_PIIX4', if_true: files('piix4.c'))
1095
+system_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c'))
1096
+system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c'))
1097
1098
specific_ss.add(when: 'CONFIG_LPC_ICH9', if_true: files('lpc_ich9.c'))
1099
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
1100
index XXXXXXX..XXXXXXX 100644
1101
--- a/hw/mem/meson.build
1102
+++ b/hw/mem/meson.build
1103
@@ -XXX,XX +XXX,XX @@ mem_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
1104
mem_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_mc.c'))
1105
mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
1106
mem_ss.add(when: 'CONFIG_CXL_MEM_DEVICE', if_true: files('cxl_type3.c'))
1107
-softmmu_ss.add(when: 'CONFIG_CXL_MEM_DEVICE', if_false: files('cxl_type3_stubs.c'))
1108
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('cxl_type3_stubs.c'))
1109
+system_ss.add(when: 'CONFIG_CXL_MEM_DEVICE', if_false: files('cxl_type3_stubs.c'))
1110
+system_ss.add(when: 'CONFIG_ALL', if_true: files('cxl_type3_stubs.c'))
1111
1112
-softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
1113
+system_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
1114
1115
-softmmu_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c'))
1116
+system_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c'))
1117
diff --git a/hw/misc/macio/meson.build b/hw/misc/macio/meson.build
1118
index XXXXXXX..XXXXXXX 100644
1119
--- a/hw/misc/macio/meson.build
1120
+++ b/hw/misc/macio/meson.build
1121
@@ -XXX,XX +XXX,XX @@ macio_ss.add(when: 'CONFIG_MACIO_GPIO', if_true: files('gpio.c'))
1122
macio_ss.add(when: 'CONFIG_MAC_DBDMA', if_true: files('mac_dbdma.c'))
1123
macio_ss.add(when: 'CONFIG_MAC_PMU', if_true: files('pmu.c'))
1124
1125
-softmmu_ss.add_all(when: 'CONFIG_MACIO', if_true: macio_ss)
1126
+system_ss.add_all(when: 'CONFIG_MACIO', if_true: macio_ss)
1127
diff --git a/hw/misc/meson.build b/hw/misc/meson.build
1128
index XXXXXXX..XXXXXXX 100644
1129
--- a/hw/misc/meson.build
1130
+++ b/hw/misc/meson.build
1131
@@ -XXX,XX +XXX,XX @@
1132
-softmmu_ss.add(when: 'CONFIG_APPLESMC', if_true: files('applesmc.c'))
1133
-softmmu_ss.add(when: 'CONFIG_EDU', if_true: files('edu.c'))
1134
-softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('vmcoreinfo.c'))
1135
-softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugexit.c'))
1136
-softmmu_ss.add(when: 'CONFIG_ISA_TESTDEV', if_true: files('pc-testdev.c'))
1137
-softmmu_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c'))
1138
-softmmu_ss.add(when: 'CONFIG_PCI_TESTDEV', if_true: files('pci-testdev.c'))
1139
-softmmu_ss.add(when: 'CONFIG_UNIMP', if_true: files('unimp.c'))
1140
-softmmu_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c'))
1141
-softmmu_ss.add(when: 'CONFIG_LED', if_true: files('led.c'))
1142
-softmmu_ss.add(when: 'CONFIG_PVPANIC_COMMON', if_true: files('pvpanic.c'))
1143
+system_ss.add(when: 'CONFIG_APPLESMC', if_true: files('applesmc.c'))
1144
+system_ss.add(when: 'CONFIG_EDU', if_true: files('edu.c'))
1145
+system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('vmcoreinfo.c'))
1146
+system_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugexit.c'))
1147
+system_ss.add(when: 'CONFIG_ISA_TESTDEV', if_true: files('pc-testdev.c'))
1148
+system_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c'))
1149
+system_ss.add(when: 'CONFIG_PCI_TESTDEV', if_true: files('pci-testdev.c'))
1150
+system_ss.add(when: 'CONFIG_UNIMP', if_true: files('unimp.c'))
1151
+system_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c'))
1152
+system_ss.add(when: 'CONFIG_LED', if_true: files('led.c'))
1153
+system_ss.add(when: 'CONFIG_PVPANIC_COMMON', if_true: files('pvpanic.c'))
1154
1155
# ARM devices
1156
-softmmu_ss.add(when: 'CONFIG_PL310', if_true: files('arm_l2x0.c'))
1157
-softmmu_ss.add(when: 'CONFIG_INTEGRATOR_DEBUG', if_true: files('arm_integrator_debug.c'))
1158
-softmmu_ss.add(when: 'CONFIG_A9SCU', if_true: files('a9scu.c'))
1159
-softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c'))
1160
+system_ss.add(when: 'CONFIG_PL310', if_true: files('arm_l2x0.c'))
1161
+system_ss.add(when: 'CONFIG_INTEGRATOR_DEBUG', if_true: files('arm_integrator_debug.c'))
1162
+system_ss.add(when: 'CONFIG_A9SCU', if_true: files('a9scu.c'))
1163
+system_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c'))
1164
1165
-softmmu_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_ras.c'))
1166
+system_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_ras.c'))
1167
1168
# Mac devices
1169
-softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c'))
1170
+system_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c'))
1171
1172
# virt devices
1173
-softmmu_ss.add(when: 'CONFIG_VIRT_CTRL', if_true: files('virt_ctrl.c'))
1174
+system_ss.add(when: 'CONFIG_VIRT_CTRL', if_true: files('virt_ctrl.c'))
1175
1176
# RISC-V devices
1177
-softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_DMC', if_true: files('mchp_pfsoc_dmc.c'))
1178
-softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_IOSCB', if_true: files('mchp_pfsoc_ioscb.c'))
1179
-softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_SYSREG', if_true: files('mchp_pfsoc_sysreg.c'))
1180
-softmmu_ss.add(when: 'CONFIG_SIFIVE_TEST', if_true: files('sifive_test.c'))
1181
-softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c'))
1182
-softmmu_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c'))
1183
-softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c'))
1184
+system_ss.add(when: 'CONFIG_MCHP_PFSOC_DMC', if_true: files('mchp_pfsoc_dmc.c'))
1185
+system_ss.add(when: 'CONFIG_MCHP_PFSOC_IOSCB', if_true: files('mchp_pfsoc_ioscb.c'))
1186
+system_ss.add(when: 'CONFIG_MCHP_PFSOC_SYSREG', if_true: files('mchp_pfsoc_sysreg.c'))
1187
+system_ss.add(when: 'CONFIG_SIFIVE_TEST', if_true: files('sifive_test.c'))
1188
+system_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c'))
1189
+system_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c'))
1190
+system_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c'))
1191
1192
subdir('macio')
1193
1194
-softmmu_ss.add(when: 'CONFIG_IVSHMEM_DEVICE', if_true: files('ivshmem.c'))
1195
+system_ss.add(when: 'CONFIG_IVSHMEM_DEVICE', if_true: files('ivshmem.c'))
1196
1197
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_SRAMC', if_true: files('allwinner-sramc.c'))
1198
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_CCM', if_true: files('allwinner-a10-ccm.c'))
1199
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_DRAMC', if_true: files('allwinner-a10-dramc.c'))
1200
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-ccu.c'))
1201
+system_ss.add(when: 'CONFIG_ALLWINNER_SRAMC', if_true: files('allwinner-sramc.c'))
1202
+system_ss.add(when: 'CONFIG_ALLWINNER_A10_CCM', if_true: files('allwinner-a10-ccm.c'))
1203
+system_ss.add(when: 'CONFIG_ALLWINNER_A10_DRAMC', if_true: files('allwinner-a10-dramc.c'))
1204
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-ccu.c'))
1205
specific_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-cpucfg.c'))
1206
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-dramc.c'))
1207
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-sysctrl.c'))
1208
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sid.c'))
1209
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40-ccu.c'))
1210
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40-dramc.c'))
1211
-softmmu_ss.add(when: 'CONFIG_AXP2XX_PMU', if_true: files('axp2xx.c'))
1212
-softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c'))
1213
-softmmu_ss.add(when: 'CONFIG_NSERIES', if_true: files('cbus.c'))
1214
-softmmu_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c'))
1215
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c'))
1216
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files(
1217
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-dramc.c'))
1218
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-sysctrl.c'))
1219
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sid.c'))
1220
+system_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40-ccu.c'))
1221
+system_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40-dramc.c'))
1222
+system_ss.add(when: 'CONFIG_AXP2XX_PMU', if_true: files('axp2xx.c'))
1223
+system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c'))
1224
+system_ss.add(when: 'CONFIG_NSERIES', if_true: files('cbus.c'))
1225
+system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c'))
1226
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c'))
1227
+system_ss.add(when: 'CONFIG_IMX', if_true: files(
1228
'imx25_ccm.c',
1229
'imx31_ccm.c',
1230
'imx6_ccm.c',
1231
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: 'CONFIG_IMX', if_true: files(
1232
'imx_ccm.c',
1233
'imx_rngc.c',
1234
))
1235
-softmmu_ss.add(when: 'CONFIG_MAINSTONE', if_true: files('mst_fpga.c'))
1236
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files(
1237
+system_ss.add(when: 'CONFIG_MAINSTONE', if_true: files('mst_fpga.c'))
1238
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files(
1239
'npcm7xx_clk.c',
1240
'npcm7xx_gcr.c',
1241
'npcm7xx_mft.c',
1242
'npcm7xx_pwm.c',
1243
'npcm7xx_rng.c',
1244
))
1245
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files(
1246
+system_ss.add(when: 'CONFIG_OMAP', if_true: files(
1247
'omap_clk.c',
1248
'omap_gpmc.c',
1249
'omap_l4.c',
1250
'omap_sdrc.c',
1251
'omap_tap.c',
1252
))
1253
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files(
1254
+system_ss.add(when: 'CONFIG_RASPI', if_true: files(
1255
'bcm2835_mbox.c',
1256
'bcm2835_mphi.c',
1257
'bcm2835_property.c',
1258
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files(
1259
'bcm2835_cprman.c',
1260
'bcm2835_powermgt.c',
1261
))
1262
-softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_misc.c'))
1263
-softmmu_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq_slcr.c'))
1264
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp-crf.c'))
1265
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp-apu-ctrl.c'))
1266
+system_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_misc.c'))
1267
+system_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq_slcr.c'))
1268
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp-crf.c'))
1269
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp-apu-ctrl.c'))
1270
specific_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-crl.c'))
1271
-softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files(
1272
+system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files(
1273
'xlnx-versal-xramc.c',
1274
'xlnx-versal-pmc-iou-slcr.c',
1275
))
1276
-softmmu_ss.add(when: 'CONFIG_STM32F2XX_SYSCFG', if_true: files('stm32f2xx_syscfg.c'))
1277
-softmmu_ss.add(when: 'CONFIG_STM32F4XX_SYSCFG', if_true: files('stm32f4xx_syscfg.c'))
1278
-softmmu_ss.add(when: 'CONFIG_STM32F4XX_EXTI', if_true: files('stm32f4xx_exti.c'))
1279
-softmmu_ss.add(when: 'CONFIG_MPS2_FPGAIO', if_true: files('mps2-fpgaio.c'))
1280
-softmmu_ss.add(when: 'CONFIG_MPS2_SCC', if_true: files('mps2-scc.c'))
1281
+system_ss.add(when: 'CONFIG_STM32F2XX_SYSCFG', if_true: files('stm32f2xx_syscfg.c'))
1282
+system_ss.add(when: 'CONFIG_STM32F4XX_SYSCFG', if_true: files('stm32f4xx_syscfg.c'))
1283
+system_ss.add(when: 'CONFIG_STM32F4XX_EXTI', if_true: files('stm32f4xx_exti.c'))
1284
+system_ss.add(when: 'CONFIG_MPS2_FPGAIO', if_true: files('mps2-fpgaio.c'))
1285
+system_ss.add(when: 'CONFIG_MPS2_SCC', if_true: files('mps2-scc.c'))
1286
1287
-softmmu_ss.add(when: 'CONFIG_TZ_MPC', if_true: files('tz-mpc.c'))
1288
-softmmu_ss.add(when: 'CONFIG_TZ_MSC', if_true: files('tz-msc.c'))
1289
-softmmu_ss.add(when: 'CONFIG_TZ_PPC', if_true: files('tz-ppc.c'))
1290
-softmmu_ss.add(when: 'CONFIG_IOTKIT_SECCTL', if_true: files('iotkit-secctl.c'))
1291
-softmmu_ss.add(when: 'CONFIG_IOTKIT_SYSCTL', if_true: files('iotkit-sysctl.c'))
1292
-softmmu_ss.add(when: 'CONFIG_IOTKIT_SYSINFO', if_true: files('iotkit-sysinfo.c'))
1293
-softmmu_ss.add(when: 'CONFIG_ARMSSE_CPU_PWRCTRL', if_true: files('armsse-cpu-pwrctrl.c'))
1294
-softmmu_ss.add(when: 'CONFIG_ARMSSE_CPUID', if_true: files('armsse-cpuid.c'))
1295
-softmmu_ss.add(when: 'CONFIG_ARMSSE_MHU', if_true: files('armsse-mhu.c'))
1296
+system_ss.add(when: 'CONFIG_TZ_MPC', if_true: files('tz-mpc.c'))
1297
+system_ss.add(when: 'CONFIG_TZ_MSC', if_true: files('tz-msc.c'))
1298
+system_ss.add(when: 'CONFIG_TZ_PPC', if_true: files('tz-ppc.c'))
1299
+system_ss.add(when: 'CONFIG_IOTKIT_SECCTL', if_true: files('iotkit-secctl.c'))
1300
+system_ss.add(when: 'CONFIG_IOTKIT_SYSCTL', if_true: files('iotkit-sysctl.c'))
1301
+system_ss.add(when: 'CONFIG_IOTKIT_SYSINFO', if_true: files('iotkit-sysinfo.c'))
1302
+system_ss.add(when: 'CONFIG_ARMSSE_CPU_PWRCTRL', if_true: files('armsse-cpu-pwrctrl.c'))
1303
+system_ss.add(when: 'CONFIG_ARMSSE_CPUID', if_true: files('armsse-cpuid.c'))
1304
+system_ss.add(when: 'CONFIG_ARMSSE_MHU', if_true: files('armsse-mhu.c'))
1305
1306
-softmmu_ss.add(when: 'CONFIG_PVPANIC_ISA', if_true: files('pvpanic-isa.c'))
1307
-softmmu_ss.add(when: 'CONFIG_PVPANIC_PCI', if_true: files('pvpanic-pci.c'))
1308
-softmmu_ss.add(when: 'CONFIG_AUX', if_true: files('auxbus.c'))
1309
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
1310
+system_ss.add(when: 'CONFIG_PVPANIC_ISA', if_true: files('pvpanic-isa.c'))
1311
+system_ss.add(when: 'CONFIG_PVPANIC_PCI', if_true: files('pvpanic-pci.c'))
1312
+system_ss.add(when: 'CONFIG_AUX', if_true: files('auxbus.c'))
1313
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
1314
'aspeed_hace.c',
1315
'aspeed_i3c.c',
1316
'aspeed_lpc.c',
1317
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
1318
'aspeed_xdma.c',
1319
'aspeed_peci.c'))
1320
1321
-softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-sysreg.c'))
1322
-softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_rng.c'))
1323
+system_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-sysreg.c'))
1324
+system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_rng.c'))
1325
1326
-softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c'))
1327
+system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c'))
1328
1329
-softmmu_ss.add(when: 'CONFIG_I2C', if_true: files('i2c-echo.c'))
1330
+system_ss.add(when: 'CONFIG_I2C', if_true: files('i2c-echo.c'))
1331
1332
specific_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c'))
1333
1334
@@ -XXX,XX +XXX,XX @@ specific_ss.add(when: 'CONFIG_MAC_VIA', if_true: files('mac_via.c'))
1335
specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_cmgcr.c', 'mips_cpc.c'))
1336
specific_ss.add(when: 'CONFIG_MIPS_ITU', if_true: files('mips_itu.c'))
1337
1338
-softmmu_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa_ec.c'))
1339
+system_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa_ec.c'))
1340
1341
# HPPA devices
1342
-softmmu_ss.add(when: 'CONFIG_LASI', if_true: files('lasi.c'))
1343
+system_ss.add(when: 'CONFIG_LASI', if_true: files('lasi.c'))
1344
diff --git a/hw/net/can/meson.build b/hw/net/can/meson.build
1345
index XXXXXXX..XXXXXXX 100644
1346
--- a/hw/net/can/meson.build
1347
+++ b/hw/net/can/meson.build
1348
@@ -XXX,XX +XXX,XX @@
1349
-softmmu_ss.add(when: 'CONFIG_CAN_SJA1000', if_true: files('can_sja1000.c'))
1350
-softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_kvaser_pci.c'))
1351
-softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_pcm3680_pci.c'))
1352
-softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_mioe3680_pci.c'))
1353
-softmmu_ss.add(when: 'CONFIG_CAN_CTUCANFD', if_true: files('ctucan_core.c'))
1354
-softmmu_ss.add(when: 'CONFIG_CAN_CTUCANFD_PCI', if_true: files('ctucan_pci.c'))
1355
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-can.c'))
1356
-softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-canfd.c'))
1357
+system_ss.add(when: 'CONFIG_CAN_SJA1000', if_true: files('can_sja1000.c'))
1358
+system_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_kvaser_pci.c'))
1359
+system_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_pcm3680_pci.c'))
1360
+system_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_mioe3680_pci.c'))
1361
+system_ss.add(when: 'CONFIG_CAN_CTUCANFD', if_true: files('ctucan_core.c'))
1362
+system_ss.add(when: 'CONFIG_CAN_CTUCANFD_PCI', if_true: files('ctucan_pci.c'))
1363
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-can.c'))
1364
+system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-canfd.c'))
1365
diff --git a/hw/net/meson.build b/hw/net/meson.build
1366
index XXXXXXX..XXXXXXX 100644
1367
--- a/hw/net/meson.build
1368
+++ b/hw/net/meson.build
1369
@@ -XXX,XX +XXX,XX @@
1370
-softmmu_ss.add(when: 'CONFIG_DP8393X', if_true: files('dp8393x.c'))
1371
-softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen_nic.c'))
1372
-softmmu_ss.add(when: 'CONFIG_NE2000_COMMON', if_true: files('ne2000.c'))
1373
+system_ss.add(when: 'CONFIG_DP8393X', if_true: files('dp8393x.c'))
1374
+system_ss.add(when: 'CONFIG_XEN', if_true: files('xen_nic.c'))
1375
+system_ss.add(when: 'CONFIG_NE2000_COMMON', if_true: files('ne2000.c'))
1376
1377
# PCI network cards
1378
-softmmu_ss.add(when: 'CONFIG_NE2000_PCI', if_true: files('ne2000-pci.c'))
1379
-softmmu_ss.add(when: 'CONFIG_EEPRO100_PCI', if_true: files('eepro100.c'))
1380
-softmmu_ss.add(when: 'CONFIG_PCNET_PCI', if_true: files('pcnet-pci.c'))
1381
-softmmu_ss.add(when: 'CONFIG_PCNET_COMMON', if_true: files('pcnet.c'))
1382
-softmmu_ss.add(when: 'CONFIG_E1000_PCI', if_true: files('e1000.c', 'e1000x_common.c'))
1383
-softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1384
-softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('e1000e.c', 'e1000e_core.c', 'e1000x_common.c'))
1385
-softmmu_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1386
-softmmu_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('igb.c', 'igbvf.c', 'igb_core.c'))
1387
-softmmu_ss.add(when: 'CONFIG_RTL8139_PCI', if_true: files('rtl8139.c'))
1388
-softmmu_ss.add(when: 'CONFIG_TULIP', if_true: files('tulip.c'))
1389
-softmmu_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1390
-softmmu_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('vmxnet3.c'))
1391
+system_ss.add(when: 'CONFIG_NE2000_PCI', if_true: files('ne2000-pci.c'))
1392
+system_ss.add(when: 'CONFIG_EEPRO100_PCI', if_true: files('eepro100.c'))
1393
+system_ss.add(when: 'CONFIG_PCNET_PCI', if_true: files('pcnet-pci.c'))
1394
+system_ss.add(when: 'CONFIG_PCNET_COMMON', if_true: files('pcnet.c'))
1395
+system_ss.add(when: 'CONFIG_E1000_PCI', if_true: files('e1000.c', 'e1000x_common.c'))
1396
+system_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1397
+system_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('e1000e.c', 'e1000e_core.c', 'e1000x_common.c'))
1398
+system_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1399
+system_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('igb.c', 'igbvf.c', 'igb_core.c'))
1400
+system_ss.add(when: 'CONFIG_RTL8139_PCI', if_true: files('rtl8139.c'))
1401
+system_ss.add(when: 'CONFIG_TULIP', if_true: files('tulip.c'))
1402
+system_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c'))
1403
+system_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('vmxnet3.c'))
1404
1405
-softmmu_ss.add(when: 'CONFIG_SMC91C111', if_true: files('smc91c111.c'))
1406
-softmmu_ss.add(when: 'CONFIG_LAN9118', if_true: files('lan9118.c'))
1407
-softmmu_ss.add(when: 'CONFIG_NE2000_ISA', if_true: files('ne2000-isa.c'))
1408
-softmmu_ss.add(when: 'CONFIG_OPENCORES_ETH', if_true: files('opencores_eth.c'))
1409
-softmmu_ss.add(when: 'CONFIG_XGMAC', if_true: files('xgmac.c'))
1410
-softmmu_ss.add(when: 'CONFIG_MIPSNET', if_true: files('mipsnet.c'))
1411
-softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axienet.c'))
1412
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_EMAC', if_true: files('allwinner_emac.c'))
1413
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_SUN8I_EMAC', if_true: files('allwinner-sun8i-emac.c'))
1414
-softmmu_ss.add(when: 'CONFIG_IMX_FEC', if_true: files('imx_fec.c'))
1415
-softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-emac.c'))
1416
-softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('mv88w8618_eth.c'))
1417
+system_ss.add(when: 'CONFIG_SMC91C111', if_true: files('smc91c111.c'))
1418
+system_ss.add(when: 'CONFIG_LAN9118', if_true: files('lan9118.c'))
1419
+system_ss.add(when: 'CONFIG_NE2000_ISA', if_true: files('ne2000-isa.c'))
1420
+system_ss.add(when: 'CONFIG_OPENCORES_ETH', if_true: files('opencores_eth.c'))
1421
+system_ss.add(when: 'CONFIG_XGMAC', if_true: files('xgmac.c'))
1422
+system_ss.add(when: 'CONFIG_MIPSNET', if_true: files('mipsnet.c'))
1423
+system_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axienet.c'))
1424
+system_ss.add(when: 'CONFIG_ALLWINNER_EMAC', if_true: files('allwinner_emac.c'))
1425
+system_ss.add(when: 'CONFIG_ALLWINNER_SUN8I_EMAC', if_true: files('allwinner-sun8i-emac.c'))
1426
+system_ss.add(when: 'CONFIG_IMX_FEC', if_true: files('imx_fec.c'))
1427
+system_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-emac.c'))
1428
+system_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('mv88w8618_eth.c'))
1429
1430
-softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_gem.c'))
1431
-softmmu_ss.add(when: 'CONFIG_STELLARIS_ENET', if_true: files('stellaris_enet.c'))
1432
-softmmu_ss.add(when: 'CONFIG_LANCE', if_true: files('lance.c'))
1433
-softmmu_ss.add(when: 'CONFIG_LASI_I82596', if_true: files('lasi_i82596.c'))
1434
-softmmu_ss.add(when: 'CONFIG_I82596_COMMON', if_true: files('i82596.c'))
1435
-softmmu_ss.add(when: 'CONFIG_SUNHME', if_true: files('sunhme.c'))
1436
-softmmu_ss.add(when: 'CONFIG_FTGMAC100', if_true: files('ftgmac100.c'))
1437
-softmmu_ss.add(when: 'CONFIG_SUNGEM', if_true: files('sungem.c'))
1438
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_emc.c'))
1439
+system_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_gem.c'))
1440
+system_ss.add(when: 'CONFIG_STELLARIS_ENET', if_true: files('stellaris_enet.c'))
1441
+system_ss.add(when: 'CONFIG_LANCE', if_true: files('lance.c'))
1442
+system_ss.add(when: 'CONFIG_LASI_I82596', if_true: files('lasi_i82596.c'))
1443
+system_ss.add(when: 'CONFIG_I82596_COMMON', if_true: files('i82596.c'))
1444
+system_ss.add(when: 'CONFIG_SUNHME', if_true: files('sunhme.c'))
1445
+system_ss.add(when: 'CONFIG_FTGMAC100', if_true: files('ftgmac100.c'))
1446
+system_ss.add(when: 'CONFIG_SUNGEM', if_true: files('sungem.c'))
1447
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_emc.c'))
1448
1449
-softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_eth.c'))
1450
-softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_fec.c'))
1451
+system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_eth.c'))
1452
+system_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_fec.c'))
1453
specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_llan.c'))
1454
-softmmu_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethlite.c'))
1455
+system_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethlite.c'))
1456
1457
-softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c'))
1458
+system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c'))
1459
specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c'))
1460
1461
if have_vhost_net
1462
- softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c'))
1463
- softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c'))
1464
+ system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c'))
1465
+ system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c'))
1466
else
1467
- softmmu_ss.add(files('vhost_net-stub.c'))
1468
+ system_ss.add(files('vhost_net-stub.c'))
1469
endif
1470
1471
-softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files(
1472
+system_ss.add(when: 'CONFIG_ETSEC', if_true: files(
1473
'fsl_etsec/etsec.c',
1474
'fsl_etsec/miim.c',
1475
'fsl_etsec/registers.c',
1476
'fsl_etsec/rings.c',
1477
))
1478
1479
-softmmu_ss.add(when: 'CONFIG_ROCKER', if_true: files(
1480
+system_ss.add(when: 'CONFIG_ROCKER', if_true: files(
1481
'rocker/rocker.c',
1482
'rocker/rocker_desc.c',
1483
'rocker/rocker_fp.c',
1484
'rocker/rocker_of_dpa.c',
1485
'rocker/rocker_world.c',
1486
), if_false: files('rocker/qmp-norocker.c'))
1487
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('rocker/qmp-norocker.c'))
1488
-softmmu_ss.add(files('rocker/rocker-hmp-cmds.c'))
1489
+system_ss.add(when: 'CONFIG_ALL', if_true: files('rocker/qmp-norocker.c'))
1490
+system_ss.add(files('rocker/rocker-hmp-cmds.c'))
1491
1492
subdir('can')
1493
diff --git a/hw/nubus/meson.build b/hw/nubus/meson.build
1494
index XXXXXXX..XXXXXXX 100644
1495
--- a/hw/nubus/meson.build
1496
+++ b/hw/nubus/meson.build
1497
@@ -XXX,XX +XXX,XX @@ nubus_ss.add(files('nubus-bus.c'))
1498
nubus_ss.add(files('nubus-bridge.c'))
1499
nubus_ss.add(when: 'CONFIG_Q800', if_true: files('mac-nubus-bridge.c'))
1500
1501
-softmmu_ss.add_all(when: 'CONFIG_NUBUS', if_true: nubus_ss)
1502
+system_ss.add_all(when: 'CONFIG_NUBUS', if_true: nubus_ss)
1503
diff --git a/hw/nvme/meson.build b/hw/nvme/meson.build
1504
index XXXXXXX..XXXXXXX 100644
1505
--- a/hw/nvme/meson.build
1506
+++ b/hw/nvme/meson.build
1507
@@ -1 +1 @@
1508
-softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('ctrl.c', 'dif.c', 'ns.c', 'subsys.c'))
1509
+system_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('ctrl.c', 'dif.c', 'ns.c', 'subsys.c'))
1510
diff --git a/hw/nvram/meson.build b/hw/nvram/meson.build
1511
index XXXXXXX..XXXXXXX 100644
1512
--- a/hw/nvram/meson.build
1513
+++ b/hw/nvram/meson.build
1514
@@ -XXX,XX +XXX,XX @@ if have_system or have_tools
1515
qom_ss.add(files('fw_cfg-interface.c'))
1516
endif
1517
1518
-softmmu_ss.add(files('fw_cfg.c'))
1519
-softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
1520
-softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
1521
-softmmu_ss.add(when: 'CONFIG_NMC93XX_EEPROM', if_true: files('eeprom93xx.c'))
1522
-softmmu_ss.add(when: 'CONFIG_AT24C', if_true: files('eeprom_at24c.c'))
1523
-softmmu_ss.add(when: 'CONFIG_MAC_NVRAM', if_true: files('mac_nvram.c'))
1524
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_otp.c'))
1525
-softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_nvm.c'))
1526
-softmmu_ss.add(when: 'CONFIG_XLNX_EFUSE_CRC', if_true: files('xlnx-efuse-crc.c'))
1527
-softmmu_ss.add(when: 'CONFIG_XLNX_EFUSE', if_true: files('xlnx-efuse.c'))
1528
-softmmu_ss.add(when: 'CONFIG_XLNX_EFUSE_VERSAL', if_true: files(
1529
+system_ss.add(files('fw_cfg.c'))
1530
+system_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
1531
+system_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
1532
+system_ss.add(when: 'CONFIG_NMC93XX_EEPROM', if_true: files('eeprom93xx.c'))
1533
+system_ss.add(when: 'CONFIG_AT24C', if_true: files('eeprom_at24c.c'))
1534
+system_ss.add(when: 'CONFIG_MAC_NVRAM', if_true: files('mac_nvram.c'))
1535
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_otp.c'))
1536
+system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_nvm.c'))
1537
+system_ss.add(when: 'CONFIG_XLNX_EFUSE_CRC', if_true: files('xlnx-efuse-crc.c'))
1538
+system_ss.add(when: 'CONFIG_XLNX_EFUSE', if_true: files('xlnx-efuse.c'))
1539
+system_ss.add(when: 'CONFIG_XLNX_EFUSE_VERSAL', if_true: files(
1540
'xlnx-versal-efuse-cache.c',
1541
'xlnx-versal-efuse-ctrl.c'))
1542
-softmmu_ss.add(when: 'CONFIG_XLNX_EFUSE_ZYNQMP', if_true: files(
1543
+system_ss.add(when: 'CONFIG_XLNX_EFUSE_ZYNQMP', if_true: files(
1544
'xlnx-zynqmp-efuse.c'))
1545
-softmmu_ss.add(when: 'CONFIG_XLNX_BBRAM', if_true: files('xlnx-bbram.c'))
1546
+system_ss.add(when: 'CONFIG_XLNX_BBRAM', if_true: files('xlnx-bbram.c'))
1547
1548
specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_nvram.c'))
1549
diff --git a/hw/pci-bridge/meson.build b/hw/pci-bridge/meson.build
1550
index XXXXXXX..XXXXXXX 100644
1551
--- a/hw/pci-bridge/meson.build
1552
+++ b/hw/pci-bridge/meson.build
1553
@@ -XXX,XX +XXX,XX @@ pci_ss.add(when: 'CONFIG_CXL', if_true: files('cxl_root_port.c', 'cxl_upstream.c
1554
# Sun4u
1555
pci_ss.add(when: 'CONFIG_SIMBA', if_true: files('simba.c'))
1556
1557
-softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1558
+system_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1559
1560
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci_expander_bridge_stubs.c'))
1561
+system_ss.add(when: 'CONFIG_ALL', if_true: files('pci_expander_bridge_stubs.c'))
1562
diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
1563
index XXXXXXX..XXXXXXX 100644
1564
--- a/hw/pci-host/meson.build
1565
+++ b/hw/pci-host/meson.build
1566
@@ -XXX,XX +XXX,XX @@ pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
1567
# HPPA devices
1568
pci_ss.add(when: 'CONFIG_DINO', if_true: files('dino.c'))
1569
1570
-softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1571
+system_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1572
1573
specific_ss.add(when: 'CONFIG_PCI_POWERNV', if_true: files(
1574
'pnv_phb3.c',
1575
diff --git a/hw/pci/meson.build b/hw/pci/meson.build
1576
index XXXXXXX..XXXXXXX 100644
1577
--- a/hw/pci/meson.build
1578
+++ b/hw/pci/meson.build
1579
@@ -XXX,XX +XXX,XX @@ pci_ss.add(files(
1580
# CONFIG_PCI_EXPRESS=n.
1581
pci_ss.add(files('pcie.c', 'pcie_aer.c'))
1582
pci_ss.add(files('pcie_doe.c'))
1583
-softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c', 'pcie_host.c'))
1584
-softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1585
+system_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c', 'pcie_host.c'))
1586
+system_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
1587
1588
-softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
1589
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
1590
+system_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
1591
+system_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
1592
diff --git a/hw/pcmcia/meson.build b/hw/pcmcia/meson.build
1593
index XXXXXXX..XXXXXXX 100644
1594
--- a/hw/pcmcia/meson.build
1595
+++ b/hw/pcmcia/meson.build
1596
@@ -XXX,XX +XXX,XX @@
1597
-softmmu_ss.add(when: 'CONFIG_PCMCIA', if_true: files('pcmcia.c'))
1598
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx.c'))
1599
+system_ss.add(when: 'CONFIG_PCMCIA', if_true: files('pcmcia.c'))
1600
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx.c'))
1601
diff --git a/hw/rdma/meson.build b/hw/rdma/meson.build
1602
index XXXXXXX..XXXXXXX 100644
1603
--- a/hw/rdma/meson.build
1604
+++ b/hw/rdma/meson.build
1605
@@ -XXX,XX +XXX,XX @@
1606
-softmmu_ss.add(when: 'CONFIG_VMW_PVRDMA', if_true: files(
1607
+system_ss.add(when: 'CONFIG_VMW_PVRDMA', if_true: files(
1608
'rdma.c',
1609
'rdma_backend.c',
1610
'rdma_utils.c',
1611
diff --git a/hw/remote/meson.build b/hw/remote/meson.build
1612
index XXXXXXX..XXXXXXX 100644
1613
--- a/hw/remote/meson.build
1614
+++ b/hw/remote/meson.build
1615
@@ -XXX,XX +XXX,XX @@ remote_ss.add(when: 'CONFIG_VFIO_USER_SERVER', if_true: libvfio_user_dep)
1616
specific_ss.add(when: 'CONFIG_MULTIPROCESS', if_true: files('memory.c'))
1617
specific_ss.add(when: 'CONFIG_MULTIPROCESS', if_true: files('proxy-memory-listener.c'))
1618
1619
-softmmu_ss.add_all(when: 'CONFIG_MULTIPROCESS', if_true: remote_ss)
1620
+system_ss.add_all(when: 'CONFIG_MULTIPROCESS', if_true: remote_ss)
1621
diff --git a/hw/rtc/meson.build b/hw/rtc/meson.build
1622
index XXXXXXX..XXXXXXX 100644
1623
--- a/hw/rtc/meson.build
1624
+++ b/hw/rtc/meson.build
1625
@@ -XXX,XX +XXX,XX @@
1626
1627
-softmmu_ss.add(when: 'CONFIG_DS1338', if_true: files('ds1338.c'))
1628
-softmmu_ss.add(when: 'CONFIG_M41T80', if_true: files('m41t80.c'))
1629
-softmmu_ss.add(when: 'CONFIG_M48T59', if_true: files('m48t59.c'))
1630
-softmmu_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c'))
1631
-softmmu_ss.add(when: 'CONFIG_TWL92230', if_true: files('twl92230.c'))
1632
-softmmu_ss.add(when: ['CONFIG_ISA_BUS', 'CONFIG_M48T59'], if_true: files('m48t59-isa.c'))
1633
-softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-rtc.c'))
1634
+system_ss.add(when: 'CONFIG_DS1338', if_true: files('ds1338.c'))
1635
+system_ss.add(when: 'CONFIG_M41T80', if_true: files('m41t80.c'))
1636
+system_ss.add(when: 'CONFIG_M48T59', if_true: files('m48t59.c'))
1637
+system_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c'))
1638
+system_ss.add(when: 'CONFIG_TWL92230', if_true: files('twl92230.c'))
1639
+system_ss.add(when: ['CONFIG_ISA_BUS', 'CONFIG_M48T59'], if_true: files('m48t59-isa.c'))
1640
+system_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-rtc.c'))
1641
1642
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_rtc.c'))
1643
-softmmu_ss.add(when: 'CONFIG_SUN4V_RTC', if_true: files('sun4v-rtc.c'))
1644
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_rtc.c'))
1645
-softmmu_ss.add(when: 'CONFIG_GOLDFISH_RTC', if_true: files('goldfish_rtc.c'))
1646
-softmmu_ss.add(when: 'CONFIG_LS7A_RTC', if_true: files('ls7a_rtc.c'))
1647
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-rtc.c'))
1648
-softmmu_ss.add(when: 'CONFIG_MC146818RTC', if_true: files('mc146818rtc.c'))
1649
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_rtc.c'))
1650
+system_ss.add(when: 'CONFIG_SUN4V_RTC', if_true: files('sun4v-rtc.c'))
1651
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_rtc.c'))
1652
+system_ss.add(when: 'CONFIG_GOLDFISH_RTC', if_true: files('goldfish_rtc.c'))
1653
+system_ss.add(when: 'CONFIG_LS7A_RTC', if_true: files('ls7a_rtc.c'))
1654
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-rtc.c'))
1655
+system_ss.add(when: 'CONFIG_MC146818RTC', if_true: files('mc146818rtc.c'))
1656
diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build
1657
index XXXXXXX..XXXXXXX 100644
1658
--- a/hw/scsi/meson.build
1659
+++ b/hw/scsi/meson.build
1660
@@ -XXX,XX +XXX,XX @@ scsi_ss.add(when: 'CONFIG_LSI_SCSI_PCI', if_true: files('lsi53c895a.c'))
1661
scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c'))
1662
scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c'))
1663
scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c'))
1664
-softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss)
1665
+system_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss)
1666
1667
specific_scsi_ss = ss.source_set()
1668
1669
diff --git a/hw/sd/meson.build b/hw/sd/meson.build
1670
index XXXXXXX..XXXXXXX 100644
1671
--- a/hw/sd/meson.build
1672
+++ b/hw/sd/meson.build
1673
@@ -XXX,XX +XXX,XX @@
1674
-softmmu_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c'))
1675
-softmmu_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c'))
1676
-softmmu_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c'))
1677
-softmmu_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c'))
1678
-softmmu_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c'))
1679
+system_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c'))
1680
+system_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c'))
1681
+system_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c'))
1682
+system_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c'))
1683
+system_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c'))
1684
1685
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c'))
1686
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c'))
1687
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c'))
1688
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_sdhci.c'))
1689
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sdhost.c'))
1690
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_sdhci.c'))
1691
-softmmu_ss.add(when: 'CONFIG_CADENCE_SDHCI', if_true: files('cadence_sdhci.c'))
1692
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c'))
1693
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c'))
1694
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c'))
1695
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_sdhci.c'))
1696
+system_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sdhost.c'))
1697
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_sdhci.c'))
1698
+system_ss.add(when: 'CONFIG_CADENCE_SDHCI', if_true: files('cadence_sdhci.c'))
1699
diff --git a/hw/sensor/meson.build b/hw/sensor/meson.build
1700
index XXXXXXX..XXXXXXX 100644
1701
--- a/hw/sensor/meson.build
1702
+++ b/hw/sensor/meson.build
1703
@@ -XXX,XX +XXX,XX @@
1704
-softmmu_ss.add(when: 'CONFIG_TMP105', if_true: files('tmp105.c'))
1705
-softmmu_ss.add(when: 'CONFIG_TMP421', if_true: files('tmp421.c'))
1706
-softmmu_ss.add(when: 'CONFIG_DPS310', if_true: files('dps310.c'))
1707
-softmmu_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c'))
1708
-softmmu_ss.add(when: 'CONFIG_ADM1272', if_true: files('adm1272.c'))
1709
-softmmu_ss.add(when: 'CONFIG_MAX34451', if_true: files('max34451.c'))
1710
-softmmu_ss.add(when: 'CONFIG_LSM303DLHC_MAG', if_true: files('lsm303dlhc_mag.c'))
1711
-softmmu_ss.add(when: 'CONFIG_ISL_PMBUS_VR', if_true: files('isl_pmbus_vr.c'))
1712
-softmmu_ss.add(when: 'CONFIG_MAX31785', if_true: files('max31785.c'))
1713
+system_ss.add(when: 'CONFIG_TMP105', if_true: files('tmp105.c'))
1714
+system_ss.add(when: 'CONFIG_TMP421', if_true: files('tmp421.c'))
1715
+system_ss.add(when: 'CONFIG_DPS310', if_true: files('dps310.c'))
1716
+system_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c'))
1717
+system_ss.add(when: 'CONFIG_ADM1272', if_true: files('adm1272.c'))
1718
+system_ss.add(when: 'CONFIG_MAX34451', if_true: files('max34451.c'))
1719
+system_ss.add(when: 'CONFIG_LSM303DLHC_MAG', if_true: files('lsm303dlhc_mag.c'))
1720
+system_ss.add(when: 'CONFIG_ISL_PMBUS_VR', if_true: files('isl_pmbus_vr.c'))
1721
+system_ss.add(when: 'CONFIG_MAX31785', if_true: files('max31785.c'))
1722
diff --git a/hw/smbios/meson.build b/hw/smbios/meson.build
1723
index XXXXXXX..XXXXXXX 100644
1724
--- a/hw/smbios/meson.build
1725
+++ b/hw/smbios/meson.build
1726
@@ -XXX,XX +XXX,XX @@ smbios_ss.add(when: 'CONFIG_IPMI',
1727
if_true: files('smbios_type_38.c'),
1728
if_false: files('smbios_type_38-stub.c'))
1729
1730
-softmmu_ss.add_all(when: 'CONFIG_SMBIOS', if_true: smbios_ss)
1731
-softmmu_ss.add(when: 'CONFIG_SMBIOS', if_false: files('smbios-stub.c'))
1732
+system_ss.add_all(when: 'CONFIG_SMBIOS', if_true: smbios_ss)
1733
+system_ss.add(when: 'CONFIG_SMBIOS', if_false: files('smbios-stub.c'))
1734
1735
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files(
1736
+system_ss.add(when: 'CONFIG_ALL', if_true: files(
1737
'smbios-stub.c',
1738
'smbios_type_38-stub.c',
1739
))
1740
diff --git a/hw/ssi/meson.build b/hw/ssi/meson.build
1741
index XXXXXXX..XXXXXXX 100644
1742
--- a/hw/ssi/meson.build
1743
+++ b/hw/ssi/meson.build
1744
@@ -XXX,XX +XXX,XX @@
1745
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_smc.c'))
1746
-softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-spi.c'))
1747
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_fiu.c', 'npcm_pspi.c'))
1748
-softmmu_ss.add(when: 'CONFIG_PL022', if_true: files('pl022.c'))
1749
-softmmu_ss.add(when: 'CONFIG_SIFIVE_SPI', if_true: files('sifive_spi.c'))
1750
-softmmu_ss.add(when: 'CONFIG_SSI', if_true: files('ssi.c'))
1751
-softmmu_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c'))
1752
-softmmu_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c'))
1753
-softmmu_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c'))
1754
-softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-ospi.c'))
1755
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c'))
1756
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_spi.c'))
1757
-softmmu_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_spi_host.c'))
1758
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_smc.c'))
1759
+system_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-spi.c'))
1760
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_fiu.c', 'npcm_pspi.c'))
1761
+system_ss.add(when: 'CONFIG_PL022', if_true: files('pl022.c'))
1762
+system_ss.add(when: 'CONFIG_SIFIVE_SPI', if_true: files('sifive_spi.c'))
1763
+system_ss.add(when: 'CONFIG_SSI', if_true: files('ssi.c'))
1764
+system_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c'))
1765
+system_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c'))
1766
+system_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c'))
1767
+system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-ospi.c'))
1768
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c'))
1769
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_spi.c'))
1770
+system_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_spi_host.c'))
1771
diff --git a/hw/timer/meson.build b/hw/timer/meson.build
1772
index XXXXXXX..XXXXXXX 100644
1773
--- a/hw/timer/meson.build
1774
+++ b/hw/timer/meson.build
1775
@@ -XXX,XX +XXX,XX @@
1776
-softmmu_ss.add(when: 'CONFIG_A9_GTIMER', if_true: files('a9gtimer.c'))
1777
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_PIT', if_true: files('allwinner-a10-pit.c'))
1778
-softmmu_ss.add(when: 'CONFIG_ALTERA_TIMER', if_true: files('altera_timer.c'))
1779
-softmmu_ss.add(when: 'CONFIG_ARM_MPTIMER', if_true: files('arm_mptimer.c'))
1780
-softmmu_ss.add(when: 'CONFIG_ARM_TIMER', if_true: files('arm_timer.c'))
1781
-softmmu_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_systick.c'))
1782
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_timer.c'))
1783
-softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_ttc.c'))
1784
-softmmu_ss.add(when: 'CONFIG_CMSDK_APB_DUALTIMER', if_true: files('cmsdk-apb-dualtimer.c'))
1785
-softmmu_ss.add(when: 'CONFIG_CMSDK_APB_TIMER', if_true: files('cmsdk-apb-timer.c'))
1786
-softmmu_ss.add(when: 'CONFIG_RENESAS_TMR', if_true: files('renesas_tmr.c'))
1787
-softmmu_ss.add(when: 'CONFIG_RENESAS_CMT', if_true: files('renesas_cmt.c'))
1788
-softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-timer.c'))
1789
-softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_timer.c'))
1790
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_mct.c'))
1791
-softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pwm.c'))
1792
-softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c'))
1793
-softmmu_ss.add(when: 'CONFIG_HPET', if_true: files('hpet.c'))
1794
-softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c'))
1795
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c'))
1796
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c'))
1797
-softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c'))
1798
-softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
1799
-softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_timer.c'))
1800
-softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_timer.c'))
1801
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gptimer.c'))
1802
-softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_synctimer.c'))
1803
-softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c'))
1804
-softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c'))
1805
-softmmu_ss.add(when: 'CONFIG_SH_TIMER', if_true: files('sh_timer.c'))
1806
-softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c'))
1807
-softmmu_ss.add(when: 'CONFIG_SSE_COUNTER', if_true: files('sse-counter.c'))
1808
-softmmu_ss.add(when: 'CONFIG_SSE_TIMER', if_true: files('sse-timer.c'))
1809
-softmmu_ss.add(when: 'CONFIG_STELLARIS_GPTM', if_true: files('stellaris-gptm.c'))
1810
-softmmu_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c'))
1811
-softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c'))
1812
+system_ss.add(when: 'CONFIG_A9_GTIMER', if_true: files('a9gtimer.c'))
1813
+system_ss.add(when: 'CONFIG_ALLWINNER_A10_PIT', if_true: files('allwinner-a10-pit.c'))
1814
+system_ss.add(when: 'CONFIG_ALTERA_TIMER', if_true: files('altera_timer.c'))
1815
+system_ss.add(when: 'CONFIG_ARM_MPTIMER', if_true: files('arm_mptimer.c'))
1816
+system_ss.add(when: 'CONFIG_ARM_TIMER', if_true: files('arm_timer.c'))
1817
+system_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_systick.c'))
1818
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_timer.c'))
1819
+system_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_ttc.c'))
1820
+system_ss.add(when: 'CONFIG_CMSDK_APB_DUALTIMER', if_true: files('cmsdk-apb-dualtimer.c'))
1821
+system_ss.add(when: 'CONFIG_CMSDK_APB_TIMER', if_true: files('cmsdk-apb-timer.c'))
1822
+system_ss.add(when: 'CONFIG_RENESAS_TMR', if_true: files('renesas_tmr.c'))
1823
+system_ss.add(when: 'CONFIG_RENESAS_CMT', if_true: files('renesas_cmt.c'))
1824
+system_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-timer.c'))
1825
+system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_timer.c'))
1826
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_mct.c'))
1827
+system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pwm.c'))
1828
+system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c'))
1829
+system_ss.add(when: 'CONFIG_HPET', if_true: files('hpet.c'))
1830
+system_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c'))
1831
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c'))
1832
+system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c'))
1833
+system_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c'))
1834
+system_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
1835
+system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_timer.c'))
1836
+system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_timer.c'))
1837
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gptimer.c'))
1838
+system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_synctimer.c'))
1839
+system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c'))
1840
+system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c'))
1841
+system_ss.add(when: 'CONFIG_SH_TIMER', if_true: files('sh_timer.c'))
1842
+system_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c'))
1843
+system_ss.add(when: 'CONFIG_SSE_COUNTER', if_true: files('sse-counter.c'))
1844
+system_ss.add(when: 'CONFIG_SSE_TIMER', if_true: files('sse-timer.c'))
1845
+system_ss.add(when: 'CONFIG_STELLARIS_GPTM', if_true: files('stellaris-gptm.c'))
1846
+system_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c'))
1847
+system_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c'))
1848
specific_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_timer.c'))
1849
-softmmu_ss.add(when: 'CONFIG_SIFIVE_PWM', if_true: files('sifive_pwm.c'))
1850
+system_ss.add(when: 'CONFIG_SIFIVE_PWM', if_true: files('sifive_pwm.c'))
1851
1852
specific_ss.add(when: 'CONFIG_AVR_TIMER16', if_true: files('avr_timer16.c'))
1853
diff --git a/hw/tpm/meson.build b/hw/tpm/meson.build
1854
index XXXXXXX..XXXXXXX 100644
1855
--- a/hw/tpm/meson.build
1856
+++ b/hw/tpm/meson.build
1857
@@ -XXX,XX +XXX,XX @@
1858
-softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c'))
1859
-softmmu_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c'))
1860
-softmmu_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: files('tpm_tis_sysbus.c'))
1861
-softmmu_ss.add(when: 'CONFIG_TPM_TIS_I2C', if_true: files('tpm_tis_i2c.c'))
1862
-softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
1863
-softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_ppi.c'))
1864
-softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_ppi.c'))
1865
+system_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c'))
1866
+system_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c'))
1867
+system_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: files('tpm_tis_sysbus.c'))
1868
+system_ss.add(when: 'CONFIG_TPM_TIS_I2C', if_true: files('tpm_tis_i2c.c'))
1869
+system_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
1870
+system_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_ppi.c'))
1871
+system_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_ppi.c'))
1872
1873
specific_ss.add(when: 'CONFIG_TPM_SPAPR', if_true: files('tpm_spapr.c'))
1874
diff --git a/hw/usb/meson.build b/hw/usb/meson.build
1875
index XXXXXXX..XXXXXXX 100644
1876
--- a/hw/usb/meson.build
1877
+++ b/hw/usb/meson.build
1878
@@ -XXX,XX +XXX,XX @@
1879
hw_usb_modules = {}
1880
1881
# usb subsystem core
1882
-softmmu_ss.add(when: 'CONFIG_USB', if_true: files(
1883
+system_ss.add(when: 'CONFIG_USB', if_true: files(
1884
'bus.c',
1885
'combined-packet.c',
1886
'core.c',
1887
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: 'CONFIG_USB', if_true: files(
1888
))
1889
1890
# usb host adapters
1891
-softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c'))
1892
-softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c'))
1893
-softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c'))
1894
-softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c'))
1895
-softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c'))
1896
-softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c'))
1897
-softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c'))
1898
-softmmu_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c'))
1899
-softmmu_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c'))
1900
-softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c'))
1901
-softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c'))
1902
-softmmu_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c'))
1903
-softmmu_ss.add(when: 'CONFIG_USB_DWC3', if_true: files('hcd-dwc3.c'))
1904
+system_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c'))
1905
+system_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c'))
1906
+system_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c'))
1907
+system_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c'))
1908
+system_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c'))
1909
+system_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c'))
1910
+system_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c'))
1911
+system_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c'))
1912
+system_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c'))
1913
+system_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c'))
1914
+system_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c'))
1915
+system_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c'))
1916
+system_ss.add(when: 'CONFIG_USB_DWC3', if_true: files('hcd-dwc3.c'))
1917
1918
-softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
1919
-softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
1920
-softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
1921
-softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686-uhci-pci.c'))
1922
-softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
1923
-softmmu_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
1924
+system_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
1925
+system_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
1926
+system_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
1927
+system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686-uhci-pci.c'))
1928
+system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
1929
+system_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
1930
1931
# emulated usb devices
1932
-softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c'))
1933
-softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c'))
1934
-softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))
1935
-softmmu_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c'))
1936
-softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c'))
1937
-softmmu_ss.add(when: 'CONFIG_USB_STORAGE_CLASSIC', if_true: files('dev-storage-classic.c'))
1938
-softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c'))
1939
-softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c'))
1940
-softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c'))
1941
-softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c'))
1942
-softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c'))
1943
+system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c'))
1944
+system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c'))
1945
+system_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))
1946
+system_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c'))
1947
+system_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c'))
1948
+system_ss.add(when: 'CONFIG_USB_STORAGE_CLASSIC', if_true: files('dev-storage-classic.c'))
1949
+system_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c'))
1950
+system_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c'))
1951
+system_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c'))
1952
+system_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c'))
1953
+system_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c'))
1954
1955
# smartcard
1956
-softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c'))
1957
+system_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c'))
1958
1959
if cacard.found()
1960
usbsmartcard_ss = ss.source_set()
1961
@@ -XXX,XX +XXX,XX @@ if cacard.found()
1962
endif
1963
1964
# U2F
1965
-softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
1966
-softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')])
1967
+system_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
1968
+system_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')])
1969
if u2f.found()
1970
- softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')])
1971
+ system_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')])
1972
endif
1973
1974
# CanoKey
1975
if canokey.found()
1976
- softmmu_ss.add(when: 'CONFIG_USB_CANOKEY', if_true: [canokey, files('canokey.c')])
1977
+ system_ss.add(when: 'CONFIG_USB_CANOKEY', if_true: [canokey, files('canokey.c')])
1978
endif
1979
1980
# usb redirect
1981
@@ -XXX,XX +XXX,XX @@ if libusb.found()
1982
hw_usb_modules += {'host': usbhost_ss}
1983
endif
1984
1985
-softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN_BUS', libusb], if_true: files('xen-usb.c'))
1986
+system_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN_BUS', libusb], if_true: files('xen-usb.c'))
1987
1988
modules += { 'hw-usb': hw_usb_modules }
1989
diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build
1990
index XXXXXXX..XXXXXXX 100644
1991
--- a/hw/virtio/meson.build
1992
+++ b/hw/virtio/meson.build
1993
@@ -XXX,XX +XXX,XX @@ virtio_pci_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev-pci.c'
1994
1995
specific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
1996
1997
-softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
1998
-softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
1999
-softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
2000
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
2001
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('virtio-stub.c'))
2002
-softmmu_ss.add(files('virtio-hmp-cmds.c'))
2003
+system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
2004
+system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
2005
+system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
2006
+system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
2007
+system_ss.add(when: 'CONFIG_ALL', if_true: files('virtio-stub.c'))
2008
+system_ss.add(files('virtio-hmp-cmds.c'))
2009
2010
specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: specific_virtio_ss)
2011
diff --git a/hw/watchdog/meson.build b/hw/watchdog/meson.build
2012
index XXXXXXX..XXXXXXX 100644
2013
--- a/hw/watchdog/meson.build
2014
+++ b/hw/watchdog/meson.build
2015
@@ -XXX,XX +XXX,XX @@
2016
-softmmu_ss.add(files('watchdog.c'))
2017
-softmmu_ss.add(when: 'CONFIG_ALLWINNER_WDT', if_true: files('allwinner-wdt.c'))
2018
-softmmu_ss.add(when: 'CONFIG_CMSDK_APB_WATCHDOG', if_true: files('cmsdk-apb-watchdog.c'))
2019
-softmmu_ss.add(when: 'CONFIG_WDT_IB6300ESB', if_true: files('wdt_i6300esb.c'))
2020
-softmmu_ss.add(when: 'CONFIG_WDT_IB700', if_true: files('wdt_ib700.c'))
2021
-softmmu_ss.add(when: 'CONFIG_WDT_DIAG288', if_true: files('wdt_diag288.c'))
2022
-softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('wdt_aspeed.c'))
2023
-softmmu_ss.add(when: 'CONFIG_WDT_IMX2', if_true: files('wdt_imx2.c'))
2024
-softmmu_ss.add(when: 'CONFIG_WDT_SBSA', if_true: files('sbsa_gwdt.c'))
2025
+system_ss.add(files('watchdog.c'))
2026
+system_ss.add(when: 'CONFIG_ALLWINNER_WDT', if_true: files('allwinner-wdt.c'))
2027
+system_ss.add(when: 'CONFIG_CMSDK_APB_WATCHDOG', if_true: files('cmsdk-apb-watchdog.c'))
2028
+system_ss.add(when: 'CONFIG_WDT_IB6300ESB', if_true: files('wdt_i6300esb.c'))
2029
+system_ss.add(when: 'CONFIG_WDT_IB700', if_true: files('wdt_ib700.c'))
2030
+system_ss.add(when: 'CONFIG_WDT_DIAG288', if_true: files('wdt_diag288.c'))
2031
+system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('wdt_aspeed.c'))
2032
+system_ss.add(when: 'CONFIG_WDT_IMX2', if_true: files('wdt_imx2.c'))
2033
+system_ss.add(when: 'CONFIG_WDT_SBSA', if_true: files('sbsa_gwdt.c'))
2034
specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_watchdog.c'))
2035
diff --git a/hw/xen/meson.build b/hw/xen/meson.build
2036
index XXXXXXX..XXXXXXX 100644
2037
--- a/hw/xen/meson.build
2038
+++ b/hw/xen/meson.build
2039
@@ -XXX,XX +XXX,XX @@
2040
-softmmu_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files(
2041
+system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files(
2042
'xen-backend.c',
2043
'xen-bus-helper.c',
2044
'xen-bus.c',
2045
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files(
2046
'xen_pvdev.c',
2047
))
2048
2049
-softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
2050
+system_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
2051
'xen-operations.c',
2052
))
2053
2054
diff --git a/migration/meson.build b/migration/meson.build
2055
index XXXXXXX..XXXXXXX 100644
2056
--- a/migration/meson.build
2057
+++ b/migration/meson.build
2058
@@ -XXX,XX +XXX,XX @@ migration_files = files(
2059
'yank_functions.c',
98
)
2060
)
99
2061
100
-common_ss.add(files('cpu.c'))
2062
-softmmu_ss.add(files(
101
+common_ss.add(files('cpu-common.c'))
2063
+system_ss.add(files(
102
common_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
2064
'block-dirty-bitmap.c',
103
common_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c'))
2065
'channel.c',
104
common_ss.add(when: ['CONFIG_GUEST_LOADER', fdt], if_true: files('guest-loader.c'))
2066
'channel-block.c',
105
@@ -XXX,XX +XXX,XX @@ common_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c'))
2067
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
106
common_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c'))
2068
), gnutls)
107
2069
108
softmmu_ss.add(files(
2070
if get_option('replication').allowed()
109
+ 'cpu-sysemu.c',
2071
- softmmu_ss.add(files('colo-failover.c', 'colo.c'))
110
'fw-path-provider.c',
2072
+ system_ss.add(files('colo-failover.c', 'colo.c'))
111
'loader.c',
2073
endif
112
'machine-hmp-cmds.c',
2074
2075
-softmmu_ss.add(when: rdma, if_true: files('rdma.c'))
2076
+system_ss.add(when: rdma, if_true: files('rdma.c'))
2077
if get_option('live_block_migration').allowed()
2078
- softmmu_ss.add(files('block.c'))
2079
+ system_ss.add(files('block.c'))
2080
endif
2081
-softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c'))
2082
+system_ss.add(when: zstd, if_true: files('multifd-zstd.c'))
2083
2084
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY',
2085
if_true: files('ram.c',
2086
diff --git a/monitor/meson.build b/monitor/meson.build
2087
index XXXXXXX..XXXXXXX 100644
2088
--- a/monitor/meson.build
2089
+++ b/monitor/meson.build
2090
@@ -XXX,XX +XXX,XX @@
2091
qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c'))
2092
2093
-softmmu_ss.add(files(
2094
+system_ss.add(files(
2095
'fds.c',
2096
'hmp-cmds.c',
2097
'hmp.c',
2098
))
2099
-softmmu_ss.add([spice_headers, files('qmp-cmds.c')])
2100
+system_ss.add([spice_headers, files('qmp-cmds.c')])
2101
2102
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY',
2103
        if_true: [files( 'hmp-cmds-target.c', 'hmp-target.c'), spice])
2104
diff --git a/net/can/meson.build b/net/can/meson.build
2105
index XXXXXXX..XXXXXXX 100644
2106
--- a/net/can/meson.build
2107
+++ b/net/can/meson.build
2108
@@ -XXX,XX +XXX,XX @@ can_ss = ss.source_set()
2109
can_ss.add(files('can_core.c', 'can_host.c'))
2110
can_ss.add(when: 'CONFIG_LINUX', if_true: files('can_socketcan.c'))
2111
2112
-softmmu_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss)
2113
+system_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss)
2114
diff --git a/net/meson.build b/net/meson.build
2115
index XXXXXXX..XXXXXXX 100644
2116
--- a/net/meson.build
2117
+++ b/net/meson.build
2118
@@ -XXX,XX +XXX,XX @@
2119
-softmmu_ss.add(files(
2120
+system_ss.add(files(
2121
'announce.c',
2122
'checksum.c',
2123
'dump.c',
2124
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
2125
2126
if get_option('replication').allowed() or \
2127
get_option('colo_proxy').allowed()
2128
- softmmu_ss.add(files('colo-compare.c'))
2129
- softmmu_ss.add(files('colo.c'))
2130
+ system_ss.add(files('colo-compare.c'))
2131
+ system_ss.add(files('colo.c'))
2132
endif
2133
2134
if get_option('colo_proxy').allowed()
2135
- softmmu_ss.add(files('filter-rewriter.c'))
2136
+ system_ss.add(files('filter-rewriter.c'))
2137
endif
2138
2139
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
2140
+system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
2141
2142
if have_l2tpv3
2143
- softmmu_ss.add(files('l2tpv3.c'))
2144
+ system_ss.add(files('l2tpv3.c'))
2145
endif
2146
-softmmu_ss.add(when: slirp, if_true: files('slirp.c'))
2147
-softmmu_ss.add(when: vde, if_true: files('vde.c'))
2148
+system_ss.add(when: slirp, if_true: files('slirp.c'))
2149
+system_ss.add(when: vde, if_true: files('vde.c'))
2150
if have_netmap
2151
- softmmu_ss.add(files('netmap.c'))
2152
+ system_ss.add(files('netmap.c'))
2153
endif
2154
if have_vhost_net_user
2155
- softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
2156
- softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
2157
+ system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
2158
+ system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
2159
endif
2160
2161
-softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
2162
-softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
2163
-softmmu_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
2164
+system_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
2165
+system_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
2166
+system_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
2167
tap_posix = ['tap.c']
2168
if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS')
2169
tap_posix += 'tap-stub.c'
2170
endif
2171
-softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
2172
-softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
2173
+system_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
2174
+system_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
2175
if have_vhost_net_vdpa
2176
- softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
2177
- softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
2178
+ system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
2179
+ system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
2180
endif
2181
2182
vmnet_files = files(
2183
@@ -XXX,XX +XXX,XX @@ vmnet_files = files(
2184
'vmnet-host.c',
2185
'vmnet-shared.c'
2186
)
2187
-softmmu_ss.add(when: vmnet, if_true: vmnet_files)
2188
+system_ss.add(when: vmnet, if_true: vmnet_files)
2189
subdir('can')
2190
diff --git a/qom/meson.build b/qom/meson.build
2191
index XXXXXXX..XXXXXXX 100644
2192
--- a/qom/meson.build
2193
+++ b/qom/meson.build
2194
@@ -XXX,XX +XXX,XX @@ qom_ss.add(files(
2195
))
2196
2197
qmp_ss.add(files('qom-qmp-cmds.c'))
2198
-softmmu_ss.add(files('qom-hmp-cmds.c'))
2199
+system_ss.add(files('qom-hmp-cmds.c'))
2200
diff --git a/replay/meson.build b/replay/meson.build
2201
index XXXXXXX..XXXXXXX 100644
2202
--- a/replay/meson.build
2203
+++ b/replay/meson.build
2204
@@ -XXX,XX +XXX,XX @@
2205
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files(
2206
+system_ss.add(when: 'CONFIG_TCG', if_true: files(
2207
'replay.c',
2208
'replay-internal.c',
2209
'replay-events.c',
2210
diff --git a/softmmu/meson.build b/softmmu/meson.build
2211
index XXXXXXX..XXXXXXX 100644
2212
--- a/softmmu/meson.build
2213
+++ b/softmmu/meson.build
2214
@@ -XXX,XX +XXX,XX @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: [files(
2215
'icount.c',
2216
)])
2217
2218
-softmmu_ss.add(files(
2219
+system_ss.add(files(
2220
'balloon.c',
2221
'bootdevice.c',
2222
'cpus.c',
2223
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
2224
), sdl, libpmem, libdaxctl)
2225
2226
if have_tpm
2227
- softmmu_ss.add(files('tpm.c'))
2228
+ system_ss.add(files('tpm.c'))
2229
endif
2230
2231
-softmmu_ss.add(when: seccomp, if_true: files('qemu-seccomp.c'))
2232
-softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
2233
+system_ss.add(when: seccomp, if_true: files('qemu-seccomp.c'))
2234
+system_ss.add(when: fdt, if_true: files('device_tree.c'))
2235
diff --git a/stats/meson.build b/stats/meson.build
2236
index XXXXXXX..XXXXXXX 100644
2237
--- a/stats/meson.build
2238
+++ b/stats/meson.build
2239
@@ -1 +1 @@
2240
-softmmu_ss.add(files('stats-hmp-cmds.c', 'stats-qmp-cmds.c'))
2241
+system_ss.add(files('stats-hmp-cmds.c', 'stats-qmp-cmds.c'))
2242
diff --git a/target/alpha/meson.build b/target/alpha/meson.build
2243
index XXXXXXX..XXXXXXX 100644
2244
--- a/target/alpha/meson.build
2245
+++ b/target/alpha/meson.build
2246
@@ -XXX,XX +XXX,XX @@ alpha_ss.add(files(
2247
'vax_helper.c',
2248
))
2249
2250
-alpha_softmmu_ss = ss.source_set()
2251
-alpha_softmmu_ss.add(files('machine.c'))
2252
+alpha_system_ss = ss.source_set()
2253
+alpha_system_ss.add(files('machine.c'))
2254
2255
target_arch += {'alpha': alpha_ss}
2256
-target_softmmu_arch += {'alpha': alpha_softmmu_ss}
2257
+target_softmmu_arch += {'alpha': alpha_system_ss}
2258
diff --git a/target/arm/hvf/meson.build b/target/arm/hvf/meson.build
2259
index XXXXXXX..XXXXXXX 100644
2260
--- a/target/arm/hvf/meson.build
2261
+++ b/target/arm/hvf/meson.build
2262
@@ -XXX,XX +XXX,XX @@
2263
-arm_softmmu_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files(
2264
+arm_system_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files(
2265
'hvf.c',
2266
))
2267
diff --git a/target/arm/meson.build b/target/arm/meson.build
2268
index XXXXXXX..XXXXXXX 100644
2269
--- a/target/arm/meson.build
2270
+++ b/target/arm/meson.build
2271
@@ -XXX,XX +XXX,XX @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
2272
'gdbstub64.c',
2273
))
2274
2275
-arm_softmmu_ss = ss.source_set()
2276
-arm_softmmu_ss.add(files(
2277
+arm_system_ss = ss.source_set()
2278
+arm_system_ss.add(files(
2279
'arch_dump.c',
2280
'arm-powerctl.c',
2281
'arm-qmp-cmds.c',
2282
@@ -XXX,XX +XXX,XX @@ else
2283
endif
2284
2285
target_arch += {'arm': arm_ss}
2286
-target_softmmu_arch += {'arm': arm_softmmu_ss}
2287
+target_softmmu_arch += {'arm': arm_system_ss}
2288
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
2289
index XXXXXXX..XXXXXXX 100644
2290
--- a/target/arm/tcg/meson.build
2291
+++ b/target/arm/tcg/meson.build
2292
@@ -XXX,XX +XXX,XX @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
2293
'sve_helper.c',
2294
))
2295
2296
-arm_softmmu_ss.add(files(
2297
+arm_system_ss.add(files(
2298
'psci.c',
2299
))
2300
diff --git a/target/avr/meson.build b/target/avr/meson.build
2301
index XXXXXXX..XXXXXXX 100644
2302
--- a/target/avr/meson.build
2303
+++ b/target/avr/meson.build
2304
@@ -XXX,XX +XXX,XX @@ gen = [
2305
]
2306
2307
avr_ss = ss.source_set()
2308
-avr_softmmu_ss = ss.source_set()
2309
+avr_system_ss = ss.source_set()
2310
2311
avr_ss.add(gen)
2312
avr_ss.add(files(
2313
@@ -XXX,XX +XXX,XX @@ avr_ss.add(files(
2314
'gdbstub.c',
2315
'disas.c'))
2316
2317
-avr_softmmu_ss.add(files('machine.c'))
2318
+avr_system_ss.add(files('machine.c'))
2319
2320
target_arch += {'avr': avr_ss}
2321
-target_softmmu_arch += {'avr': avr_softmmu_ss}
2322
+target_softmmu_arch += {'avr': avr_system_ss}
2323
diff --git a/target/cris/meson.build b/target/cris/meson.build
2324
index XXXXXXX..XXXXXXX 100644
2325
--- a/target/cris/meson.build
2326
+++ b/target/cris/meson.build
2327
@@ -XXX,XX +XXX,XX @@ cris_ss.add(files(
2328
'translate.c',
2329
))
2330
2331
-cris_softmmu_ss = ss.source_set()
2332
-cris_softmmu_ss.add(files(
2333
+cris_system_ss = ss.source_set()
2334
+cris_system_ss.add(files(
2335
'helper.c',
2336
'machine.c',
2337
'mmu.c',
2338
))
2339
2340
target_arch += {'cris': cris_ss}
2341
-target_softmmu_arch += {'cris': cris_softmmu_ss}
2342
+target_softmmu_arch += {'cris': cris_system_ss}
2343
diff --git a/target/hppa/meson.build b/target/hppa/meson.build
2344
index XXXXXXX..XXXXXXX 100644
2345
--- a/target/hppa/meson.build
2346
+++ b/target/hppa/meson.build
2347
@@ -XXX,XX +XXX,XX @@ hppa_ss.add(files(
2348
'translate.c',
2349
))
2350
2351
-hppa_softmmu_ss = ss.source_set()
2352
-hppa_softmmu_ss.add(files(
2353
+hppa_system_ss = ss.source_set()
2354
+hppa_system_ss.add(files(
2355
'int_helper.c',
2356
'machine.c',
2357
'mem_helper.c',
2358
@@ -XXX,XX +XXX,XX @@ hppa_softmmu_ss.add(files(
2359
))
2360
2361
target_arch += {'hppa': hppa_ss}
2362
-target_softmmu_arch += {'hppa': hppa_softmmu_ss}
2363
+target_softmmu_arch += {'hppa': hppa_system_ss}
2364
diff --git a/target/i386/hax/meson.build b/target/i386/hax/meson.build
2365
index XXXXXXX..XXXXXXX 100644
2366
--- a/target/i386/hax/meson.build
2367
+++ b/target/i386/hax/meson.build
2368
@@ -XXX,XX +XXX,XX @@
2369
-i386_softmmu_ss.add(when: 'CONFIG_HAX', if_true: files(
2370
+i386_system_ss.add(when: 'CONFIG_HAX', if_true: files(
2371
'hax-all.c',
2372
'hax-mem.c',
2373
'hax-accel-ops.c',
2374
))
2375
-i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_POSIX'], if_true: files('hax-posix.c'))
2376
-i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_WIN32'], if_true: files('hax-windows.c'))
2377
+i386_system_ss.add(when: ['CONFIG_HAX', 'CONFIG_POSIX'], if_true: files('hax-posix.c'))
2378
+i386_system_ss.add(when: ['CONFIG_HAX', 'CONFIG_WIN32'], if_true: files('hax-windows.c'))
2379
diff --git a/target/i386/hvf/meson.build b/target/i386/hvf/meson.build
2380
index XXXXXXX..XXXXXXX 100644
2381
--- a/target/i386/hvf/meson.build
2382
+++ b/target/i386/hvf/meson.build
2383
@@ -XXX,XX +XXX,XX @@
2384
-i386_softmmu_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files(
2385
+i386_system_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files(
2386
'hvf.c',
2387
'x86.c',
2388
'x86_cpuid.c',
2389
diff --git a/target/i386/kvm/meson.build b/target/i386/kvm/meson.build
2390
index XXXXXXX..XXXXXXX 100644
2391
--- a/target/i386/kvm/meson.build
2392
+++ b/target/i386/kvm/meson.build
2393
@@ -XXX,XX +XXX,XX @@ i386_softmmu_kvm_ss.add(when: 'CONFIG_XEN_EMU', if_true: files('xen-emu.c'))
2394
2395
i386_softmmu_kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c'))
2396
2397
-i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))
2398
+i386_system_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))
2399
2400
-i386_softmmu_ss.add_all(when: 'CONFIG_KVM', if_true: i386_softmmu_kvm_ss)
2401
+i386_system_ss.add_all(when: 'CONFIG_KVM', if_true: i386_softmmu_kvm_ss)
2402
diff --git a/target/i386/meson.build b/target/i386/meson.build
2403
index XXXXXXX..XXXXXXX 100644
2404
--- a/target/i386/meson.build
2405
+++ b/target/i386/meson.build
2406
@@ -XXX,XX +XXX,XX @@ i386_ss.add(when: 'CONFIG_SEV', if_true: files('host-cpu.c'))
2407
i386_ss.add(when: 'CONFIG_KVM', if_true: files('host-cpu.c'))
2408
i386_ss.add(when: 'CONFIG_HVF', if_true: files('host-cpu.c'))
2409
2410
-i386_softmmu_ss = ss.source_set()
2411
-i386_softmmu_ss.add(files(
2412
+i386_system_ss = ss.source_set()
2413
+i386_system_ss.add(files(
2414
'arch_dump.c',
2415
'arch_memory_mapping.c',
2416
'machine.c',
2417
'monitor.c',
2418
'cpu-sysemu.c',
2419
))
2420
-i386_softmmu_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-sysemu-stub.c'))
2421
+i386_system_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-sysemu-stub.c'))
2422
2423
i386_user_ss = ss.source_set()
2424
2425
@@ -XXX,XX +XXX,XX @@ subdir('hvf')
2426
subdir('tcg')
2427
2428
target_arch += {'i386': i386_ss}
2429
-target_softmmu_arch += {'i386': i386_softmmu_ss}
2430
+target_softmmu_arch += {'i386': i386_system_ss}
2431
target_user_arch += {'i386': i386_user_ss}
2432
diff --git a/target/i386/nvmm/meson.build b/target/i386/nvmm/meson.build
2433
index XXXXXXX..XXXXXXX 100644
2434
--- a/target/i386/nvmm/meson.build
2435
+++ b/target/i386/nvmm/meson.build
2436
@@ -XXX,XX +XXX,XX @@
2437
-i386_softmmu_ss.add(when: 'CONFIG_NVMM', if_true:
2438
+i386_system_ss.add(when: 'CONFIG_NVMM', if_true:
2439
files(
2440
'nvmm-all.c',
2441
'nvmm-accel-ops.c',
2442
)
2443
)
2444
2445
-i386_softmmu_ss.add(when: 'CONFIG_NVMM', if_true: nvmm)
2446
+i386_system_ss.add(when: 'CONFIG_NVMM', if_true: nvmm)
2447
diff --git a/target/i386/tcg/sysemu/meson.build b/target/i386/tcg/sysemu/meson.build
2448
index XXXXXXX..XXXXXXX 100644
2449
--- a/target/i386/tcg/sysemu/meson.build
2450
+++ b/target/i386/tcg/sysemu/meson.build
2451
@@ -XXX,XX +XXX,XX @@
2452
-i386_softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_SYSTEM_ONLY'], if_true: files(
2453
+i386_system_ss.add(when: ['CONFIG_TCG', 'CONFIG_SYSTEM_ONLY'], if_true: files(
2454
'tcg-cpu.c',
2455
'smm_helper.c',
2456
'excp_helper.c',
2457
diff --git a/target/i386/whpx/meson.build b/target/i386/whpx/meson.build
2458
index XXXXXXX..XXXXXXX 100644
2459
--- a/target/i386/whpx/meson.build
2460
+++ b/target/i386/whpx/meson.build
2461
@@ -XXX,XX +XXX,XX @@
2462
-i386_softmmu_ss.add(when: 'CONFIG_WHPX', if_true: files(
2463
+i386_system_ss.add(when: 'CONFIG_WHPX', if_true: files(
2464
'whpx-all.c',
2465
'whpx-apic.c',
2466
'whpx-accel-ops.c',
2467
diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build
2468
index XXXXXXX..XXXXXXX 100644
2469
--- a/target/loongarch/meson.build
2470
+++ b/target/loongarch/meson.build
2471
@@ -XXX,XX +XXX,XX @@ loongarch_tcg_ss.add(files(
2472
))
2473
loongarch_tcg_ss.add(zlib)
2474
2475
-loongarch_softmmu_ss = ss.source_set()
2476
-loongarch_softmmu_ss.add(files(
2477
+loongarch_system_ss = ss.source_set()
2478
+loongarch_system_ss.add(files(
2479
'loongarch-qmp-cmds.c',
2480
'machine.c',
2481
'tlb_helper.c',
2482
@@ -XXX,XX +XXX,XX @@ common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
2483
loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
2484
2485
target_arch += {'loongarch': loongarch_ss}
2486
-target_softmmu_arch += {'loongarch': loongarch_softmmu_ss}
2487
+target_softmmu_arch += {'loongarch': loongarch_system_ss}
2488
diff --git a/target/m68k/meson.build b/target/m68k/meson.build
2489
index XXXXXXX..XXXXXXX 100644
2490
--- a/target/m68k/meson.build
2491
+++ b/target/m68k/meson.build
2492
@@ -XXX,XX +XXX,XX @@ m68k_ss.add(files(
2493
'translate.c',
2494
))
2495
2496
-m68k_softmmu_ss = ss.source_set()
2497
-m68k_softmmu_ss.add(files(
2498
+m68k_system_ss = ss.source_set()
2499
+m68k_system_ss.add(files(
2500
'm68k-semi.c',
2501
'monitor.c'
2502
))
2503
2504
target_arch += {'m68k': m68k_ss}
2505
-target_softmmu_arch += {'m68k': m68k_softmmu_ss}
2506
+target_softmmu_arch += {'m68k': m68k_system_ss}
2507
diff --git a/target/microblaze/meson.build b/target/microblaze/meson.build
2508
index XXXXXXX..XXXXXXX 100644
2509
--- a/target/microblaze/meson.build
2510
+++ b/target/microblaze/meson.build
2511
@@ -XXX,XX +XXX,XX @@ microblaze_ss.add(files(
2512
'translate.c',
2513
))
2514
2515
-microblaze_softmmu_ss = ss.source_set()
2516
-microblaze_softmmu_ss.add(files(
2517
+microblaze_system_ss = ss.source_set()
2518
+microblaze_system_ss.add(files(
2519
'mmu.c',
2520
'machine.c',
2521
))
2522
2523
target_arch += {'microblaze': microblaze_ss}
2524
-target_softmmu_arch += {'microblaze': microblaze_softmmu_ss}
2525
+target_softmmu_arch += {'microblaze': microblaze_system_ss}
2526
diff --git a/target/mips/meson.build b/target/mips/meson.build
2527
index XXXXXXX..XXXXXXX 100644
2528
--- a/target/mips/meson.build
2529
+++ b/target/mips/meson.build
2530
@@ -XXX,XX +XXX,XX @@
2531
mips_user_ss = ss.source_set()
2532
-mips_softmmu_ss = ss.source_set()
2533
+mips_system_ss = ss.source_set()
2534
mips_ss = ss.source_set()
2535
mips_ss.add(files(
2536
'cpu.c',
2537
@@ -XXX,XX +XXX,XX @@ endif
2538
mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
2539
2540
target_arch += {'mips': mips_ss}
2541
-target_softmmu_arch += {'mips': mips_softmmu_ss}
2542
+target_softmmu_arch += {'mips': mips_system_ss}
2543
target_user_arch += {'mips': mips_user_ss}
2544
diff --git a/target/mips/sysemu/meson.build b/target/mips/sysemu/meson.build
2545
index XXXXXXX..XXXXXXX 100644
2546
--- a/target/mips/sysemu/meson.build
2547
+++ b/target/mips/sysemu/meson.build
2548
@@ -XXX,XX +XXX,XX @@
2549
-mips_softmmu_ss.add(files(
2550
+mips_system_ss.add(files(
2551
'addr.c',
2552
'cp0.c',
2553
'cp0_timer.c',
2554
diff --git a/target/mips/tcg/sysemu/meson.build b/target/mips/tcg/sysemu/meson.build
2555
index XXXXXXX..XXXXXXX 100644
2556
--- a/target/mips/tcg/sysemu/meson.build
2557
+++ b/target/mips/tcg/sysemu/meson.build
2558
@@ -XXX,XX +XXX,XX @@
2559
-mips_softmmu_ss.add(files(
2560
+mips_system_ss.add(files(
2561
'cp0_helper.c',
2562
'mips-semi.c',
2563
'special_helper.c',
2564
diff --git a/target/nios2/meson.build b/target/nios2/meson.build
2565
index XXXXXXX..XXXXXXX 100644
2566
--- a/target/nios2/meson.build
2567
+++ b/target/nios2/meson.build
2568
@@ -XXX,XX +XXX,XX @@ nios2_ss.add(files(
2569
'translate.c',
2570
))
2571
2572
-nios2_softmmu_ss = ss.source_set()
2573
-nios2_softmmu_ss.add(files(
2574
+nios2_system_ss = ss.source_set()
2575
+nios2_system_ss.add(files(
2576
'helper.c',
2577
'monitor.c',
2578
'mmu.c',
2579
@@ -XXX,XX +XXX,XX @@ nios2_softmmu_ss.add(files(
2580
))
2581
2582
target_arch += {'nios2': nios2_ss}
2583
-target_softmmu_arch += {'nios2': nios2_softmmu_ss}
2584
+target_softmmu_arch += {'nios2': nios2_system_ss}
2585
diff --git a/target/openrisc/meson.build b/target/openrisc/meson.build
2586
index XXXXXXX..XXXXXXX 100644
2587
--- a/target/openrisc/meson.build
2588
+++ b/target/openrisc/meson.build
2589
@@ -XXX,XX +XXX,XX @@ openrisc_ss.add(files(
2590
'translate.c',
2591
))
2592
2593
-openrisc_softmmu_ss = ss.source_set()
2594
-openrisc_softmmu_ss.add(files(
2595
+openrisc_system_ss = ss.source_set()
2596
+openrisc_system_ss.add(files(
2597
'interrupt.c',
2598
'machine.c',
2599
'mmu.c',
2600
))
2601
2602
target_arch += {'openrisc': openrisc_ss}
2603
-target_softmmu_arch += {'openrisc': openrisc_softmmu_ss}
2604
+target_softmmu_arch += {'openrisc': openrisc_system_ss}
2605
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
2606
index XXXXXXX..XXXXXXX 100644
2607
--- a/target/ppc/meson.build
2608
+++ b/target/ppc/meson.build
2609
@@ -XXX,XX +XXX,XX @@ ppc_ss.add(gen)
2610
ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
2611
ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c'))
2612
2613
-ppc_softmmu_ss = ss.source_set()
2614
-ppc_softmmu_ss.add(files(
2615
+ppc_system_ss = ss.source_set()
2616
+ppc_system_ss.add(files(
2617
'arch_dump.c',
2618
'machine.c',
2619
'mmu-hash32.c',
2620
'mmu_common.c',
2621
'ppc-qmp-cmds.c',
2622
))
2623
-ppc_softmmu_ss.add(when: 'CONFIG_TCG', if_true: files(
2624
+ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files(
2625
'mmu_helper.c',
2626
), if_false: files(
2627
'tcg-stub.c',
2628
))
2629
2630
-ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files(
2631
+ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files(
2632
'compat.c',
2633
'mmu-book3s-v3.c',
2634
'mmu-hash64.c',
2635
@@ -XXX,XX +XXX,XX @@ ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files(
2636
))
2637
2638
target_arch += {'ppc': ppc_ss}
2639
-target_softmmu_arch += {'ppc': ppc_softmmu_ss}
2640
+target_softmmu_arch += {'ppc': ppc_system_ss}
2641
diff --git a/target/riscv/meson.build b/target/riscv/meson.build
2642
index XXXXXXX..XXXXXXX 100644
2643
--- a/target/riscv/meson.build
2644
+++ b/target/riscv/meson.build
2645
@@ -XXX,XX +XXX,XX @@ riscv_ss.add(files(
2646
))
2647
riscv_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
2648
2649
-riscv_softmmu_ss = ss.source_set()
2650
-riscv_softmmu_ss.add(files(
2651
+riscv_system_ss = ss.source_set()
2652
+riscv_system_ss.add(files(
2653
'arch_dump.c',
2654
'pmp.c',
2655
'debug.c',
2656
@@ -XXX,XX +XXX,XX @@ riscv_softmmu_ss.add(files(
2657
))
2658
2659
target_arch += {'riscv': riscv_ss}
2660
-target_softmmu_arch += {'riscv': riscv_softmmu_ss}
2661
+target_softmmu_arch += {'riscv': riscv_system_ss}
2662
diff --git a/target/s390x/kvm/meson.build b/target/s390x/kvm/meson.build
2663
index XXXXXXX..XXXXXXX 100644
2664
--- a/target/s390x/kvm/meson.build
2665
+++ b/target/s390x/kvm/meson.build
2666
@@ -XXX,XX +XXX,XX @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
2667
# - KVM is enabled
2668
# - the linker supports --s390-pgste
2669
if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste')
2670
- s390x_softmmu_ss.add(when: 'CONFIG_KVM',
2671
+ s390x_system_ss.add(when: 'CONFIG_KVM',
2672
if_true: declare_dependency(link_args: ['-Wl,--s390-pgste']))
2673
endif
2674
diff --git a/target/s390x/meson.build b/target/s390x/meson.build
2675
index XXXXXXX..XXXXXXX 100644
2676
--- a/target/s390x/meson.build
2677
+++ b/target/s390x/meson.build
2678
@@ -XXX,XX +XXX,XX @@ gen_features_h = custom_target('gen-features.h',
2679
2680
s390x_ss.add(gen_features_h)
2681
2682
-s390x_softmmu_ss = ss.source_set()
2683
-s390x_softmmu_ss.add(files(
2684
+s390x_system_ss = ss.source_set()
2685
+s390x_system_ss.add(files(
2686
'helper.c',
2687
'arch_dump.c',
2688
'diag.c',
2689
@@ -XXX,XX +XXX,XX @@ subdir('tcg')
2690
subdir('kvm')
2691
2692
target_arch += {'s390x': s390x_ss}
2693
-target_softmmu_arch += {'s390x': s390x_softmmu_ss}
2694
+target_softmmu_arch += {'s390x': s390x_system_ss}
2695
target_user_arch += {'s390x': s390x_user_ss}
2696
diff --git a/target/sh4/meson.build b/target/sh4/meson.build
2697
index XXXXXXX..XXXXXXX 100644
2698
--- a/target/sh4/meson.build
2699
+++ b/target/sh4/meson.build
2700
@@ -XXX,XX +XXX,XX @@ sh4_ss.add(files(
2701
'translate.c',
2702
))
2703
2704
-sh4_softmmu_ss = ss.source_set()
2705
-sh4_softmmu_ss.add(files('monitor.c'))
2706
+sh4_system_ss = ss.source_set()
2707
+sh4_system_ss.add(files('monitor.c'))
2708
2709
target_arch += {'sh4': sh4_ss}
2710
-target_softmmu_arch += {'sh4': sh4_softmmu_ss}
2711
+target_softmmu_arch += {'sh4': sh4_system_ss}
2712
diff --git a/target/sparc/meson.build b/target/sparc/meson.build
2713
index XXXXXXX..XXXXXXX 100644
2714
--- a/target/sparc/meson.build
2715
+++ b/target/sparc/meson.build
2716
@@ -XXX,XX +XXX,XX @@ sparc_ss.add(files(
2717
sparc_ss.add(when: 'TARGET_SPARC', if_true: files('int32_helper.c'))
2718
sparc_ss.add(when: 'TARGET_SPARC64', if_true: files('int64_helper.c', 'vis_helper.c'))
2719
2720
-sparc_softmmu_ss = ss.source_set()
2721
-sparc_softmmu_ss.add(files(
2722
+sparc_system_ss = ss.source_set()
2723
+sparc_system_ss.add(files(
2724
'machine.c',
2725
'mmu_helper.c',
2726
'monitor.c',
2727
))
2728
2729
target_arch += {'sparc': sparc_ss}
2730
-target_softmmu_arch += {'sparc': sparc_softmmu_ss}
2731
+target_softmmu_arch += {'sparc': sparc_system_ss}
2732
diff --git a/target/tricore/meson.build b/target/tricore/meson.build
2733
index XXXXXXX..XXXXXXX 100644
2734
--- a/target/tricore/meson.build
2735
+++ b/target/tricore/meson.build
2736
@@ -XXX,XX +XXX,XX @@ tricore_ss.add(files(
2737
))
2738
tricore_ss.add(zlib)
2739
2740
-tricore_softmmu_ss = ss.source_set()
2741
+tricore_system_ss = ss.source_set()
2742
2743
target_arch += {'tricore': tricore_ss}
2744
-target_softmmu_arch += {'tricore': tricore_softmmu_ss}
2745
+target_softmmu_arch += {'tricore': tricore_system_ss}
2746
diff --git a/target/xtensa/meson.build b/target/xtensa/meson.build
2747
index XXXXXXX..XXXXXXX 100644
2748
--- a/target/xtensa/meson.build
2749
+++ b/target/xtensa/meson.build
2750
@@ -XXX,XX +XXX,XX @@ xtensa_ss.add(files(
2751
'xtensa-isa.c',
2752
))
2753
2754
-xtensa_softmmu_ss = ss.source_set()
2755
-xtensa_softmmu_ss.add(files(
2756
+xtensa_system_ss = ss.source_set()
2757
+xtensa_system_ss.add(files(
2758
'dbg_helper.c',
2759
'mmu_helper.c',
2760
'monitor.c',
2761
@@ -XXX,XX +XXX,XX @@ xtensa_softmmu_ss.add(files(
2762
))
2763
2764
target_arch += {'xtensa': xtensa_ss}
2765
-target_softmmu_arch += {'xtensa': xtensa_softmmu_ss}
2766
+target_softmmu_arch += {'xtensa': xtensa_system_ss}
2767
diff --git a/tcg/meson.build b/tcg/meson.build
2768
index XXXXXXX..XXXXXXX 100644
2769
--- a/tcg/meson.build
2770
+++ b/tcg/meson.build
2771
@@ -XXX,XX +XXX,XX @@ libtcg_softmmu = static_library('tcg_softmmu',
2772
2773
tcg_softmmu = declare_dependency(link_with: libtcg_softmmu,
2774
dependencies: tcg_ss.dependencies())
2775
-softmmu_ss.add(tcg_softmmu)
2776
+system_ss.add(tcg_softmmu)
2777
diff --git a/trace/meson.build b/trace/meson.build
2778
index XXXXXXX..XXXXXXX 100644
2779
--- a/trace/meson.build
2780
+++ b/trace/meson.build
2781
@@ -XXX,XX +XXX,XX @@
2782
-softmmu_ss.add(files('trace-hmp-cmds.c'))
2783
+system_ss.add(files('trace-hmp-cmds.c'))
2784
2785
specific_ss.add(files('control-target.c'))
2786
2787
diff --git a/ui/meson.build b/ui/meson.build
2788
index XXXXXXX..XXXXXXX 100644
2789
--- a/ui/meson.build
2790
+++ b/ui/meson.build
2791
@@ -XXX,XX +XXX,XX @@
2792
-softmmu_ss.add(pixman)
2793
+system_ss.add(pixman)
2794
specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: pixman) # for the include path
2795
specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: opengl) # for the include path
2796
2797
-softmmu_ss.add(png)
2798
-softmmu_ss.add(files(
2799
+system_ss.add(png)
2800
+system_ss.add(files(
2801
'clipboard.c',
2802
'console.c',
2803
'cursor.c',
2804
@@ -XXX,XX +XXX,XX @@ softmmu_ss.add(files(
2805
'util.c',
2806
))
2807
if dbus_display
2808
- softmmu_ss.add(files('dbus-module.c'))
2809
+ system_ss.add(files('dbus-module.c'))
2810
endif
2811
-softmmu_ss.add([spice_headers, files('spice-module.c')])
2812
-softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
2813
+system_ss.add([spice_headers, files('spice-module.c')])
2814
+system_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
2815
2816
-softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files(
2817
+system_ss.add(when: 'CONFIG_LINUX', if_true: files(
2818
'input-linux.c',
2819
'udmabuf.c',
2820
))
2821
-softmmu_ss.add(when: cocoa, if_true: files('cocoa.m'))
2822
+system_ss.add(when: cocoa, if_true: files('cocoa.m'))
2823
2824
vnc_ss = ss.source_set()
2825
vnc_ss.add(files(
2826
@@ -XXX,XX +XXX,XX @@ vnc_ss.add(files(
2827
))
2828
vnc_ss.add(zlib, jpeg, gnutls)
2829
vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
2830
-softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
2831
-softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
2832
+system_ss.add_all(when: vnc, if_true: vnc_ss)
2833
+system_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
2834
2835
ui_modules = {}
2836
2837
@@ -XXX,XX +XXX,XX @@ if curses.found()
2838
ui_modules += {'curses' : curses_ss}
2839
endif
2840
2841
-softmmu_ss.add(opengl)
2842
+system_ss.add(opengl)
2843
if opengl.found()
2844
opengl_ss = ss.source_set()
2845
opengl_ss.add(gbm)
2846
@@ -XXX,XX +XXX,XX @@ if dbus_display
2847
endif
2848
2849
if gtk.found()
2850
- softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
2851
+ system_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
2852
2853
gtk_ss = ss.source_set()
2854
gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
2855
@@ -XXX,XX +XXX,XX @@ if gtk.found()
2856
endif
2857
2858
if sdl.found()
2859
- softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
2860
+ system_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
2861
2862
sdl_ss = ss.source_set()
2863
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
113
--
2864
--
114
2.25.1
2865
2.34.1
115
2866
116
2867
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
3
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
4
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5
Message-Id: <20210517105140.1062037-5-f4bug@amsat.org>
5
Message-Id: <20230611085846.21415-2-philmd@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
---
7
---
8
hw/core/cpu.c | 1 -
8
plugins/core.c | 1 -
9
1 file changed, 1 deletion(-)
9
1 file changed, 1 deletion(-)
10
10
11
diff --git a/hw/core/cpu.c b/hw/core/cpu.c
11
diff --git a/plugins/core.c b/plugins/core.c
12
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
13
--- a/hw/core/cpu.c
13
--- a/plugins/core.c
14
+++ b/hw/core/cpu.c
14
+++ b/plugins/core.c
15
@@ -XXX,XX +XXX,XX @@
15
@@ -XXX,XX +XXX,XX @@
16
#include "hw/qdev-properties.h"
16
17
#include "trace/trace-root.h"
17
#include "exec/exec-all.h"
18
#include "qemu/plugin.h"
18
#include "exec/tb-flush.h"
19
-#include "sysemu/hw_accel.h"
19
-#include "exec/helper-proto.h"
20
20
#include "tcg/tcg.h"
21
CPUState *cpu_by_arch_id(int64_t id)
21
#include "tcg/tcg-op.h"
22
{
22
#include "plugin.h"
23
--
23
--
24
2.25.1
24
2.34.1
25
25
26
26
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Only 2 headers require "exec/tb-context.h". Instead of having
3
We only need lookup_tb_ptr() prototype.
4
all files including "exec/exec-all.h" also including it, directly
5
include it where it is required:
6
- accel/tcg/cpu-exec.c
7
- accel/tcg/translate-all.c
8
4
9
For plugins/plugin.h, we were implicitly relying on
5
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
10
exec/exec-all.h -> exec/tb-context.h -> qemu/qht.h
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
11
which is now included directly.
7
Message-Id: <20230611085846.21415-3-philmd@linaro.org>
12
13
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
14
Message-Id: <20210524170453.3791436-2-f4bug@amsat.org>
15
[rth: Fix plugins/plugin.h compilation]
16
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
17
---
9
---
18
include/exec/exec-all.h | 1 -
10
accel/tcg/cpu-exec.c | 2 +-
19
include/tcg/tcg.h | 1 -
11
1 file changed, 1 insertion(+), 1 deletion(-)
20
plugins/plugin.h | 1 +
21
accel/tcg/cpu-exec.c | 1 +
22
accel/tcg/translate-all.c | 1 +
23
5 files changed, 3 insertions(+), 2 deletions(-)
24
12
25
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
26
index XXXXXXX..XXXXXXX 100644
27
--- a/include/exec/exec-all.h
28
+++ b/include/exec/exec-all.h
29
@@ -XXX,XX +XXX,XX @@
30
#define EXEC_ALL_H
31
32
#include "cpu.h"
33
-#include "exec/tb-context.h"
34
#ifdef CONFIG_TCG
35
#include "exec/cpu_ldst.h"
36
#endif
37
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
38
index XXXXXXX..XXXXXXX 100644
39
--- a/include/tcg/tcg.h
40
+++ b/include/tcg/tcg.h
41
@@ -XXX,XX +XXX,XX @@
42
43
#include "cpu.h"
44
#include "exec/memop.h"
45
-#include "exec/tb-context.h"
46
#include "qemu/bitops.h"
47
#include "qemu/plugin.h"
48
#include "qemu/queue.h"
49
diff --git a/plugins/plugin.h b/plugins/plugin.h
50
index XXXXXXX..XXXXXXX 100644
51
--- a/plugins/plugin.h
52
+++ b/plugins/plugin.h
53
@@ -XXX,XX +XXX,XX @@
54
#define _PLUGIN_INTERNAL_H_
55
56
#include <gmodule.h>
57
+#include "qemu/qht.h"
58
59
#define QEMU_PLUGIN_MIN_VERSION 0
60
61
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
13
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
62
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
63
--- a/accel/tcg/cpu-exec.c
15
--- a/accel/tcg/cpu-exec.c
64
+++ b/accel/tcg/cpu-exec.c
16
+++ b/accel/tcg/cpu-exec.c
65
@@ -XXX,XX +XXX,XX @@
17
@@ -XXX,XX +XXX,XX @@
66
#include "qemu/rcu.h"
18
#include "sysemu/cpu-timers.h"
67
#include "exec/tb-hash.h"
19
#include "exec/replay-core.h"
68
#include "exec/tb-lookup.h"
20
#include "sysemu/tcg.h"
69
+#include "exec/tb-context.h"
21
-#include "exec/helper-proto.h"
70
#include "exec/log.h"
22
+#include "exec/helper-proto-common.h"
71
#include "qemu/main-loop.h"
23
#include "tb-jmp-cache.h"
72
#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
24
#include "tb-hash.h"
73
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
25
#include "tb-context.h"
74
index XXXXXXX..XXXXXXX 100644
75
--- a/accel/tcg/translate-all.c
76
+++ b/accel/tcg/translate-all.c
77
@@ -XXX,XX +XXX,XX @@
78
79
#include "exec/cputlb.h"
80
#include "exec/tb-hash.h"
81
+#include "exec/tb-context.h"
82
#include "exec/translate-all.h"
83
#include "qemu/bitmap.h"
84
#include "qemu/error-report.h"
85
--
26
--
86
2.25.1
27
2.34.1
87
28
88
29
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Use uint8_t for (unsigned) byte, and uint16_t for (unsigned)
3
We want to check the softmmu tlb availability, not
4
16-bit word.
4
if we are targetting system emulation. Besides, this
5
code could be used by user emulation in the future.
5
6
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7
Message-Id: <20210518183655.1711377-5-philmd@redhat.com>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
9
Message-Id: <20230605230216.17202-1-philmd@linaro.org>
8
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
---
11
---
10
include/exec/memory_ldst_phys.h.inc | 16 ++++++++--------
12
include/exec/cpu-defs.h | 12 ++++++------
11
1 file changed, 8 insertions(+), 8 deletions(-)
13
1 file changed, 6 insertions(+), 6 deletions(-)
12
14
13
diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst_phys.h.inc
15
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
14
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
15
--- a/include/exec/memory_ldst_phys.h.inc
17
--- a/include/exec/cpu-defs.h
16
+++ b/include/exec/memory_ldst_phys.h.inc
18
+++ b/include/exec/cpu-defs.h
17
@@ -XXX,XX +XXX,XX @@
19
@@ -XXX,XX +XXX,XX @@
18
*/
20
*/
19
21
#define NB_MMU_MODES 16
20
#ifdef TARGET_ENDIANNESS
22
21
-static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
23
-#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
22
+static inline uint16_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
24
+#if defined(CONFIG_SOFTMMU) && defined(CONFIG_TCG)
23
{
25
#include "exec/tlb-common.h"
24
return glue(address_space_lduw, SUFFIX)(ARG1, addr,
26
25
MEMTXATTRS_UNSPECIFIED, NULL);
27
/* use a fully associative victim tlb of 8 entries */
26
@@ -XXX,XX +XXX,XX @@ static inline uint64_t glue(ldq_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
28
@@ -XXX,XX +XXX,XX @@
27
MEMTXATTRS_UNSPECIFIED, NULL);
29
# endif
28
}
30
# endif
29
31
30
-static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
32
-#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
31
+static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint16_t val)
33
+#endif /* CONFIG_SOFTMMU && CONFIG_TCG */
32
{
34
33
glue(address_space_stw, SUFFIX)(ARG1, addr, val,
35
-#if !defined(CONFIG_USER_ONLY)
34
MEMTXATTRS_UNSPECIFIED, NULL);
36
+#if defined(CONFIG_SOFTMMU)
35
@@ -XXX,XX +XXX,XX @@ static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val)
37
/*
36
MEMTXATTRS_UNSPECIFIED, NULL);
38
* The full TLB entry, which is not accessed by generated TCG code,
37
}
39
* so the layout is not as critical as that of CPUTLBEntry. This is
38
#else
40
@@ -XXX,XX +XXX,XX @@ typedef struct CPUTLBEntryFull {
39
-static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
41
TARGET_PAGE_ENTRY_EXTRA
40
+static inline uint8_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
42
#endif
41
{
43
} CPUTLBEntryFull;
42
return glue(address_space_ldub, SUFFIX)(ARG1, addr,
44
-#endif /* !CONFIG_USER_ONLY */
43
MEMTXATTRS_UNSPECIFIED, NULL);
45
+#endif /* CONFIG_SOFTMMU */
44
}
46
45
47
-#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
46
-static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
48
+#if defined(CONFIG_SOFTMMU) && defined(CONFIG_TCG)
47
+static inline uint16_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
49
/*
48
{
50
* Data elements that are per MMU mode, minus the bits accessed by
49
return glue(address_space_lduw_le, SUFFIX)(ARG1, addr,
51
* the TCG fast path.
50
MEMTXATTRS_UNSPECIFIED, NULL);
52
@@ -XXX,XX +XXX,XX @@ typedef struct CPUTLB {
51
}
53
52
54
typedef struct CPUTLB { } CPUTLB;
53
-static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
55
54
+static inline uint16_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
56
-#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
55
{
57
+#endif /* CONFIG_SOFTMMU && CONFIG_TCG */
56
return glue(address_space_lduw_be, SUFFIX)(ARG1, addr,
58
57
MEMTXATTRS_UNSPECIFIED, NULL);
59
/*
58
@@ -XXX,XX +XXX,XX @@ static inline uint64_t glue(ldq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
60
* This structure must be placed in ArchCPU immediately
59
MEMTXATTRS_UNSPECIFIED, NULL);
60
}
61
62
-static inline void glue(stb_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
63
+static inline void glue(stb_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint8_t val)
64
{
65
glue(address_space_stb, SUFFIX)(ARG1, addr, val,
66
MEMTXATTRS_UNSPECIFIED, NULL);
67
}
68
69
-static inline void glue(stw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
70
+static inline void glue(stw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint16_t val)
71
{
72
glue(address_space_stw_le, SUFFIX)(ARG1, addr, val,
73
MEMTXATTRS_UNSPECIFIED, NULL);
74
}
75
76
-static inline void glue(stw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val)
77
+static inline void glue(stw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint16_t val)
78
{
79
glue(address_space_stw_be, SUFFIX)(ARG1, addr, val,
80
MEMTXATTRS_UNSPECIFIED, NULL);
81
--
61
--
82
2.25.1
62
2.34.1
83
63
84
64
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
Use uint16_t for (unsigned) 16-bit word.
4
5
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
6
Message-Id: <20210518183655.1711377-6-philmd@redhat.com>
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8
---
9
include/exec/memory_ldst_cached.h.inc | 4 ++--
10
1 file changed, 2 insertions(+), 2 deletions(-)
11
12
diff --git a/include/exec/memory_ldst_cached.h.inc b/include/exec/memory_ldst_cached.h.inc
13
index XXXXXXX..XXXXXXX 100644
14
--- a/include/exec/memory_ldst_cached.h.inc
15
+++ b/include/exec/memory_ldst_cached.h.inc
16
@@ -XXX,XX +XXX,XX @@
17
#define LD_P(size) \
18
glue(glue(ld, size), glue(ENDIANNESS, _p))
19
20
-static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
21
+static inline uint16_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
22
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
23
{
24
assert(addr < cache->len && 2 <= cache->len - addr);
25
@@ -XXX,XX +XXX,XX @@ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryRegionCache *cache,
26
glue(glue(st, size), glue(ENDIANNESS, _p))
27
28
static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache,
29
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
30
+ hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
31
{
32
assert(addr < cache->len && 2 <= cache->len - addr);
33
if (likely(cache->ptr)) {
34
--
35
2.25.1
36
37
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
Use uint8_t for (unsigned) byte.
4
5
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
6
Message-Id: <20210518183655.1711377-7-philmd@redhat.com>
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8
---
9
include/exec/memory.h | 2 +-
10
1 file changed, 1 insertion(+), 1 deletion(-)
11
12
diff --git a/include/exec/memory.h b/include/exec/memory.h
13
index XXXXXXX..XXXXXXX 100644
14
--- a/include/exec/memory.h
15
+++ b/include/exec/memory.h
16
@@ -XXX,XX +XXX,XX @@ static inline uint8_t address_space_ldub_cached(MemoryRegionCache *cache,
17
}
18
19
static inline void address_space_stb_cached(MemoryRegionCache *cache,
20
- hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
21
+ hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result)
22
{
23
assert(addr < cache->len);
24
if (likely(cache->ptr)) {
25
--
26
2.25.1
27
28
diff view generated by jsdifflib
Deleted patch
1
From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
2
1
3
This patch enables reverse debugging with watchpoints.
4
Reverse continue scans the execution to find the breakpoints
5
and watchpoints that should fire. It uses helper function
6
replay_breakpoint() for that. But this function needs to access
7
icount, which can't be correct in the middle of TB.
8
Therefore, in case of watchpoint, we have to retranslate the block
9
to allow this access.
10
11
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
12
Message-Id: <162072430303.827403.7379783546934958566.stgit@pasha-ThinkPad-X280>
13
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
14
---
15
softmmu/physmem.c | 10 ++++++++++
16
1 file changed, 10 insertions(+)
17
18
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
19
index XXXXXXX..XXXXXXX 100644
20
--- a/softmmu/physmem.c
21
+++ b/softmmu/physmem.c
22
@@ -XXX,XX +XXX,XX @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
23
if (watchpoint_address_matches(wp, addr, len)
24
&& (wp->flags & flags)) {
25
if (replay_running_debug()) {
26
+ /*
27
+ * replay_breakpoint reads icount.
28
+ * Force recompile to succeed, because icount may
29
+ * be read only at the end of the block.
30
+ */
31
+ if (!cpu->can_do_io) {
32
+ /* Force execution of one insn next time. */
33
+ cpu->cflags_next_tb = 1 | CF_LAST_IO | curr_cflags(cpu);
34
+ cpu_loop_exit_restore(cpu, ra);
35
+ }
36
/*
37
* Don't process the watchpoints when we are
38
* in a reverse debugging operation.
39
--
40
2.25.1
41
42
diff view generated by jsdifflib
Deleted patch
1
From: Yasuo Kuwahara <kwhr00@gmail.com>
2
1
3
The last argument of tcg_out_extr() must be in the range 0-31 if ext==0.
4
Before the fix, when m==0 it becomes 32 and it crashes with an Illegal
5
instruction on Apple Silicon. After the fix, it will be 0. If m is in
6
the range 1-31, it is the same as before.
7
8
Signed-off-by: Yasuo Kuwahara <kwhr00@gmail.com>
9
Message-Id: <CAHfJ0vSXnmnTLmT0kR=a8ACRdw_UsLYOhStzUzgVEHoH8U-7sA@mail.gmail.com>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
---
12
tcg/aarch64/tcg-target.c.inc | 5 ++---
13
1 file changed, 2 insertions(+), 3 deletions(-)
14
15
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
16
index XXXXXXX..XXXXXXX 100644
17
--- a/tcg/aarch64/tcg-target.c.inc
18
+++ b/tcg/aarch64/tcg-target.c.inc
19
@@ -XXX,XX +XXX,XX @@ static inline void tcg_out_rotr(TCGContext *s, TCGType ext,
20
static inline void tcg_out_rotl(TCGContext *s, TCGType ext,
21
TCGReg rd, TCGReg rn, unsigned int m)
22
{
23
- int bits = ext ? 64 : 32;
24
- int max = bits - 1;
25
- tcg_out_extr(s, ext, rd, rn, rn, bits - (m & max));
26
+ int max = ext ? 63 : 31;
27
+ tcg_out_extr(s, ext, rd, rn, rn, -m & max);
28
}
29
30
static inline void tcg_out_dep(TCGContext *s, TCGType ext, TCGReg rd,
31
--
32
2.25.1
33
34
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
To be able to later extract the cpu_get_phys_page_debug() and
4
cpu_asidx_from_attrs() handlers from CPUClass, un-inline them
5
from "hw/core/cpu.h".
6
7
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
8
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
9
Message-Id: <20210517105140.1062037-7-f4bug@amsat.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
---
12
include/hw/core/cpu.h | 33 ++++-----------------------------
13
hw/core/cpu-sysemu.c | 32 ++++++++++++++++++++++++++++++++
14
2 files changed, 36 insertions(+), 29 deletions(-)
15
16
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
17
index XXXXXXX..XXXXXXX 100644
18
--- a/include/hw/core/cpu.h
19
+++ b/include/hw/core/cpu.h
20
@@ -XXX,XX +XXX,XX @@ void cpu_dump_statistics(CPUState *cpu, int flags);
21
*
22
* Returns: Corresponding physical page address or -1 if no page found.
23
*/
24
-static inline hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
25
- MemTxAttrs *attrs)
26
-{
27
- CPUClass *cc = CPU_GET_CLASS(cpu);
28
-
29
- if (cc->get_phys_page_attrs_debug) {
30
- return cc->get_phys_page_attrs_debug(cpu, addr, attrs);
31
- }
32
- /* Fallback for CPUs which don't implement the _attrs_ hook */
33
- *attrs = MEMTXATTRS_UNSPECIFIED;
34
- return cc->get_phys_page_debug(cpu, addr);
35
-}
36
+hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
37
+ MemTxAttrs *attrs);
38
39
/**
40
* cpu_get_phys_page_debug:
41
@@ -XXX,XX +XXX,XX @@ static inline hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
42
*
43
* Returns: Corresponding physical page address or -1 if no page found.
44
*/
45
-static inline hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
46
-{
47
- MemTxAttrs attrs = {};
48
-
49
- return cpu_get_phys_page_attrs_debug(cpu, addr, &attrs);
50
-}
51
+hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
52
53
/** cpu_asidx_from_attrs:
54
* @cpu: CPU
55
@@ -XXX,XX +XXX,XX @@ static inline hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
56
* Returns the address space index specifying the CPU AddressSpace
57
* to use for a memory access with the given transaction attributes.
58
*/
59
-static inline int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
60
-{
61
- CPUClass *cc = CPU_GET_CLASS(cpu);
62
- int ret = 0;
63
-
64
- if (cc->asidx_from_attrs) {
65
- ret = cc->asidx_from_attrs(cpu, attrs);
66
- assert(ret < cpu->num_ases && ret >= 0);
67
- }
68
- return ret;
69
-}
70
+int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs);
71
72
#endif /* CONFIG_USER_ONLY */
73
74
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
75
index XXXXXXX..XXXXXXX 100644
76
--- a/hw/core/cpu-sysemu.c
77
+++ b/hw/core/cpu-sysemu.c
78
@@ -XXX,XX +XXX,XX @@
79
#include "qapi/error.h"
80
#include "hw/core/cpu.h"
81
82
+hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
83
+ MemTxAttrs *attrs)
84
+{
85
+ CPUClass *cc = CPU_GET_CLASS(cpu);
86
+
87
+ if (cc->get_phys_page_attrs_debug) {
88
+ return cc->get_phys_page_attrs_debug(cpu, addr, attrs);
89
+ }
90
+ /* Fallback for CPUs which don't implement the _attrs_ hook */
91
+ *attrs = MEMTXATTRS_UNSPECIFIED;
92
+ return cc->get_phys_page_debug(cpu, addr);
93
+}
94
+
95
+hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
96
+{
97
+ MemTxAttrs attrs = {};
98
+
99
+ return cpu_get_phys_page_attrs_debug(cpu, addr, &attrs);
100
+}
101
+
102
+int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
103
+{
104
+ CPUClass *cc = CPU_GET_CLASS(cpu);
105
+ int ret = 0;
106
+
107
+ if (cc->asidx_from_attrs) {
108
+ ret = cc->asidx_from_attrs(cpu, attrs);
109
+ assert(ret < cpu->num_ases && ret >= 0);
110
+ }
111
+ return ret;
112
+}
113
+
114
GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
115
{
116
CPUClass *cc = CPU_GET_CLASS(cpu);
117
--
118
2.25.1
119
120
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
Introduce the cpu_virtio_is_big_endian() generic helper to avoid
4
calling CPUClass internal virtio_is_big_endian() one.
5
6
Similarly to commit bf7663c4bd8 ("cpu: introduce
7
CPUClass::virtio_is_big_endian()"), we keep 'virtio' in the method
8
name to hint this handler shouldn't be called anywhere but from the
9
virtio code.
10
11
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
12
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
13
Message-Id: <20210517105140.1062037-8-f4bug@amsat.org>
14
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
15
---
16
include/hw/core/cpu.h | 9 +++++++++
17
hw/core/cpu-common.c | 6 ------
18
hw/core/cpu-sysemu.c | 10 ++++++++++
19
hw/virtio/virtio.c | 4 +---
20
4 files changed, 20 insertions(+), 9 deletions(-)
21
22
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
23
index XXXXXXX..XXXXXXX 100644
24
--- a/include/hw/core/cpu.h
25
+++ b/include/hw/core/cpu.h
26
@@ -XXX,XX +XXX,XX @@ hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
27
*/
28
int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs);
29
30
+/**
31
+ * cpu_virtio_is_big_endian:
32
+ * @cpu: CPU
33
+
34
+ * Returns %true if a CPU which supports runtime configurable endianness
35
+ * is currently big-endian.
36
+ */
37
+bool cpu_virtio_is_big_endian(CPUState *cpu);
38
+
39
#endif /* CONFIG_USER_ONLY */
40
41
/**
42
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
43
index XXXXXXX..XXXXXXX 100644
44
--- a/hw/core/cpu-common.c
45
+++ b/hw/core/cpu-common.c
46
@@ -XXX,XX +XXX,XX @@ static int cpu_common_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg)
47
return 0;
48
}
49
50
-static bool cpu_common_virtio_is_big_endian(CPUState *cpu)
51
-{
52
- return target_words_bigendian();
53
-}
54
-
55
void cpu_dump_state(CPUState *cpu, FILE *f, int flags)
56
{
57
CPUClass *cc = CPU_GET_CLASS(cpu);
58
@@ -XXX,XX +XXX,XX @@ static void cpu_class_init(ObjectClass *klass, void *data)
59
k->write_elf64_note = cpu_common_write_elf64_note;
60
k->gdb_read_register = cpu_common_gdb_read_register;
61
k->gdb_write_register = cpu_common_gdb_write_register;
62
- k->virtio_is_big_endian = cpu_common_virtio_is_big_endian;
63
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
64
dc->realize = cpu_common_realizefn;
65
dc->unrealize = cpu_common_unrealizefn;
66
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
67
index XXXXXXX..XXXXXXX 100644
68
--- a/hw/core/cpu-sysemu.c
69
+++ b/hw/core/cpu-sysemu.c
70
@@ -XXX,XX +XXX,XX @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
71
return ret;
72
}
73
74
+bool cpu_virtio_is_big_endian(CPUState *cpu)
75
+{
76
+ CPUClass *cc = CPU_GET_CLASS(cpu);
77
+
78
+ if (cc->virtio_is_big_endian) {
79
+ return cc->virtio_is_big_endian(cpu);
80
+ }
81
+ return target_words_bigendian();
82
+}
83
+
84
GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
85
{
86
CPUClass *cc = CPU_GET_CLASS(cpu);
87
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
88
index XXXXXXX..XXXXXXX 100644
89
--- a/hw/virtio/virtio.c
90
+++ b/hw/virtio/virtio.c
91
@@ -XXX,XX +XXX,XX @@ static enum virtio_device_endian virtio_default_endian(void)
92
93
static enum virtio_device_endian virtio_current_cpu_endian(void)
94
{
95
- CPUClass *cc = CPU_GET_CLASS(current_cpu);
96
-
97
- if (cc->virtio_is_big_endian(current_cpu)) {
98
+ if (cpu_virtio_is_big_endian(current_cpu)) {
99
return VIRTIO_DEVICE_ENDIAN_BIG;
100
} else {
101
return VIRTIO_DEVICE_ENDIAN_LITTLE;
102
--
103
2.25.1
104
105
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
No code directly accesses CPUClass::write_elf*() handlers out
4
of hw/core/cpu.c (the rest are assignation in target/ code):
5
6
$ git grep -F -- '->write_elf'
7
hw/core/cpu.c:157: return (*cc->write_elf32_qemunote)(f, cpu, opaque);
8
hw/core/cpu.c:171: return (*cc->write_elf32_note)(f, cpu, cpuid, opaque);
9
hw/core/cpu.c:186: return (*cc->write_elf64_qemunote)(f, cpu, opaque);
10
hw/core/cpu.c:200: return (*cc->write_elf64_note)(f, cpu, cpuid, opaque);
11
hw/core/cpu.c:440: k->write_elf32_qemunote = cpu_common_write_elf32_qemunote;
12
hw/core/cpu.c:441: k->write_elf32_note = cpu_common_write_elf32_note;
13
hw/core/cpu.c:442: k->write_elf64_qemunote = cpu_common_write_elf64_qemunote;
14
hw/core/cpu.c:443: k->write_elf64_note = cpu_common_write_elf64_note;
15
target/arm/cpu.c:2304: cc->write_elf64_note = arm_cpu_write_elf64_note;
16
target/arm/cpu.c:2305: cc->write_elf32_note = arm_cpu_write_elf32_note;
17
target/i386/cpu.c:7425: cc->write_elf64_note = x86_cpu_write_elf64_note;
18
target/i386/cpu.c:7426: cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
19
target/i386/cpu.c:7427: cc->write_elf32_note = x86_cpu_write_elf32_note;
20
target/i386/cpu.c:7428: cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
21
target/ppc/translate_init.c.inc:10891: cc->write_elf64_note = ppc64_cpu_write_elf64_note;
22
target/ppc/translate_init.c.inc:10892: cc->write_elf32_note = ppc32_cpu_write_elf32_note;
23
target/s390x/cpu.c:522: cc->write_elf64_note = s390_cpu_write_elf64_note;
24
25
Check the handler presence in place and remove the common fallback code.
26
27
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
28
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
29
Message-Id: <20210517105140.1062037-9-f4bug@amsat.org>
30
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
31
---
32
hw/core/cpu-common.c | 63 --------------------------------------------
33
hw/core/cpu-sysemu.c | 44 +++++++++++++++++++++++++++++++
34
2 files changed, 44 insertions(+), 63 deletions(-)
35
36
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
37
index XXXXXXX..XXXXXXX 100644
38
--- a/hw/core/cpu-common.c
39
+++ b/hw/core/cpu-common.c
40
@@ -XXX,XX +XXX,XX @@ void cpu_exit(CPUState *cpu)
41
qatomic_set(&cpu->icount_decr_ptr->u16.high, -1);
42
}
43
44
-int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
45
- void *opaque)
46
-{
47
- CPUClass *cc = CPU_GET_CLASS(cpu);
48
-
49
- return (*cc->write_elf32_qemunote)(f, cpu, opaque);
50
-}
51
-
52
-static int cpu_common_write_elf32_qemunote(WriteCoreDumpFunction f,
53
- CPUState *cpu, void *opaque)
54
-{
55
- return 0;
56
-}
57
-
58
-int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu,
59
- int cpuid, void *opaque)
60
-{
61
- CPUClass *cc = CPU_GET_CLASS(cpu);
62
-
63
- return (*cc->write_elf32_note)(f, cpu, cpuid, opaque);
64
-}
65
-
66
-static int cpu_common_write_elf32_note(WriteCoreDumpFunction f,
67
- CPUState *cpu, int cpuid,
68
- void *opaque)
69
-{
70
- return -1;
71
-}
72
-
73
-int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
74
- void *opaque)
75
-{
76
- CPUClass *cc = CPU_GET_CLASS(cpu);
77
-
78
- return (*cc->write_elf64_qemunote)(f, cpu, opaque);
79
-}
80
-
81
-static int cpu_common_write_elf64_qemunote(WriteCoreDumpFunction f,
82
- CPUState *cpu, void *opaque)
83
-{
84
- return 0;
85
-}
86
-
87
-int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu,
88
- int cpuid, void *opaque)
89
-{
90
- CPUClass *cc = CPU_GET_CLASS(cpu);
91
-
92
- return (*cc->write_elf64_note)(f, cpu, cpuid, opaque);
93
-}
94
-
95
-static int cpu_common_write_elf64_note(WriteCoreDumpFunction f,
96
- CPUState *cpu, int cpuid,
97
- void *opaque)
98
-{
99
- return -1;
100
-}
101
-
102
-
103
static int cpu_common_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)
104
{
105
return 0;
106
@@ -XXX,XX +XXX,XX @@ static void cpu_class_init(ObjectClass *klass, void *data)
107
k->has_work = cpu_common_has_work;
108
k->get_paging_enabled = cpu_common_get_paging_enabled;
109
k->get_memory_mapping = cpu_common_get_memory_mapping;
110
- k->write_elf32_qemunote = cpu_common_write_elf32_qemunote;
111
- k->write_elf32_note = cpu_common_write_elf32_note;
112
- k->write_elf64_qemunote = cpu_common_write_elf64_qemunote;
113
- k->write_elf64_note = cpu_common_write_elf64_note;
114
k->gdb_read_register = cpu_common_gdb_read_register;
115
k->gdb_write_register = cpu_common_gdb_write_register;
116
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
117
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
118
index XXXXXXX..XXXXXXX 100644
119
--- a/hw/core/cpu-sysemu.c
120
+++ b/hw/core/cpu-sysemu.c
121
@@ -XXX,XX +XXX,XX @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
122
return ret;
123
}
124
125
+int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
126
+ void *opaque)
127
+{
128
+ CPUClass *cc = CPU_GET_CLASS(cpu);
129
+
130
+ if (!cc->write_elf32_qemunote) {
131
+ return 0;
132
+ }
133
+ return (*cc->write_elf32_qemunote)(f, cpu, opaque);
134
+}
135
+
136
+int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu,
137
+ int cpuid, void *opaque)
138
+{
139
+ CPUClass *cc = CPU_GET_CLASS(cpu);
140
+
141
+ if (!cc->write_elf32_note) {
142
+ return -1;
143
+ }
144
+ return (*cc->write_elf32_note)(f, cpu, cpuid, opaque);
145
+}
146
+
147
+int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
148
+ void *opaque)
149
+{
150
+ CPUClass *cc = CPU_GET_CLASS(cpu);
151
+
152
+ if (!cc->write_elf64_qemunote) {
153
+ return 0;
154
+ }
155
+ return (*cc->write_elf64_qemunote)(f, cpu, opaque);
156
+}
157
+
158
+int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu,
159
+ int cpuid, void *opaque)
160
+{
161
+ CPUClass *cc = CPU_GET_CLASS(cpu);
162
+
163
+ if (!cc->write_elf64_note) {
164
+ return -1;
165
+ }
166
+ return (*cc->write_elf64_note)(f, cpu, cpuid, opaque);
167
+}
168
+
169
bool cpu_virtio_is_big_endian(CPUState *cpu)
170
{
171
CPUClass *cc = CPU_GET_CLASS(cpu);
172
--
173
2.25.1
174
175
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
No code uses CPUClass::get_paging_enabled() outside of hw/core/cpu.c:
4
5
$ git grep -F -- '->get_paging_enabled'
6
hw/core/cpu.c:74: return cc->get_paging_enabled(cpu);
7
hw/core/cpu.c:438: k->get_paging_enabled = cpu_common_get_paging_enabled;
8
target/i386/cpu.c:7418: cc->get_paging_enabled = x86_cpu_get_paging_enabled;
9
10
Check the handler presence in place and remove the common fallback code.
11
12
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
13
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
14
Message-Id: <20210517105140.1062037-10-f4bug@amsat.org>
15
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16
---
17
hw/core/cpu-common.c | 13 -------------
18
hw/core/cpu-sysemu.c | 11 +++++++++++
19
2 files changed, 11 insertions(+), 13 deletions(-)
20
21
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
22
index XXXXXXX..XXXXXXX 100644
23
--- a/hw/core/cpu-common.c
24
+++ b/hw/core/cpu-common.c
25
@@ -XXX,XX +XXX,XX @@ CPUState *cpu_create(const char *typename)
26
return cpu;
27
}
28
29
-bool cpu_paging_enabled(const CPUState *cpu)
30
-{
31
- CPUClass *cc = CPU_GET_CLASS(cpu);
32
-
33
- return cc->get_paging_enabled(cpu);
34
-}
35
-
36
-static bool cpu_common_get_paging_enabled(const CPUState *cpu)
37
-{
38
- return false;
39
-}
40
-
41
void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
42
Error **errp)
43
{
44
@@ -XXX,XX +XXX,XX @@ static void cpu_class_init(ObjectClass *klass, void *data)
45
k->parse_features = cpu_common_parse_features;
46
k->get_arch_id = cpu_common_get_arch_id;
47
k->has_work = cpu_common_has_work;
48
- k->get_paging_enabled = cpu_common_get_paging_enabled;
49
k->get_memory_mapping = cpu_common_get_memory_mapping;
50
k->gdb_read_register = cpu_common_gdb_read_register;
51
k->gdb_write_register = cpu_common_gdb_write_register;
52
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
53
index XXXXXXX..XXXXXXX 100644
54
--- a/hw/core/cpu-sysemu.c
55
+++ b/hw/core/cpu-sysemu.c
56
@@ -XXX,XX +XXX,XX @@
57
#include "qapi/error.h"
58
#include "hw/core/cpu.h"
59
60
+bool cpu_paging_enabled(const CPUState *cpu)
61
+{
62
+ CPUClass *cc = CPU_GET_CLASS(cpu);
63
+
64
+ if (cc->get_paging_enabled) {
65
+ return cc->get_paging_enabled(cpu);
66
+ }
67
+
68
+ return false;
69
+}
70
+
71
hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
72
MemTxAttrs *attrs)
73
{
74
--
75
2.25.1
76
77
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
No code uses CPUClass::get_memory_mapping() outside of hw/core/cpu.c:
4
5
$ git grep -F -- '->get_memory_mapping'
6
hw/core/cpu.c:87: cc->get_memory_mapping(cpu, list, errp);
7
hw/core/cpu.c:439: k->get_memory_mapping = cpu_common_get_memory_mapping;
8
target/i386/cpu.c:7422: cc->get_memory_mapping = x86_cpu_get_memory_mapping;
9
10
Check the handler presence in place and remove the common fallback code.
11
12
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
13
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
14
Message-Id: <20210517105140.1062037-11-f4bug@amsat.org>
15
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16
---
17
hw/core/cpu-common.c | 16 ----------------
18
hw/core/cpu-sysemu.c | 13 +++++++++++++
19
2 files changed, 13 insertions(+), 16 deletions(-)
20
21
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
22
index XXXXXXX..XXXXXXX 100644
23
--- a/hw/core/cpu-common.c
24
+++ b/hw/core/cpu-common.c
25
@@ -XXX,XX +XXX,XX @@ CPUState *cpu_create(const char *typename)
26
return cpu;
27
}
28
29
-void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
30
- Error **errp)
31
-{
32
- CPUClass *cc = CPU_GET_CLASS(cpu);
33
-
34
- cc->get_memory_mapping(cpu, list, errp);
35
-}
36
-
37
-static void cpu_common_get_memory_mapping(CPUState *cpu,
38
- MemoryMappingList *list,
39
- Error **errp)
40
-{
41
- error_setg(errp, "Obtaining memory mappings is unsupported on this CPU.");
42
-}
43
-
44
/* Resetting the IRQ comes from across the code base so we take the
45
* BQL here if we need to. cpu_interrupt assumes it is held.*/
46
void cpu_reset_interrupt(CPUState *cpu, int mask)
47
@@ -XXX,XX +XXX,XX @@ static void cpu_class_init(ObjectClass *klass, void *data)
48
k->parse_features = cpu_common_parse_features;
49
k->get_arch_id = cpu_common_get_arch_id;
50
k->has_work = cpu_common_has_work;
51
- k->get_memory_mapping = cpu_common_get_memory_mapping;
52
k->gdb_read_register = cpu_common_gdb_read_register;
53
k->gdb_write_register = cpu_common_gdb_write_register;
54
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
55
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c
56
index XXXXXXX..XXXXXXX 100644
57
--- a/hw/core/cpu-sysemu.c
58
+++ b/hw/core/cpu-sysemu.c
59
@@ -XXX,XX +XXX,XX @@ bool cpu_paging_enabled(const CPUState *cpu)
60
return false;
61
}
62
63
+void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
64
+ Error **errp)
65
+{
66
+ CPUClass *cc = CPU_GET_CLASS(cpu);
67
+
68
+ if (cc->get_memory_mapping) {
69
+ cc->get_memory_mapping(cpu, list, errp);
70
+ return;
71
+ }
72
+
73
+ error_setg(errp, "Obtaining memory mappings is unsupported on this CPU.");
74
+}
75
+
76
hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
77
MemTxAttrs *attrs)
78
{
79
--
80
2.25.1
81
82
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
Migration is specific to system emulation.
4
5
Restrict current DeviceClass::vmsd to sysemu using #ifdef'ry,
6
and assert in cpu_exec_realizefn() that dc->vmsd not set under
7
user emulation.
8
9
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
11
Message-Id: <20210517105140.1062037-12-f4bug@amsat.org>
12
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13
---
14
cpu.c | 2 ++
15
target/sh4/cpu.c | 5 +++--
16
target/xtensa/cpu.c | 4 +++-
17
3 files changed, 8 insertions(+), 3 deletions(-)
18
19
diff --git a/cpu.c b/cpu.c
20
index XXXXXXX..XXXXXXX 100644
21
--- a/cpu.c
22
+++ b/cpu.c
23
@@ -XXX,XX +XXX,XX @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
24
#endif /* CONFIG_TCG */
25
26
#ifdef CONFIG_USER_ONLY
27
+ assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
28
+ qdev_get_vmsd(DEVICE(cpu))->unmigratable);
29
assert(cc->vmsd == NULL);
30
#else
31
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
32
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
33
index XXXXXXX..XXXXXXX 100644
34
--- a/target/sh4/cpu.c
35
+++ b/target/sh4/cpu.c
36
@@ -XXX,XX +XXX,XX @@ static void superh_cpu_initfn(Object *obj)
37
env->movcal_backup_tail = &(env->movcal_backup);
38
}
39
40
+#ifndef CONFIG_USER_ONLY
41
static const VMStateDescription vmstate_sh_cpu = {
42
.name = "cpu",
43
.unmigratable = 1,
44
};
45
+#endif
46
47
#include "hw/core/tcg-cpu-ops.h"
48
49
@@ -XXX,XX +XXX,XX @@ static void superh_cpu_class_init(ObjectClass *oc, void *data)
50
cc->gdb_write_register = superh_cpu_gdb_write_register;
51
#ifndef CONFIG_USER_ONLY
52
cc->get_phys_page_debug = superh_cpu_get_phys_page_debug;
53
+ dc->vmsd = &vmstate_sh_cpu;
54
#endif
55
cc->disas_set_info = superh_cpu_disas_set_info;
56
57
cc->gdb_num_core_regs = 59;
58
-
59
- dc->vmsd = &vmstate_sh_cpu;
60
cc->tcg_ops = &superh_tcg_ops;
61
}
62
63
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
64
index XXXXXXX..XXXXXXX 100644
65
--- a/target/xtensa/cpu.c
66
+++ b/target/xtensa/cpu.c
67
@@ -XXX,XX +XXX,XX @@ static void xtensa_cpu_initfn(Object *obj)
68
#endif
69
}
70
71
+#ifndef CONFIG_USER_ONLY
72
static const VMStateDescription vmstate_xtensa_cpu = {
73
.name = "cpu",
74
.unmigratable = 1,
75
};
76
+#endif
77
78
#include "hw/core/tcg-cpu-ops.h"
79
80
@@ -XXX,XX +XXX,XX @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)
81
cc->gdb_stop_before_watchpoint = true;
82
#ifndef CONFIG_USER_ONLY
83
cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug;
84
+ dc->vmsd = &vmstate_xtensa_cpu;
85
#endif
86
cc->disas_set_info = xtensa_cpu_disas_set_info;
87
- dc->vmsd = &vmstate_xtensa_cpu;
88
cc->tcg_ops = &xtensa_tcg_ops;
89
}
90
91
--
92
2.25.1
93
94
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
Quoting Peter Maydell [*]:
4
5
There are two ways to handle migration for
6
a CPU object:
7
8
(1) like any other device, so it has a dc->vmsd that covers
9
migration for the whole object. As usual for objects that are a
10
subclass of a parent that has state, the first entry in the
11
VMStateDescription field list is VMSTATE_CPU(), which migrates
12
the cpu_common fields, followed by whatever the CPU's own migration
13
fields are.
14
15
(2) a backwards-compatible mechanism for CPUs that were
16
originally migrated using manual "write fields to the migration
17
stream structures". The on-the-wire migration format
18
for those is based on the 'env' pointer (which isn't a QOM object),
19
and the cpu_common part of the migration data is elsewhere.
20
21
cpu_exec_realizefn() handles both possibilities:
22
23
* for type 1, dc->vmsd is set and cc->vmsd is not,
24
so cpu_exec_realizefn() does nothing, and the standard
25
"register dc->vmsd for a device" code does everything needed
26
27
* for type 2, dc->vmsd is NULL and so we register the
28
vmstate_cpu_common directly to handle the cpu-common fields,
29
and the cc->vmsd to handle the per-CPU stuff
30
31
You can't change a CPU from one type to the other without breaking
32
migration compatibility, which is why some guest architectures
33
are stuck on the cc->vmsd form. New targets should use dc->vmsd.
34
35
To avoid new targets to start using type (2), rename cc->vmsd as
36
cc->legacy_vmsd. The correct field to implement is dc->vmsd (the
37
DeviceClass one).
38
39
See also commit b170fce3dd0 ("cpu: Register VMStateDescription
40
through CPUState") for historic background.
41
42
[*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg800849.html
43
44
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
45
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
46
Cc: Peter Maydell <peter.maydell@linaro.org>
47
Message-Id: <20210517105140.1062037-13-f4bug@amsat.org>
48
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
49
---
50
include/hw/core/cpu.h | 5 +++--
51
cpu.c | 12 ++++++------
52
target/arm/cpu.c | 2 +-
53
target/avr/cpu.c | 2 +-
54
target/i386/cpu.c | 2 +-
55
target/mips/cpu.c | 2 +-
56
target/ppc/cpu_init.c | 2 +-
57
target/riscv/cpu.c | 3 +--
58
target/s390x/cpu.c | 2 +-
59
target/sparc/cpu.c | 2 +-
60
10 files changed, 17 insertions(+), 17 deletions(-)
61
62
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
63
index XXXXXXX..XXXXXXX 100644
64
--- a/include/hw/core/cpu.h
65
+++ b/include/hw/core/cpu.h
66
@@ -XXX,XX +XXX,XX @@ struct AccelCPUClass;
67
* 32-bit VM coredump.
68
* @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF
69
* note to a 32-bit VM coredump.
70
- * @vmsd: State description for migration.
71
+ * @legacy_vmsd: Legacy state description for migration.
72
+ * Do not use in new targets, use #DeviceClass::vmsd instead.
73
* @gdb_num_core_regs: Number of core registers accessible to GDB.
74
* @gdb_core_xml_file: File name for core registers GDB XML description.
75
* @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop
76
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
77
int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
78
void *opaque);
79
80
- const VMStateDescription *vmsd;
81
+ const VMStateDescription *legacy_vmsd;
82
const char *gdb_core_xml_file;
83
gchar * (*gdb_arch_name)(CPUState *cpu);
84
const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname);
85
diff --git a/cpu.c b/cpu.c
86
index XXXXXXX..XXXXXXX 100644
87
--- a/cpu.c
88
+++ b/cpu.c
89
@@ -XXX,XX +XXX,XX @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
90
#ifdef CONFIG_USER_ONLY
91
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
92
qdev_get_vmsd(DEVICE(cpu))->unmigratable);
93
- assert(cc->vmsd == NULL);
94
+ assert(cc->legacy_vmsd == NULL);
95
#else
96
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
97
vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu);
98
}
99
- if (cc->vmsd != NULL) {
100
- vmstate_register(NULL, cpu->cpu_index, cc->vmsd, cpu);
101
+ if (cc->legacy_vmsd != NULL) {
102
+ vmstate_register(NULL, cpu->cpu_index, cc->legacy_vmsd, cpu);
103
}
104
#endif /* CONFIG_USER_ONLY */
105
}
106
@@ -XXX,XX +XXX,XX @@ void cpu_exec_unrealizefn(CPUState *cpu)
107
CPUClass *cc = CPU_GET_CLASS(cpu);
108
109
#ifdef CONFIG_USER_ONLY
110
- assert(cc->vmsd == NULL);
111
+ assert(cc->legacy_vmsd == NULL);
112
#else
113
- if (cc->vmsd != NULL) {
114
- vmstate_unregister(NULL, cc->vmsd, cpu);
115
+ if (cc->legacy_vmsd != NULL) {
116
+ vmstate_unregister(NULL, cc->legacy_vmsd, cpu);
117
}
118
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
119
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
120
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
121
index XXXXXXX..XXXXXXX 100644
122
--- a/target/arm/cpu.c
123
+++ b/target/arm/cpu.c
124
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
125
#ifndef CONFIG_USER_ONLY
126
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
127
cc->asidx_from_attrs = arm_asidx_from_attrs;
128
- cc->vmsd = &vmstate_arm_cpu;
129
+ cc->legacy_vmsd = &vmstate_arm_cpu;
130
cc->virtio_is_big_endian = arm_cpu_virtio_is_big_endian;
131
cc->write_elf64_note = arm_cpu_write_elf64_note;
132
cc->write_elf32_note = arm_cpu_write_elf32_note;
133
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
134
index XXXXXXX..XXXXXXX 100644
135
--- a/target/avr/cpu.c
136
+++ b/target/avr/cpu.c
137
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
138
cc->set_pc = avr_cpu_set_pc;
139
cc->memory_rw_debug = avr_cpu_memory_rw_debug;
140
cc->get_phys_page_debug = avr_cpu_get_phys_page_debug;
141
- cc->vmsd = &vms_avr_cpu;
142
+ cc->legacy_vmsd = &vms_avr_cpu;
143
cc->disas_set_info = avr_cpu_disas_set_info;
144
cc->gdb_read_register = avr_cpu_gdb_read_register;
145
cc->gdb_write_register = avr_cpu_gdb_write_register;
146
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
147
index XXXXXXX..XXXXXXX 100644
148
--- a/target/i386/cpu.c
149
+++ b/target/i386/cpu.c
150
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
151
cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
152
cc->write_elf32_note = x86_cpu_write_elf32_note;
153
cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
154
- cc->vmsd = &vmstate_x86_cpu;
155
+ cc->legacy_vmsd = &vmstate_x86_cpu;
156
#endif /* !CONFIG_USER_ONLY */
157
158
cc->gdb_arch_name = x86_gdb_arch_name;
159
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
160
index XXXXXXX..XXXXXXX 100644
161
--- a/target/mips/cpu.c
162
+++ b/target/mips/cpu.c
163
@@ -XXX,XX +XXX,XX @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
164
cc->gdb_write_register = mips_cpu_gdb_write_register;
165
#ifndef CONFIG_USER_ONLY
166
cc->get_phys_page_debug = mips_cpu_get_phys_page_debug;
167
- cc->vmsd = &vmstate_mips_cpu;
168
+ cc->legacy_vmsd = &vmstate_mips_cpu;
169
#endif
170
cc->disas_set_info = mips_cpu_disas_set_info;
171
cc->gdb_num_core_regs = 73;
172
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
173
index XXXXXXX..XXXXXXX 100644
174
--- a/target/ppc/cpu_init.c
175
+++ b/target/ppc/cpu_init.c
176
@@ -XXX,XX +XXX,XX @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
177
cc->gdb_write_register = ppc_cpu_gdb_write_register;
178
#ifndef CONFIG_USER_ONLY
179
cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
180
- cc->vmsd = &vmstate_ppc_cpu;
181
+ cc->legacy_vmsd = &vmstate_ppc_cpu;
182
#endif
183
#if defined(CONFIG_SOFTMMU)
184
cc->write_elf64_note = ppc64_cpu_write_elf64_note;
185
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
186
index XXXXXXX..XXXXXXX 100644
187
--- a/target/riscv/cpu.c
188
+++ b/target/riscv/cpu.c
189
@@ -XXX,XX +XXX,XX @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
190
cc->disas_set_info = riscv_cpu_disas_set_info;
191
#ifndef CONFIG_USER_ONLY
192
cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
193
- /* For now, mark unmigratable: */
194
- cc->vmsd = &vmstate_riscv_cpu;
195
+ cc->legacy_vmsd = &vmstate_riscv_cpu;
196
cc->write_elf64_note = riscv_cpu_write_elf64_note;
197
cc->write_elf32_note = riscv_cpu_write_elf32_note;
198
#endif
199
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
200
index XXXXXXX..XXXXXXX 100644
201
--- a/target/s390x/cpu.c
202
+++ b/target/s390x/cpu.c
203
@@ -XXX,XX +XXX,XX @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
204
cc->gdb_write_register = s390_cpu_gdb_write_register;
205
#ifndef CONFIG_USER_ONLY
206
cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
207
- cc->vmsd = &vmstate_s390_cpu;
208
+ cc->legacy_vmsd = &vmstate_s390_cpu;
209
cc->get_crash_info = s390_cpu_get_crash_info;
210
cc->write_elf64_note = s390_cpu_write_elf64_note;
211
#endif
212
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
213
index XXXXXXX..XXXXXXX 100644
214
--- a/target/sparc/cpu.c
215
+++ b/target/sparc/cpu.c
216
@@ -XXX,XX +XXX,XX @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
217
cc->gdb_write_register = sparc_cpu_gdb_write_register;
218
#ifndef CONFIG_USER_ONLY
219
cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug;
220
- cc->vmsd = &vmstate_sparc_cpu;
221
+ cc->legacy_vmsd = &vmstate_sparc_cpu;
222
#endif
223
cc->disas_set_info = cpu_sparc_disas_set_info;
224
225
--
226
2.25.1
227
228
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
2
1
3
See rationale in previous commit. Targets should use the vmsd field
4
of DeviceClass, not CPUClass. As migration is not important on the
5
AVR target, break the migration compatibility and set the DeviceClass
6
vmsd field. To feel safer, increment the vmstate version.
7
8
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
9
Message-Id: <20210517105140.1062037-14-f4bug@amsat.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
11
---
12
target/avr/cpu.c | 2 +-
13
target/avr/machine.c | 4 ++--
14
2 files changed, 3 insertions(+), 3 deletions(-)
15
16
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
17
index XXXXXXX..XXXXXXX 100644
18
--- a/target/avr/cpu.c
19
+++ b/target/avr/cpu.c
20
@@ -XXX,XX +XXX,XX @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
21
cc->set_pc = avr_cpu_set_pc;
22
cc->memory_rw_debug = avr_cpu_memory_rw_debug;
23
cc->get_phys_page_debug = avr_cpu_get_phys_page_debug;
24
- cc->legacy_vmsd = &vms_avr_cpu;
25
+ dc->vmsd = &vms_avr_cpu;
26
cc->disas_set_info = avr_cpu_disas_set_info;
27
cc->gdb_read_register = avr_cpu_gdb_read_register;
28
cc->gdb_write_register = avr_cpu_gdb_write_register;
29
diff --git a/target/avr/machine.c b/target/avr/machine.c
30
index XXXXXXX..XXXXXXX 100644
31
--- a/target/avr/machine.c
32
+++ b/target/avr/machine.c
33
@@ -XXX,XX +XXX,XX @@ static const VMStateInfo vms_eind = {
34
35
const VMStateDescription vms_avr_cpu = {
36
.name = "cpu",
37
- .version_id = 0,
38
- .minimum_version_id = 0,
39
+ .version_id = 1,
40
+ .minimum_version_id = 1,
41
.fields = (VMStateField[]) {
42
VMSTATE_UINT32(env.pc_w, AVRCPU),
43
VMSTATE_UINT32(env.sp, AVRCPU),
44
--
45
2.25.1
46
47
diff view generated by jsdifflib
Deleted patch
1
Add a flag to MIPSCPUClass in order to avoid needing to
2
replace mips_tcg_ops.do_transaction_failed.
3
1
4
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
5
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
Message-ID: <20210227232519.222663-2-richard.henderson@linaro.org>
8
---
9
target/mips/cpu-qom.h | 3 +++
10
hw/mips/jazz.c | 35 +++--------------------------------
11
target/mips/tcg/op_helper.c | 3 ++-
12
3 files changed, 8 insertions(+), 33 deletions(-)
13
14
diff --git a/target/mips/cpu-qom.h b/target/mips/cpu-qom.h
15
index XXXXXXX..XXXXXXX 100644
16
--- a/target/mips/cpu-qom.h
17
+++ b/target/mips/cpu-qom.h
18
@@ -XXX,XX +XXX,XX @@ struct MIPSCPUClass {
19
DeviceRealize parent_realize;
20
DeviceReset parent_reset;
21
const struct mips_def_t *cpu_def;
22
+
23
+ /* Used for the jazz board to modify mips_cpu_do_transaction_failed. */
24
+ bool no_data_aborts;
25
};
26
27
28
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
29
index XXXXXXX..XXXXXXX 100644
30
--- a/hw/mips/jazz.c
31
+++ b/hw/mips/jazz.c
32
@@ -XXX,XX +XXX,XX @@ static const MemoryRegionOps dma_dummy_ops = {
33
#define MAGNUM_BIOS_SIZE \
34
(BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
35
36
-#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
37
-static void (*real_do_transaction_failed)(CPUState *cpu, hwaddr physaddr,
38
- vaddr addr, unsigned size,
39
- MMUAccessType access_type,
40
- int mmu_idx, MemTxAttrs attrs,
41
- MemTxResult response,
42
- uintptr_t retaddr);
43
-
44
-static void mips_jazz_do_transaction_failed(CPUState *cs, hwaddr physaddr,
45
- vaddr addr, unsigned size,
46
- MMUAccessType access_type,
47
- int mmu_idx, MemTxAttrs attrs,
48
- MemTxResult response,
49
- uintptr_t retaddr)
50
-{
51
- if (access_type != MMU_INST_FETCH) {
52
- /* ignore invalid access (ie do not raise exception) */
53
- return;
54
- }
55
- (*real_do_transaction_failed)(cs, physaddr, addr, size, access_type,
56
- mmu_idx, attrs, response, retaddr);
57
-}
58
-#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
59
-
60
static void mips_jazz_init(MachineState *machine,
61
enum jazz_model_e jazz_model)
62
{
63
@@ -XXX,XX +XXX,XX @@ static void mips_jazz_init(MachineState *machine,
64
int bios_size, n;
65
Clock *cpuclk;
66
MIPSCPU *cpu;
67
- CPUClass *cc;
68
+ MIPSCPUClass *mcc;
69
CPUMIPSState *env;
70
qemu_irq *i8259;
71
rc4030_dma *dmas;
72
@@ -XXX,XX +XXX,XX @@ static void mips_jazz_init(MachineState *machine,
73
* However, we can't simply add a global memory region to catch
74
* everything, as this would make all accesses including instruction
75
* accesses be ignored and not raise exceptions.
76
- * So instead we hijack the do_transaction_failed method on the CPU, and
77
- * do not raise exceptions for data access.
78
*
79
* NOTE: this behaviour of raising exceptions for bad instruction
80
* fetches but not bad data accesses was added in commit 54e755588cf1e9
81
@@ -XXX,XX +XXX,XX @@ static void mips_jazz_init(MachineState *machine,
82
* we could replace this hijacking of CPU methods with a simple global
83
* memory region that catches all memory accesses, as we do on Malta.
84
*/
85
- cc = CPU_GET_CLASS(cpu);
86
-#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
87
- real_do_transaction_failed = cc->tcg_ops->do_transaction_failed;
88
- cc->tcg_ops->do_transaction_failed = mips_jazz_do_transaction_failed;
89
-#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
90
+ mcc = MIPS_CPU_GET_CLASS(cpu);
91
+ mcc->no_data_aborts = true;
92
93
/* allocate RAM */
94
memory_region_add_subregion(address_space, 0, machine->ram);
95
diff --git a/target/mips/tcg/op_helper.c b/target/mips/tcg/op_helper.c
96
index XXXXXXX..XXXXXXX 100644
97
--- a/target/mips/tcg/op_helper.c
98
+++ b/target/mips/tcg/op_helper.c
99
@@ -XXX,XX +XXX,XX @@ void mips_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
100
MemTxResult response, uintptr_t retaddr)
101
{
102
MIPSCPU *cpu = MIPS_CPU(cs);
103
+ MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(cpu);
104
CPUMIPSState *env = &cpu->env;
105
106
if (access_type == MMU_INST_FETCH) {
107
do_raise_exception(env, EXCP_IBE, retaddr);
108
- } else {
109
+ } else if (!mcc->no_data_aborts) {
110
do_raise_exception(env, EXCP_DBE, retaddr);
111
}
112
}
113
--
114
2.25.1
115
116
diff view generated by jsdifflib
1
We no longer have any runtime modifications to this struct,
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
so declare them all const.
3
2
4
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
3
Commit 2f3a57ee47 ("cputlb: ensure we save the IOTLB data in
5
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
4
case of reset") added the SavedIOTLB structure -- which is
5
system emulation specific -- in the generic CPUState structure.
6
7
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9
Message-Id: <20221216215519.5522-3-philmd@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
Message-ID: <20210227232519.222663-3-richard.henderson@linaro.org>
8
---
11
---
9
include/hw/core/cpu.h | 2 +-
12
include/hw/core/cpu.h | 6 ++++--
10
target/alpha/cpu.c | 2 +-
13
1 file changed, 4 insertions(+), 2 deletions(-)
11
target/arm/cpu.c | 2 +-
12
target/arm/cpu_tcg.c | 2 +-
13
target/avr/cpu.c | 2 +-
14
target/cris/cpu.c | 4 ++--
15
target/hexagon/cpu.c | 2 +-
16
target/hppa/cpu.c | 2 +-
17
target/i386/tcg/tcg-cpu.c | 2 +-
18
target/m68k/cpu.c | 2 +-
19
target/microblaze/cpu.c | 2 +-
20
target/mips/cpu.c | 2 +-
21
target/nios2/cpu.c | 2 +-
22
target/openrisc/cpu.c | 2 +-
23
target/ppc/cpu_init.c | 2 +-
24
target/riscv/cpu.c | 2 +-
25
target/rx/cpu.c | 2 +-
26
target/s390x/cpu.c | 2 +-
27
target/sh4/cpu.c | 2 +-
28
target/sparc/cpu.c | 2 +-
29
target/tricore/cpu.c | 2 +-
30
target/xtensa/cpu.c | 2 +-
31
22 files changed, 23 insertions(+), 23 deletions(-)
32
14
33
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
15
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
34
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
35
--- a/include/hw/core/cpu.h
17
--- a/include/hw/core/cpu.h
36
+++ b/include/hw/core/cpu.h
18
+++ b/include/hw/core/cpu.h
37
@@ -XXX,XX +XXX,XX @@ struct CPUClass {
19
@@ -XXX,XX +XXX,XX @@ struct CPUWatchpoint {
38
const struct SysemuCPUOps *sysemu_ops;
20
QTAILQ_ENTRY(CPUWatchpoint) entry;
39
40
/* when TCG is not available, this pointer is NULL */
41
- struct TCGCPUOps *tcg_ops;
42
+ const struct TCGCPUOps *tcg_ops;
43
44
/*
45
* if not NULL, this is called in order for the CPUClass to initialize
46
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
47
index XXXXXXX..XXXXXXX 100644
48
--- a/target/alpha/cpu.c
49
+++ b/target/alpha/cpu.c
50
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps alpha_sysemu_ops = {
51
52
#include "hw/core/tcg-cpu-ops.h"
53
54
-static struct TCGCPUOps alpha_tcg_ops = {
55
+static const struct TCGCPUOps alpha_tcg_ops = {
56
.initialize = alpha_translate_init,
57
.cpu_exec_interrupt = alpha_cpu_exec_interrupt,
58
.tlb_fill = alpha_cpu_tlb_fill,
59
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
60
index XXXXXXX..XXXXXXX 100644
61
--- a/target/arm/cpu.c
62
+++ b/target/arm/cpu.c
63
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps arm_sysemu_ops = {
64
#endif
65
66
#ifdef CONFIG_TCG
67
-static struct TCGCPUOps arm_tcg_ops = {
68
+static const struct TCGCPUOps arm_tcg_ops = {
69
.initialize = arm_translate_init,
70
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
71
.cpu_exec_interrupt = arm_cpu_exec_interrupt,
72
diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c
73
index XXXXXXX..XXXXXXX 100644
74
--- a/target/arm/cpu_tcg.c
75
+++ b/target/arm/cpu_tcg.c
76
@@ -XXX,XX +XXX,XX @@ static void pxa270c5_initfn(Object *obj)
77
}
78
79
#ifdef CONFIG_TCG
80
-static struct TCGCPUOps arm_v7m_tcg_ops = {
81
+static const struct TCGCPUOps arm_v7m_tcg_ops = {
82
.initialize = arm_translate_init,
83
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
84
.cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt,
85
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
86
index XXXXXXX..XXXXXXX 100644
87
--- a/target/avr/cpu.c
88
+++ b/target/avr/cpu.c
89
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps avr_sysemu_ops = {
90
91
#include "hw/core/tcg-cpu-ops.h"
92
93
-static struct TCGCPUOps avr_tcg_ops = {
94
+static const struct TCGCPUOps avr_tcg_ops = {
95
.initialize = avr_cpu_tcg_init,
96
.synchronize_from_tb = avr_cpu_synchronize_from_tb,
97
.cpu_exec_interrupt = avr_cpu_exec_interrupt,
98
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
99
index XXXXXXX..XXXXXXX 100644
100
--- a/target/cris/cpu.c
101
+++ b/target/cris/cpu.c
102
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps cris_sysemu_ops = {
103
104
#include "hw/core/tcg-cpu-ops.h"
105
106
-static struct TCGCPUOps crisv10_tcg_ops = {
107
+static const struct TCGCPUOps crisv10_tcg_ops = {
108
.initialize = cris_initialize_crisv10_tcg,
109
.cpu_exec_interrupt = cris_cpu_exec_interrupt,
110
.tlb_fill = cris_cpu_tlb_fill,
111
@@ -XXX,XX +XXX,XX @@ static struct TCGCPUOps crisv10_tcg_ops = {
112
#endif /* !CONFIG_USER_ONLY */
113
};
21
};
114
22
115
-static struct TCGCPUOps crisv32_tcg_ops = {
23
-#ifdef CONFIG_PLUGIN
116
+static const struct TCGCPUOps crisv32_tcg_ops = {
24
+#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY)
117
.initialize = cris_initialize_tcg,
25
/*
118
.cpu_exec_interrupt = cris_cpu_exec_interrupt,
26
* For plugins we sometime need to save the resolved iotlb data before
119
.tlb_fill = cris_cpu_tlb_fill,
27
* the memory regions get moved around by io_writex.
120
diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
28
@@ -XXX,XX +XXX,XX @@ struct CPUState {
121
index XXXXXXX..XXXXXXX 100644
29
122
--- a/target/hexagon/cpu.c
30
#ifdef CONFIG_PLUGIN
123
+++ b/target/hexagon/cpu.c
31
GArray *plugin_mem_cbs;
124
@@ -XXX,XX +XXX,XX @@ static bool hexagon_tlb_fill(CPUState *cs, vaddr address, int size,
32
+#if !defined(CONFIG_USER_ONLY)
125
33
/* saved iotlb data from io_writex */
126
#include "hw/core/tcg-cpu-ops.h"
34
SavedIOTLB saved_iotlb;
127
35
-#endif
128
-static struct TCGCPUOps hexagon_tcg_ops = {
36
+#endif /* !CONFIG_USER_ONLY */
129
+static const struct TCGCPUOps hexagon_tcg_ops = {
37
+#endif /* CONFIG_PLUGIN */
130
.initialize = hexagon_translate_init,
38
131
.synchronize_from_tb = hexagon_cpu_synchronize_from_tb,
39
/* TODO Move common fields from CPUArchState here. */
132
.tlb_fill = hexagon_tlb_fill,
40
int cpu_index;
133
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
134
index XXXXXXX..XXXXXXX 100644
135
--- a/target/hppa/cpu.c
136
+++ b/target/hppa/cpu.c
137
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps hppa_sysemu_ops = {
138
139
#include "hw/core/tcg-cpu-ops.h"
140
141
-static struct TCGCPUOps hppa_tcg_ops = {
142
+static const struct TCGCPUOps hppa_tcg_ops = {
143
.initialize = hppa_translate_init,
144
.synchronize_from_tb = hppa_cpu_synchronize_from_tb,
145
.cpu_exec_interrupt = hppa_cpu_exec_interrupt,
146
diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
147
index XXXXXXX..XXXXXXX 100644
148
--- a/target/i386/tcg/tcg-cpu.c
149
+++ b/target/i386/tcg/tcg-cpu.c
150
@@ -XXX,XX +XXX,XX @@ static void x86_cpu_synchronize_from_tb(CPUState *cs,
151
152
#include "hw/core/tcg-cpu-ops.h"
153
154
-static struct TCGCPUOps x86_tcg_ops = {
155
+static const struct TCGCPUOps x86_tcg_ops = {
156
.initialize = tcg_x86_init,
157
.synchronize_from_tb = x86_cpu_synchronize_from_tb,
158
.cpu_exec_enter = x86_cpu_exec_enter,
159
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
160
index XXXXXXX..XXXXXXX 100644
161
--- a/target/m68k/cpu.c
162
+++ b/target/m68k/cpu.c
163
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps m68k_sysemu_ops = {
164
165
#include "hw/core/tcg-cpu-ops.h"
166
167
-static struct TCGCPUOps m68k_tcg_ops = {
168
+static const struct TCGCPUOps m68k_tcg_ops = {
169
.initialize = m68k_tcg_init,
170
.cpu_exec_interrupt = m68k_cpu_exec_interrupt,
171
.tlb_fill = m68k_cpu_tlb_fill,
172
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
173
index XXXXXXX..XXXXXXX 100644
174
--- a/target/microblaze/cpu.c
175
+++ b/target/microblaze/cpu.c
176
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps mb_sysemu_ops = {
177
178
#include "hw/core/tcg-cpu-ops.h"
179
180
-static struct TCGCPUOps mb_tcg_ops = {
181
+static const struct TCGCPUOps mb_tcg_ops = {
182
.initialize = mb_tcg_init,
183
.synchronize_from_tb = mb_cpu_synchronize_from_tb,
184
.cpu_exec_interrupt = mb_cpu_exec_interrupt,
185
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
186
index XXXXXXX..XXXXXXX 100644
187
--- a/target/mips/cpu.c
188
+++ b/target/mips/cpu.c
189
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps mips_sysemu_ops = {
190
* NB: cannot be const, as some elements are changed for specific
191
* mips hardware (see hw/mips/jazz.c).
192
*/
193
-static struct TCGCPUOps mips_tcg_ops = {
194
+static const struct TCGCPUOps mips_tcg_ops = {
195
.initialize = mips_tcg_init,
196
.synchronize_from_tb = mips_cpu_synchronize_from_tb,
197
.cpu_exec_interrupt = mips_cpu_exec_interrupt,
198
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
199
index XXXXXXX..XXXXXXX 100644
200
--- a/target/nios2/cpu.c
201
+++ b/target/nios2/cpu.c
202
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps nios2_sysemu_ops = {
203
204
#include "hw/core/tcg-cpu-ops.h"
205
206
-static struct TCGCPUOps nios2_tcg_ops = {
207
+static const struct TCGCPUOps nios2_tcg_ops = {
208
.initialize = nios2_tcg_init,
209
.cpu_exec_interrupt = nios2_cpu_exec_interrupt,
210
.tlb_fill = nios2_cpu_tlb_fill,
211
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
212
index XXXXXXX..XXXXXXX 100644
213
--- a/target/openrisc/cpu.c
214
+++ b/target/openrisc/cpu.c
215
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps openrisc_sysemu_ops = {
216
217
#include "hw/core/tcg-cpu-ops.h"
218
219
-static struct TCGCPUOps openrisc_tcg_ops = {
220
+static const struct TCGCPUOps openrisc_tcg_ops = {
221
.initialize = openrisc_translate_init,
222
.cpu_exec_interrupt = openrisc_cpu_exec_interrupt,
223
.tlb_fill = openrisc_cpu_tlb_fill,
224
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
225
index XXXXXXX..XXXXXXX 100644
226
--- a/target/ppc/cpu_init.c
227
+++ b/target/ppc/cpu_init.c
228
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps ppc_sysemu_ops = {
229
#ifdef CONFIG_TCG
230
#include "hw/core/tcg-cpu-ops.h"
231
232
-static struct TCGCPUOps ppc_tcg_ops = {
233
+static const struct TCGCPUOps ppc_tcg_ops = {
234
.initialize = ppc_translate_init,
235
.cpu_exec_interrupt = ppc_cpu_exec_interrupt,
236
.tlb_fill = ppc_cpu_tlb_fill,
237
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
238
index XXXXXXX..XXXXXXX 100644
239
--- a/target/riscv/cpu.c
240
+++ b/target/riscv/cpu.c
241
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps riscv_sysemu_ops = {
242
243
#include "hw/core/tcg-cpu-ops.h"
244
245
-static struct TCGCPUOps riscv_tcg_ops = {
246
+static const struct TCGCPUOps riscv_tcg_ops = {
247
.initialize = riscv_translate_init,
248
.synchronize_from_tb = riscv_cpu_synchronize_from_tb,
249
.cpu_exec_interrupt = riscv_cpu_exec_interrupt,
250
diff --git a/target/rx/cpu.c b/target/rx/cpu.c
251
index XXXXXXX..XXXXXXX 100644
252
--- a/target/rx/cpu.c
253
+++ b/target/rx/cpu.c
254
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps rx_sysemu_ops = {
255
256
#include "hw/core/tcg-cpu-ops.h"
257
258
-static struct TCGCPUOps rx_tcg_ops = {
259
+static const struct TCGCPUOps rx_tcg_ops = {
260
.initialize = rx_translate_init,
261
.synchronize_from_tb = rx_cpu_synchronize_from_tb,
262
.cpu_exec_interrupt = rx_cpu_exec_interrupt,
263
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
264
index XXXXXXX..XXXXXXX 100644
265
--- a/target/s390x/cpu.c
266
+++ b/target/s390x/cpu.c
267
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps s390_sysemu_ops = {
268
#ifdef CONFIG_TCG
269
#include "hw/core/tcg-cpu-ops.h"
270
271
-static struct TCGCPUOps s390_tcg_ops = {
272
+static const struct TCGCPUOps s390_tcg_ops = {
273
.initialize = s390x_translate_init,
274
.tlb_fill = s390_cpu_tlb_fill,
275
276
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
277
index XXXXXXX..XXXXXXX 100644
278
--- a/target/sh4/cpu.c
279
+++ b/target/sh4/cpu.c
280
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps sh4_sysemu_ops = {
281
282
#include "hw/core/tcg-cpu-ops.h"
283
284
-static struct TCGCPUOps superh_tcg_ops = {
285
+static const struct TCGCPUOps superh_tcg_ops = {
286
.initialize = sh4_translate_init,
287
.synchronize_from_tb = superh_cpu_synchronize_from_tb,
288
.cpu_exec_interrupt = superh_cpu_exec_interrupt,
289
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
290
index XXXXXXX..XXXXXXX 100644
291
--- a/target/sparc/cpu.c
292
+++ b/target/sparc/cpu.c
293
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps sparc_sysemu_ops = {
294
#ifdef CONFIG_TCG
295
#include "hw/core/tcg-cpu-ops.h"
296
297
-static struct TCGCPUOps sparc_tcg_ops = {
298
+static const struct TCGCPUOps sparc_tcg_ops = {
299
.initialize = sparc_tcg_init,
300
.synchronize_from_tb = sparc_cpu_synchronize_from_tb,
301
.cpu_exec_interrupt = sparc_cpu_exec_interrupt,
302
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
303
index XXXXXXX..XXXXXXX 100644
304
--- a/target/tricore/cpu.c
305
+++ b/target/tricore/cpu.c
306
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps tricore_sysemu_ops = {
307
308
#include "hw/core/tcg-cpu-ops.h"
309
310
-static struct TCGCPUOps tricore_tcg_ops = {
311
+static const struct TCGCPUOps tricore_tcg_ops = {
312
.initialize = tricore_tcg_init,
313
.synchronize_from_tb = tricore_cpu_synchronize_from_tb,
314
.tlb_fill = tricore_cpu_tlb_fill,
315
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
316
index XXXXXXX..XXXXXXX 100644
317
--- a/target/xtensa/cpu.c
318
+++ b/target/xtensa/cpu.c
319
@@ -XXX,XX +XXX,XX @@ static const struct SysemuCPUOps xtensa_sysemu_ops = {
320
321
#include "hw/core/tcg-cpu-ops.h"
322
323
-static struct TCGCPUOps xtensa_tcg_ops = {
324
+static const struct TCGCPUOps xtensa_tcg_ops = {
325
.initialize = xtensa_translate_init,
326
.cpu_exec_interrupt = xtensa_cpu_exec_interrupt,
327
.tlb_fill = xtensa_cpu_tlb_fill,
328
--
41
--
329
2.25.1
42
2.34.1
330
43
331
44
diff view generated by jsdifflib