* [PATCH 01/71] target/arm: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PULL 1/4] tcg: Reset free_temps before tcg_optimize Richard Henderson
` (71 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, open list:ARM TCG CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.c | 26 +++++++++++++-------------
target/arm/cpu64.c | 6 +++---
target/arm/tcg/cpu64.c | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 0cbda76ba0..1afa07511e 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1558,39 +1558,39 @@ static void arm_cpu_initfn(Object *obj)
* 0 means "unset, use the default value". That default might vary depending
* on the CPU type, and is set in the realize fn.
*/
-static Property arm_cpu_gt_cntfrq_property =
+static const Property arm_cpu_gt_cntfrq_property =
DEFINE_PROP_UINT64("cntfrq", ARMCPU, gt_cntfrq_hz, 0);
-static Property arm_cpu_reset_cbar_property =
+static const Property arm_cpu_reset_cbar_property =
DEFINE_PROP_UINT64("reset-cbar", ARMCPU, reset_cbar, 0);
-static Property arm_cpu_reset_hivecs_property =
+static const Property arm_cpu_reset_hivecs_property =
DEFINE_PROP_BOOL("reset-hivecs", ARMCPU, reset_hivecs, false);
#ifndef CONFIG_USER_ONLY
-static Property arm_cpu_has_el2_property =
+static const Property arm_cpu_has_el2_property =
DEFINE_PROP_BOOL("has_el2", ARMCPU, has_el2, true);
-static Property arm_cpu_has_el3_property =
+static const Property arm_cpu_has_el3_property =
DEFINE_PROP_BOOL("has_el3", ARMCPU, has_el3, true);
#endif
-static Property arm_cpu_cfgend_property =
+static const Property arm_cpu_cfgend_property =
DEFINE_PROP_BOOL("cfgend", ARMCPU, cfgend, false);
-static Property arm_cpu_has_vfp_property =
+static const Property arm_cpu_has_vfp_property =
DEFINE_PROP_BOOL("vfp", ARMCPU, has_vfp, true);
-static Property arm_cpu_has_vfp_d32_property =
+static const Property arm_cpu_has_vfp_d32_property =
DEFINE_PROP_BOOL("vfp-d32", ARMCPU, has_vfp_d32, true);
-static Property arm_cpu_has_neon_property =
+static const Property arm_cpu_has_neon_property =
DEFINE_PROP_BOOL("neon", ARMCPU, has_neon, true);
-static Property arm_cpu_has_dsp_property =
+static const Property arm_cpu_has_dsp_property =
DEFINE_PROP_BOOL("dsp", ARMCPU, has_dsp, true);
-static Property arm_cpu_has_mpu_property =
+static const Property arm_cpu_has_mpu_property =
DEFINE_PROP_BOOL("has-mpu", ARMCPU, has_mpu, true);
/* This is like DEFINE_PROP_UINT32 but it doesn't set the default value,
@@ -1598,7 +1598,7 @@ static Property arm_cpu_has_mpu_property =
* the right value for that particular CPU type, and we don't want
* to override that with an incorrect constant value.
*/
-static Property arm_cpu_pmsav7_dregion_property =
+static const Property arm_cpu_pmsav7_dregion_property =
DEFINE_PROP_UNSIGNED_NODEFAULT("pmsav7-dregion", ARMCPU,
pmsav7_dregion,
qdev_prop_uint32, uint32_t);
@@ -2644,7 +2644,7 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
return oc;
}
-static Property arm_cpu_properties[] = {
+static const Property arm_cpu_properties[] = {
DEFINE_PROP_UINT64("midr", ARMCPU, midr, 0),
DEFINE_PROP_UINT64("mp-affinity", ARMCPU,
mp_affinity, ARM64_AFFINITY_INVALID),
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index c1cac912a0..ec77c5b34a 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -547,11 +547,11 @@ void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp)
cpu->isar.id_aa64isar2 = isar2;
}
-static Property arm_cpu_pauth_property =
+static const Property arm_cpu_pauth_property =
DEFINE_PROP_BOOL("pauth", ARMCPU, prop_pauth, true);
-static Property arm_cpu_pauth_impdef_property =
+static const Property arm_cpu_pauth_impdef_property =
DEFINE_PROP_BOOL("pauth-impdef", ARMCPU, prop_pauth_impdef, false);
-static Property arm_cpu_pauth_qarma3_property =
+static const Property arm_cpu_pauth_qarma3_property =
DEFINE_PROP_BOOL("pauth-qarma3", ARMCPU, prop_pauth_qarma3, false);
void aarch64_add_pauth_properties(Object *obj)
diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
index 2963d7510f..67c110f021 100644
--- a/target/arm/tcg/cpu64.c
+++ b/target/arm/tcg/cpu64.c
@@ -198,7 +198,7 @@ static void cpu_max_get_l0gptsz(Object *obj, Visitor *v, const char *name,
visit_type_uint32(v, name, &value, errp);
}
-static Property arm_cpu_lpa2_property =
+static const Property arm_cpu_lpa2_property =
DEFINE_PROP_BOOL("lpa2", ARMCPU, prop_lpa2, true);
static void aarch64_a55_initfn(Object *obj)
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PULL 1/4] tcg: Reset free_temps before tcg_optimize
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
2024-12-13 19:06 ` [PATCH 01/71] target/arm: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 02/71] target/avr: Constify all Property Richard Henderson
` (70 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, wannacu, Pierrick Bouvier,
Philippe Mathieu-Daudé, Paolo Bonzini
When allocating new temps during tcg_optmize, do not re-use
any EBB temps that were used within the TB. We do not have
any idea what span of the TB in which the temp was live.
Introduce tcg_temp_ebb_reset_freed and use before tcg_optimize,
as well as replacing the equivalent in plugin_gen_inject and
tcg_func_start.
Cc: qemu-stable@nongnu.org
Fixes: fb04ab7ddd8 ("tcg/optimize: Lower TCG_COND_TST{EQ,NE} if unsupported")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2711
Reported-by: wannacu <wannacu2049@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/tcg/tcg-temp-internal.h | 6 ++++++
accel/tcg/plugin-gen.c | 2 +-
tcg/tcg.c | 5 ++++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/tcg/tcg-temp-internal.h b/include/tcg/tcg-temp-internal.h
index 44192c55a9..98f91e68b7 100644
--- a/include/tcg/tcg-temp-internal.h
+++ b/include/tcg/tcg-temp-internal.h
@@ -42,4 +42,10 @@ TCGv_i64 tcg_temp_ebb_new_i64(void);
TCGv_ptr tcg_temp_ebb_new_ptr(void);
TCGv_i128 tcg_temp_ebb_new_i128(void);
+/* Forget all freed EBB temps, so that new allocations produce new temps. */
+static inline void tcg_temp_ebb_reset_freed(TCGContext *s)
+{
+ memset(s->free_temps, 0, sizeof(s->free_temps));
+}
+
#endif /* TCG_TEMP_FREE_H */
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index 0f47bfbb48..1ef075552c 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -275,7 +275,7 @@ static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb)
* that might be live within the existing opcode stream.
* The simplest solution is to release them all and create new.
*/
- memset(tcg_ctx->free_temps, 0, sizeof(tcg_ctx->free_temps));
+ tcg_temp_ebb_reset_freed(tcg_ctx);
QTAILQ_FOREACH_SAFE(op, &tcg_ctx->ops, link, next) {
switch (op->opc) {
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 0babae1b88..4578b185be 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1489,7 +1489,7 @@ void tcg_func_start(TCGContext *s)
s->nb_temps = s->nb_globals;
/* No temps have been previously allocated for size or locality. */
- memset(s->free_temps, 0, sizeof(s->free_temps));
+ tcg_temp_ebb_reset_freed(s);
/* No constant temps have been previously allocated. */
for (int i = 0; i < TCG_TYPE_COUNT; ++i) {
@@ -6120,6 +6120,9 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start)
}
#endif
+ /* Do not reuse any EBB that may be allocated within the TB. */
+ tcg_temp_ebb_reset_freed(s);
+
tcg_optimize(s);
reachable_code_pass(s);
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 02/71] target/avr: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
2024-12-13 19:06 ` [PATCH 01/71] target/arm: Constify all Property Richard Henderson
2024-12-13 19:06 ` [PULL 1/4] tcg: Reset free_temps before tcg_optimize Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PULL 2/4] tcg/riscv: Fix StoreStore barrier generation Richard Henderson
` (69 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael Rolnik
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/avr/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index 3132842d56..a7529a1b3d 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -149,7 +149,7 @@ static void avr_cpu_initfn(Object *obj)
sizeof(cpu->env.intsrc) * 8);
}
-static Property avr_cpu_properties[] = {
+static const Property avr_cpu_properties[] = {
DEFINE_PROP_UINT32("init-sp", AVRCPU, init_sp, 0),
DEFINE_PROP_END_OF_LIST()
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PULL 2/4] tcg/riscv: Fix StoreStore barrier generation
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (2 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 02/71] target/avr: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PULL 3/4] include/exec: Introduce fpst alias in helper-head.h.inc Richard Henderson
` (68 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Roman Artemev, qemu-stable, Denis Tomashev, Palmer Dabbelt,
Alistair Francis, open list:RISC-V TCG target
From: Roman Artemev <roman.artemev@syntacore.com>
On RISC-V to StoreStore barrier corresponds
`fence w, w` not `fence r, r`
Cc: qemu-stable@nongnu.org
Fixes: efbea94c76b ("tcg/riscv: Add slowpath load and store instructions")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Denis Tomashev <denis.tomashev@syntacore.com>
Signed-off-by: Roman Artemev <roman.artemev@syntacore.com>
Message-ID: <e2f2131e294a49e79959d4fa9ec02cf4@syntacore.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/riscv/tcg-target.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index f8331e4688..96f9a7e348 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc
@@ -1624,7 +1624,7 @@ static void tcg_out_mb(TCGContext *s, TCGArg a0)
insn |= 0x02100000;
}
if (a0 & TCG_MO_ST_ST) {
- insn |= 0x02200000;
+ insn |= 0x01100000;
}
tcg_out32(s, insn);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PULL 3/4] include/exec: Introduce fpst alias in helper-head.h.inc
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (3 preceding siblings ...)
2024-12-13 19:06 ` [PULL 2/4] tcg/riscv: Fix StoreStore barrier generation Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 03/71] target/hexagon: Constify all Property Richard Henderson
` (67 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Paolo Bonzini
This allows targets to declare that the helper requires a
float_status pointer and instead of a generic void pointer.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/helper-head.h.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/exec/helper-head.h.inc b/include/exec/helper-head.h.inc
index 5ef467a79d..bce5db06ef 100644
--- a/include/exec/helper-head.h.inc
+++ b/include/exec/helper-head.h.inc
@@ -23,6 +23,7 @@
#define dh_alias_ptr ptr
#define dh_alias_cptr ptr
#define dh_alias_env ptr
+#define dh_alias_fpst ptr
#define dh_alias_void void
#define dh_alias_noreturn noreturn
#define dh_alias(t) glue(dh_alias_, t)
@@ -39,6 +40,7 @@
#define dh_ctype_ptr void *
#define dh_ctype_cptr const void *
#define dh_ctype_env CPUArchState *
+#define dh_ctype_fpst float_status *
#define dh_ctype_void void
#define dh_ctype_noreturn G_NORETURN void
#define dh_ctype(t) dh_ctype_##t
@@ -96,6 +98,7 @@
#define dh_typecode_f64 dh_typecode_i64
#define dh_typecode_cptr dh_typecode_ptr
#define dh_typecode_env dh_typecode_ptr
+#define dh_typecode_fpst dh_typecode_ptr
#define dh_typecode(t) dh_typecode_##t
#define dh_callflag_i32 0
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 03/71] target/hexagon: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (4 preceding siblings ...)
2024-12-13 19:06 ` [PULL 3/4] include/exec: Introduce fpst alias in helper-head.h.inc Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 20:01 ` Brian Cain
2024-12-13 19:06 ` [PATCH 04/71] target/i386: " Richard Henderson
` (66 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Brian Cain
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hexagon/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
index c9aa9408ec..a70007245e 100644
--- a/target/hexagon/cpu.c
+++ b/target/hexagon/cpu.c
@@ -48,7 +48,7 @@ static ObjectClass *hexagon_cpu_class_by_name(const char *cpu_model)
return oc;
}
-static Property hexagon_cpu_properties[] = {
+static const Property hexagon_cpu_properties[] = {
DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, lldb_compat, false),
DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjust, 0,
qdev_prop_uint32, target_ulong),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 03/71] target/hexagon: Constify all Property
2024-12-13 19:06 ` [PATCH 03/71] target/hexagon: Constify all Property Richard Henderson
@ 2024-12-13 20:01 ` Brian Cain
0 siblings, 0 replies; 124+ messages in thread
From: Brian Cain @ 2024-12-13 20:01 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: Brian Cain
On 12/13/2024 1:06 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/hexagon/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
> index c9aa9408ec..a70007245e 100644
> --- a/target/hexagon/cpu.c
> +++ b/target/hexagon/cpu.c
> @@ -48,7 +48,7 @@ static ObjectClass *hexagon_cpu_class_by_name(const char *cpu_model)
> return oc;
> }
>
> -static Property hexagon_cpu_properties[] = {
> +static const Property hexagon_cpu_properties[] = {
> DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, lldb_compat, false),
> DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjust, 0,
> qdev_prop_uint32, target_ulong),
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 04/71] target/i386: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (5 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 03/71] target/hexagon: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-18 15:19 ` Zhao Liu
2024-12-13 19:06 ` [PULL 4/4] target/sparc: Use memcpy() and remove memcpy32() Richard Henderson
` (65 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Zhao Liu
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 305f2a41cf..5253399459 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5384,7 +5384,7 @@ static X86CPUVersion x86_cpu_model_resolve_version(const X86CPUModel *model)
return v;
}
-static Property max_x86_cpu_properties[] = {
+static const Property max_x86_cpu_properties[] = {
DEFINE_PROP_BOOL("migratable", X86CPU, migratable, true),
DEFINE_PROP_BOOL("host-cache-info", X86CPU, cache_info_passthrough, false),
DEFINE_PROP_END_OF_LIST()
@@ -8407,7 +8407,7 @@ void x86_update_hflags(CPUX86State *env)
env->hflags = hflags;
}
-static Property x86_cpu_properties[] = {
+static const Property x86_cpu_properties[] = {
#ifdef CONFIG_USER_ONLY
/* apic_id = 0 by default for *-user, see commit 9886e834 */
DEFINE_PROP_UINT32("apic-id", X86CPU, apic_id, 0),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 04/71] target/i386: Constify all Property
2024-12-13 19:06 ` [PATCH 04/71] target/i386: " Richard Henderson
@ 2024-12-18 15:19 ` Zhao Liu
0 siblings, 0 replies; 124+ messages in thread
From: Zhao Liu @ 2024-12-18 15:19 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Paolo Bonzini
On Fri, Dec 13, 2024 at 01:06:37PM -0600, Richard Henderson wrote:
> Date: Fri, 13 Dec 2024 13:06:37 -0600
> From: Richard Henderson <richard.henderson@linaro.org>
> Subject: [PATCH 04/71] target/i386: Constify all Property
> X-Mailer: git-send-email 2.43.0
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/i386/cpu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PULL 4/4] target/sparc: Use memcpy() and remove memcpy32()
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (6 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 04/71] target/i386: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 05/71] target/microblaze: Constify all Property Richard Henderson
` (64 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Pierrick Bouvier, Mark Cave-Ayland,
Artyom Tarasenko
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rather than manually copying each register, use
the libc memcpy(), which is well optimized nowadays.
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241205205418.67613-1-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/win_helper.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c
index b53fc9ce94..0c4b09f2c1 100644
--- a/target/sparc/win_helper.c
+++ b/target/sparc/win_helper.c
@@ -24,29 +24,19 @@
#include "exec/helper-proto.h"
#include "trace.h"
-static inline void memcpy32(target_ulong *dst, const target_ulong *src)
-{
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- dst[4] = src[4];
- dst[5] = src[5];
- dst[6] = src[6];
- dst[7] = src[7];
-}
-
void cpu_set_cwp(CPUSPARCState *env, int new_cwp)
{
/* put the modified wrap registers at their proper location */
if (env->cwp == env->nwindows - 1) {
- memcpy32(env->regbase, env->regbase + env->nwindows * 16);
+ memcpy(env->regbase, env->regbase + env->nwindows * 16,
+ sizeof(env->gregs));
}
env->cwp = new_cwp;
/* put the wrap registers at their temporary location */
if (new_cwp == env->nwindows - 1) {
- memcpy32(env->regbase + env->nwindows * 16, env->regbase);
+ memcpy(env->regbase + env->nwindows * 16, env->regbase,
+ sizeof(env->gregs));
}
env->regwptr = env->regbase + (new_cwp * 16);
}
@@ -361,8 +351,8 @@ void cpu_gl_switch_gregs(CPUSPARCState *env, uint32_t new_gl)
dst = get_gl_gregset(env, env->gl);
if (src != dst) {
- memcpy32(dst, env->gregs);
- memcpy32(env->gregs, src);
+ memcpy(dst, env->gregs, sizeof(env->gregs));
+ memcpy(env->gregs, src, sizeof(env->gregs));
}
}
@@ -393,8 +383,8 @@ void cpu_change_pstate(CPUSPARCState *env, uint32_t new_pstate)
/* Switch global register bank */
src = get_gregset(env, new_pstate_regs);
dst = get_gregset(env, pstate_regs);
- memcpy32(dst, env->gregs);
- memcpy32(env->gregs, src);
+ memcpy(dst, env->gregs, sizeof(env->gregs));
+ memcpy(env->gregs, src, sizeof(env->gregs));
} else {
trace_win_helper_no_switch_pstate(new_pstate_regs);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 05/71] target/microblaze: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (7 preceding siblings ...)
2024-12-13 19:06 ` [PULL 4/4] target/sparc: Use memcpy() and remove memcpy32() Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 06/71] target/mips: " Richard Henderson
` (63 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Edgar E. Iglesias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/microblaze/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
index 0e1e22d1e8..0e41e39c0e 100644
--- a/target/microblaze/cpu.c
+++ b/target/microblaze/cpu.c
@@ -339,7 +339,7 @@ static void mb_cpu_initfn(Object *obj)
object_property_add_alias(obj, "little-endian", obj, "endianness");
}
-static Property mb_properties[] = {
+static const Property mb_properties[] = {
/*
* Following properties are used by Xilinx DTS conversion tool
* do not rename them.
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 06/71] target/mips: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (8 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 05/71] target/microblaze: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 07/71] target/ppc: Remove empty property list Richard Henderson
` (62 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Aurelien Jarno, Jiaxun Yang,
Aleksandar Rikalo
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/mips/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 4feacc88c0..02c0e1b0f9 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -539,7 +539,7 @@ static const struct SysemuCPUOps mips_sysemu_ops = {
};
#endif
-static Property mips_cpu_properties[] = {
+static const Property mips_cpu_properties[] = {
DEFINE_PROP_BOOL("big-endian", MIPSCPU, is_big_endian, TARGET_BIG_ENDIAN),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 07/71] target/ppc: Remove empty property list
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (9 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 06/71] target/mips: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-16 5:01 ` Harsh Prateek Bora
2024-12-13 19:06 ` [PATCH 08/71] target/riscv: Constify all Property Richard Henderson
` (61 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Nicholas Piggin, Daniel Henrique Barboza,
open list:PowerPC TCG CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/cpu_init.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 1253dbf622..5e95790def 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7414,11 +7414,6 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
#endif
}
-static Property ppc_cpu_properties[] = {
- /* add default property here */
- DEFINE_PROP_END_OF_LIST(),
-};
-
#ifndef CONFIG_USER_ONLY
#include "hw/core/sysemu-cpu-ops.h"
@@ -7468,7 +7463,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
device_class_set_parent_unrealize(dc, ppc_cpu_unrealize,
&pcc->parent_unrealize);
pcc->pvr_match = ppc_pvr_match_default;
- device_class_set_props(dc, ppc_cpu_properties);
resettable_class_set_parent_phases(rc, NULL, ppc_cpu_reset_hold, NULL,
&pcc->parent_phases);
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 07/71] target/ppc: Remove empty property list
2024-12-13 19:06 ` [PATCH 07/71] target/ppc: Remove empty property list Richard Henderson
@ 2024-12-16 5:01 ` Harsh Prateek Bora
0 siblings, 0 replies; 124+ messages in thread
From: Harsh Prateek Bora @ 2024-12-16 5:01 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Nicholas Piggin, Daniel Henrique Barboza,
open list:PowerPC TCG CPUs
On 12/14/24 00:36, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
> ---
> target/ppc/cpu_init.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
> index 1253dbf622..5e95790def 100644
> --- a/target/ppc/cpu_init.c
> +++ b/target/ppc/cpu_init.c
> @@ -7414,11 +7414,6 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
> #endif
> }
>
> -static Property ppc_cpu_properties[] = {
> - /* add default property here */
> - DEFINE_PROP_END_OF_LIST(),
> -};
> -
> #ifndef CONFIG_USER_ONLY
> #include "hw/core/sysemu-cpu-ops.h"
>
> @@ -7468,7 +7463,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
> device_class_set_parent_unrealize(dc, ppc_cpu_unrealize,
> &pcc->parent_unrealize);
> pcc->pvr_match = ppc_pvr_match_default;
> - device_class_set_props(dc, ppc_cpu_properties);
>
> resettable_class_set_parent_phases(rc, NULL, ppc_cpu_reset_hold, NULL,
> &pcc->parent_phases);
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 08/71] target/riscv: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (10 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 07/71] target/ppc: Remove empty property list Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 20:38 ` Daniel Henrique Barboza
2024-12-13 19:06 ` [PATCH 09/71] target/s390x: " Richard Henderson
` (60 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Palmer Dabbelt, Alistair Francis, Bin Meng, Weiwei Li,
Daniel Henrique Barboza, Liu Zhiwei, open list:RISC-V TCG CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/riscv/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 80b09952e7..4329015076 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -2661,7 +2661,7 @@ RISCVCPUImpliedExtsRule *riscv_multi_ext_implied_rules[] = {
NULL
};
-static Property riscv_cpu_properties[] = {
+static const Property riscv_cpu_properties[] = {
DEFINE_PROP_BOOL("debug", RISCVCPU, cfg.debug, true),
{.name = "pmu-mask", .info = &prop_pmu_mask},
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 08/71] target/riscv: Constify all Property
2024-12-13 19:06 ` [PATCH 08/71] target/riscv: Constify all Property Richard Henderson
@ 2024-12-13 20:38 ` Daniel Henrique Barboza
0 siblings, 0 replies; 124+ messages in thread
From: Daniel Henrique Barboza @ 2024-12-13 20:38 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Palmer Dabbelt, Alistair Francis, Bin Meng, Weiwei Li, Liu Zhiwei,
open list:RISC-V TCG CPUs
On 12/13/24 4:06 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> target/riscv/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index 80b09952e7..4329015076 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -2661,7 +2661,7 @@ RISCVCPUImpliedExtsRule *riscv_multi_ext_implied_rules[] = {
> NULL
> };
>
> -static Property riscv_cpu_properties[] = {
> +static const Property riscv_cpu_properties[] = {
> DEFINE_PROP_BOOL("debug", RISCVCPU, cfg.debug, true),
>
> {.name = "pmu-mask", .info = &prop_pmu_mask},
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 09/71] target/s390x: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (11 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 08/71] target/riscv: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 10/71] target/sparc: Constify all Property and PropertyInfo Richard Henderson
` (59 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: David Hildenbrand, Ilya Leoshkevich, Thomas Huth,
open list:S390 TCG CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/s390x/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index adb27504ad..4702761ca3 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -309,7 +309,7 @@ static const gchar *s390_gdb_arch_name(CPUState *cs)
return "s390:64-bit";
}
-static Property s390x_cpu_properties[] = {
+static const Property s390x_cpu_properties[] = {
#if !defined(CONFIG_USER_ONLY)
DEFINE_PROP_UINT32("core-id", S390CPU, env.core_id, 0),
DEFINE_PROP_INT32("socket-id", S390CPU, env.socket_id, -1),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 10/71] target/sparc: Constify all Property and PropertyInfo
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (12 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 09/71] target/s390x: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 11/71] cpu-target: Constify all Property Richard Henderson
` (58 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Mark Cave-Ayland, Artyom Tarasenko
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index 284df950e0..8f494c286a 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -874,14 +874,14 @@ static void sparc_set_nwindows(Object *obj, Visitor *v, const char *name,
cpu->env.def.nwindows = value;
}
-static PropertyInfo qdev_prop_nwindows = {
+static const PropertyInfo qdev_prop_nwindows = {
.name = "int",
.get = sparc_get_nwindows,
.set = sparc_set_nwindows,
};
/* This must match feature_name[]. */
-static Property sparc_cpu_properties[] = {
+static const Property sparc_cpu_properties[] = {
DEFINE_PROP_BIT("float128", SPARCCPU, env.def.features,
CPU_FEATURE_BIT_FLOAT128, false),
#ifdef TARGET_SPARC64
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 11/71] cpu-target: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (13 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 10/71] target/sparc: Constify all Property and PropertyInfo Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 12/71] hw/9pfs: " Richard Henderson
` (57 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
cpu-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpu-target.c b/cpu-target.c
index 499facf774..2ae07a779e 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -183,7 +183,7 @@ void cpu_exec_unrealizefn(CPUState *cpu)
* This can't go in hw/core/cpu.c because that file is compiled only
* once for both user-mode and system builds.
*/
-static Property cpu_common_props[] = {
+static const Property cpu_common_props[] = {
#ifdef CONFIG_USER_ONLY
/*
* Create a property for the user-only object, so users can
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 12/71] hw/9pfs: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (14 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 11/71] cpu-target: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-14 6:56 ` Greg Kurz
2024-12-14 10:02 ` Christian Schoenebeck
2024-12-13 19:06 ` [PATCH 13/71] hw/acpi: " Richard Henderson
` (56 subsequent siblings)
72 siblings, 2 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael S. Tsirkin, Greg Kurz, Christian Schoenebeck
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/9pfs/virtio-9p-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index efa41cfd73..b764e4cd3d 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -243,7 +243,7 @@ static const VMStateDescription vmstate_virtio_9p = {
},
};
-static Property virtio_9p_properties[] = {
+static const Property virtio_9p_properties[] = {
DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 12/71] hw/9pfs: Constify all Property
2024-12-13 19:06 ` [PATCH 12/71] hw/9pfs: " Richard Henderson
@ 2024-12-14 6:56 ` Greg Kurz
2024-12-14 10:02 ` Christian Schoenebeck
1 sibling, 0 replies; 124+ messages in thread
From: Greg Kurz @ 2024-12-14 6:56 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Michael S. Tsirkin, Christian Schoenebeck
On Fri, 13 Dec 2024 13:06:46 -0600
Richard Henderson <richard.henderson@linaro.org> wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
Reviewed-by: Greg Kurz <groug@kaod.org>
> hw/9pfs/virtio-9p-device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
> index efa41cfd73..b764e4cd3d 100644
> --- a/hw/9pfs/virtio-9p-device.c
> +++ b/hw/9pfs/virtio-9p-device.c
> @@ -243,7 +243,7 @@ static const VMStateDescription vmstate_virtio_9p = {
> },
> };
>
> -static Property virtio_9p_properties[] = {
> +static const Property virtio_9p_properties[] = {
> DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
> DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
> DEFINE_PROP_END_OF_LIST(),
--
Greg
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 12/71] hw/9pfs: Constify all Property
2024-12-13 19:06 ` [PATCH 12/71] hw/9pfs: " Richard Henderson
2024-12-14 6:56 ` Greg Kurz
@ 2024-12-14 10:02 ` Christian Schoenebeck
1 sibling, 0 replies; 124+ messages in thread
From: Christian Schoenebeck @ 2024-12-14 10:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael S. Tsirkin, Greg Kurz, Richard Henderson
On Friday, December 13, 2024 8:06:46 PM CET Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> hw/9pfs/virtio-9p-device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
> index efa41cfd73..b764e4cd3d 100644
> --- a/hw/9pfs/virtio-9p-device.c
> +++ b/hw/9pfs/virtio-9p-device.c
> @@ -243,7 +243,7 @@ static const VMStateDescription vmstate_virtio_9p = {
> },
> };
>
> -static Property virtio_9p_properties[] = {
> +static const Property virtio_9p_properties[] = {
> DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
> DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
> DEFINE_PROP_END_OF_LIST(),
>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 13/71] hw/acpi: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (15 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 12/71] hw/9pfs: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 14/71] hw/adc: " Richard Henderson
` (55 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Igor Mammedov, Ani Sinha, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Aurelien Jarno
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/acpi/erst.c | 2 +-
hw/acpi/generic_event_device.c | 2 +-
hw/acpi/piix4.c | 2 +-
hw/acpi/vmgenid.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c
index a108cfe49b..5ef5ddccb6 100644
--- a/hw/acpi/erst.c
+++ b/hw/acpi/erst.c
@@ -1011,7 +1011,7 @@ static void erst_reset(DeviceState *dev)
trace_acpi_erst_reset_out(le32_to_cpu(s->header->record_count));
}
-static Property erst_properties[] = {
+static const Property erst_properties[] = {
DEFINE_PROP_LINK(ACPI_ERST_MEMDEV_PROP, ERSTDeviceState, hostmem,
TYPE_MEMORY_BACKEND, HostMemoryBackend *),
DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState,
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 663d9cb093..8c4706f8cf 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -316,7 +316,7 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
qemu_irq_pulse(s->irq);
}
-static Property acpi_ged_properties[] = {
+static const Property acpi_ged_properties[] = {
DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 1de3fe3261..2bfaf5a38d 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -602,7 +602,7 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
acpi_send_gpe_event(&s->ar, s->irq, ev);
}
-static Property piix4_pm_properties[] = {
+static const Property piix4_pm_properties[] = {
DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 0),
DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0),
diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
index e63c8af4c3..9c2ca85cc7 100644
--- a/hw/acpi/vmgenid.c
+++ b/hw/acpi/vmgenid.c
@@ -214,7 +214,7 @@ static void vmgenid_realize(DeviceState *dev, Error **errp)
vmgenid_update_guest(vms);
}
-static Property vmgenid_device_properties[] = {
+static const Property vmgenid_device_properties[] = {
DEFINE_PROP_UUID(VMGENID_GUID, VmGenIdState, guid),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 14/71] hw/adc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (16 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 13/71] hw/acpi: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-14 10:02 ` Cédric Le Goater
2024-12-13 19:06 ` [PATCH 15/71] hw/arm: " Richard Henderson
` (54 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Alistair Francis, Peter Maydell, Cédric Le Goater,
Steven Lee, Troy Lee, Jamin Lin, Andrew Jeffery, Joel Stanley,
Tyrone Ting, Hao Wu, open list:STM32F205
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/adc/aspeed_adc.c | 2 +-
hw/adc/npcm7xx_adc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/adc/aspeed_adc.c b/hw/adc/aspeed_adc.c
index 598f2bdf48..f94c6f2be3 100644
--- a/hw/adc/aspeed_adc.c
+++ b/hw/adc/aspeed_adc.c
@@ -286,7 +286,7 @@ static const VMStateDescription vmstate_aspeed_adc_engine = {
}
};
-static Property aspeed_adc_engine_properties[] = {
+static const Property aspeed_adc_engine_properties[] = {
DEFINE_PROP_UINT32("engine-id", AspeedADCEngineState, engine_id, 0),
DEFINE_PROP_UINT32("nr-channels", AspeedADCEngineState, nr_channels, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c
index de8469dae4..1781ff4c0b 100644
--- a/hw/adc/npcm7xx_adc.c
+++ b/hw/adc/npcm7xx_adc.c
@@ -267,7 +267,7 @@ static const VMStateDescription vmstate_npcm7xx_adc = {
},
};
-static Property npcm7xx_timer_properties[] = {
+static const Property npcm7xx_timer_properties[] = {
DEFINE_PROP_UINT32("iref", NPCM7xxADCState, iref, NPCM7XX_ADC_DEFAULT_IREF),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 14/71] hw/adc: Constify all Property
2024-12-13 19:06 ` [PATCH 14/71] hw/adc: " Richard Henderson
@ 2024-12-14 10:02 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:02 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Alistair Francis, Peter Maydell, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Tyrone Ting, Hao Wu,
open list:STM32F205
On 12/13/24 20:06, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/adc/aspeed_adc.c | 2 +-
> hw/adc/npcm7xx_adc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/adc/aspeed_adc.c b/hw/adc/aspeed_adc.c
> index 598f2bdf48..f94c6f2be3 100644
> --- a/hw/adc/aspeed_adc.c
> +++ b/hw/adc/aspeed_adc.c
> @@ -286,7 +286,7 @@ static const VMStateDescription vmstate_aspeed_adc_engine = {
> }
> };
>
> -static Property aspeed_adc_engine_properties[] = {
> +static const Property aspeed_adc_engine_properties[] = {
> DEFINE_PROP_UINT32("engine-id", AspeedADCEngineState, engine_id, 0),
> DEFINE_PROP_UINT32("nr-channels", AspeedADCEngineState, nr_channels, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c
> index de8469dae4..1781ff4c0b 100644
> --- a/hw/adc/npcm7xx_adc.c
> +++ b/hw/adc/npcm7xx_adc.c
> @@ -267,7 +267,7 @@ static const VMStateDescription vmstate_npcm7xx_adc = {
> },
> };
>
> -static Property npcm7xx_timer_properties[] = {
> +static const Property npcm7xx_timer_properties[] = {
> DEFINE_PROP_UINT32("iref", NPCM7xxADCState, iref, NPCM7XX_ADC_DEFAULT_IREF),
> DEFINE_PROP_END_OF_LIST(),
> };
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 15/71] hw/arm: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (17 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 14/71] hw/adc: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-14 10:03 ` Cédric Le Goater
2024-12-13 19:06 ` [PATCH 16/71] hw/audio: " Richard Henderson
` (53 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Cédric Le Goater, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley,
Philippe Mathieu-Daudé, Jean-Christophe Dubois,
Andrey Smirnov, Subbaraya Sundeep, Tyrone Ting, Hao Wu,
Eric Auger, Alistair Francis, Edgar E. Iglesias,
open list:MPS2 / MPS3
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/arm/armsse.c | 8 ++++----
hw/arm/armv7m.c | 4 ++--
hw/arm/aspeed_soc_common.c | 2 +-
hw/arm/bcm2836.c | 2 +-
hw/arm/fsl-imx25.c | 2 +-
hw/arm/fsl-imx6.c | 2 +-
hw/arm/fsl-imx6ul.c | 2 +-
hw/arm/fsl-imx7.c | 2 +-
hw/arm/integratorcp.c | 2 +-
hw/arm/msf2-soc.c | 2 +-
hw/arm/npcm7xx.c | 2 +-
hw/arm/nrf51_soc.c | 2 +-
hw/arm/smmu-common.c | 2 +-
hw/arm/smmuv3.c | 2 +-
hw/arm/stellaris.c | 2 +-
hw/arm/strongarm.c | 2 +-
hw/arm/xlnx-versal.c | 2 +-
hw/arm/xlnx-zynqmp.c | 2 +-
18 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index 58ed504b2b..1cd6b4a4b2 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -72,12 +72,12 @@ struct ARMSSEInfo {
bool has_cpu_pwrctrl;
bool has_sse_counter;
bool has_tcms;
- Property *props;
+ const Property *props;
const ARMSSEDeviceInfo *devinfo;
const bool *irq_is_common;
};
-static Property iotkit_properties[] = {
+static const Property iotkit_properties[] = {
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
@@ -90,7 +90,7 @@ static Property iotkit_properties[] = {
DEFINE_PROP_END_OF_LIST()
};
-static Property sse200_properties[] = {
+static const Property sse200_properties[] = {
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
@@ -107,7 +107,7 @@ static Property sse200_properties[] = {
DEFINE_PROP_END_OF_LIST()
};
-static Property sse300_properties[] = {
+static const Property sse300_properties[] = {
DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 7c68525a9e..e20f719c9b 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -538,7 +538,7 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
}
}
-static Property armv7m_properties[] = {
+static const Property armv7m_properties[] = {
DEFINE_PROP_STRING("cpu-type", ARMv7MState, cpu_type),
DEFINE_PROP_LINK("memory", ARMv7MState, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
@@ -631,7 +631,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename,
qemu_register_reset(armv7m_reset, cpu);
}
-static Property bitband_properties[] = {
+static const Property bitband_properties[] = {
DEFINE_PROP_UINT32("base", BitBandState, base, 0),
DEFINE_PROP_LINK("source-memory", BitBandState, source_memory,
TYPE_MEMORY_REGION, MemoryRegion *),
diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c
index a5ff33c46d..4221cacd51 100644
--- a/hw/arm/aspeed_soc_common.c
+++ b/hw/arm/aspeed_soc_common.c
@@ -139,7 +139,7 @@ static bool aspeed_soc_boot_from_emmc(AspeedSoCState *s)
return false;
}
-static Property aspeed_soc_properties[] = {
+static const Property aspeed_soc_properties[] = {
DEFINE_PROP_LINK("dram", AspeedSoCState, dram_mr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 40a379bc36..95e16806fa 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -18,7 +18,7 @@
#include "target/arm/cpu-qom.h"
#include "target/arm/gtimer.h"
-static Property bcm2836_enabled_cores_property =
+static const Property bcm2836_enabled_cores_property =
DEFINE_PROP_UINT32("enabled-cpus", BCM283XBaseState, enabled_cpus, 0);
static void bcm283x_base_init(Object *obj)
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 5ed87edfe4..48763b03fe 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -309,7 +309,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
&s->iram_alias);
}
-static Property fsl_imx25_properties[] = {
+static const Property fsl_imx25_properties[] = {
DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 85748cb233..236d15bc9c 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -481,7 +481,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
&s->ocram_alias);
}
-static Property fsl_imx6_properties[] = {
+static const Property fsl_imx6_properties[] = {
DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
index 19f443570b..1e0bbbb5d7 100644
--- a/hw/arm/fsl-imx6ul.c
+++ b/hw/arm/fsl-imx6ul.c
@@ -718,7 +718,7 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp)
FSL_IMX6UL_OCRAM_ALIAS_ADDR, &s->ocram_alias);
}
-static Property fsl_imx6ul_properties[] = {
+static const Property fsl_imx6ul_properties[] = {
DEFINE_PROP_UINT32("fec1-phy-num", FslIMX6ULState, phy_num[0], 0),
DEFINE_PROP_UINT32("fec2-phy-num", FslIMX6ULState, phy_num[1], 1),
DEFINE_PROP_BOOL("fec1-phy-connected", FslIMX6ULState, phy_connected[0],
diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index 9f2ef34555..0310c15b0c 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -736,7 +736,7 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
&s->caam);
}
-static Property fsl_imx7_properties[] = {
+static const Property fsl_imx7_properties[] = {
DEFINE_PROP_UINT32("fec1-phy-num", FslIMX7State, phy_num[0], 0),
DEFINE_PROP_UINT32("fec2-phy-num", FslIMX7State, phy_num[1], 1),
DEFINE_PROP_BOOL("fec1-phy-connected", FslIMX7State, phy_connected[0],
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index feb0dd63df..ee6c7e0c0d 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -694,7 +694,7 @@ static void integratorcp_machine_init(MachineClass *mc)
DEFINE_MACHINE("integratorcp", integratorcp_machine_init)
-static Property core_properties[] = {
+static const Property core_properties[] = {
DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
index c4999ebce3..5d7c3f2e5a 100644
--- a/hw/arm/msf2-soc.c
+++ b/hw/arm/msf2-soc.c
@@ -222,7 +222,7 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp)
create_unimplemented_device("usb", 0x40043000, 0x1000);
}
-static Property m2sxxx_soc_properties[] = {
+static const Property m2sxxx_soc_properties[] = {
/*
* part name specifies the type of SmartFusion2 device variant(this
* property is for information purpose only.
diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
index af04c4b7ec..2960b63b59 100644
--- a/hw/arm/npcm7xx.c
+++ b/hw/arm/npcm7xx.c
@@ -810,7 +810,7 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
create_unimplemented_device("npcm7xx.spix", 0xfb001000, 4 * KiB);
}
-static Property npcm7xx_properties[] = {
+static const Property npcm7xx_properties[] = {
DEFINE_PROP_LINK("dram-mr", NPCM7xxState, dram, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
index ac53441630..43fac8a8db 100644
--- a/hw/arm/nrf51_soc.c
+++ b/hw/arm/nrf51_soc.c
@@ -208,7 +208,7 @@ static void nrf51_soc_init(Object *obj)
s->sysclk = qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0);
}
-static Property nrf51_soc_properties[] = {
+static const Property nrf51_soc_properties[] = {
DEFINE_PROP_LINK("memory", NRF51State, board_memory, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_SIZE),
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index 3f82728758..6baa9d0fc3 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -934,7 +934,7 @@ static void smmu_base_reset_hold(Object *obj, ResetType type)
g_hash_table_remove_all(s->iotlb);
}
-static Property smmu_dev_properties[] = {
+static const Property smmu_dev_properties[] = {
DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0),
DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus,
TYPE_PCI_BUS, PCIBus *),
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 6e847e8773..026838f9ac 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1976,7 +1976,7 @@ static const VMStateDescription vmstate_smmuv3 = {
}
};
-static Property smmuv3_properties[] = {
+static const Property smmuv3_properties[] = {
/*
* Stages of translation advertised.
* "1": Stage 1
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 376746251e..7fc13d96c9 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -438,7 +438,7 @@ static const VMStateDescription vmstate_stellaris_sys = {
}
};
-static Property stellaris_sys_properties[] = {
+static const Property stellaris_sys_properties[] = {
DEFINE_PROP_UINT32("user0", ssys_state, user0, 0),
DEFINE_PROP_UINT32("user1", ssys_state, user1, 0),
DEFINE_PROP_UINT32("did0", ssys_state, did0, 0),
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
index 612115ab5b..4c4ff21e80 100644
--- a/hw/arm/strongarm.c
+++ b/hw/arm/strongarm.c
@@ -1332,7 +1332,7 @@ static const VMStateDescription vmstate_strongarm_uart_regs = {
},
};
-static Property strongarm_uart_properties[] = {
+static const Property strongarm_uart_properties[] = {
DEFINE_PROP_CHR("chardev", StrongARMUARTState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
index 3a1e2e29f1..3adbe7b1fb 100644
--- a/hw/arm/xlnx-versal.c
+++ b/hw/arm/xlnx-versal.c
@@ -968,7 +968,7 @@ static void versal_init(Object *obj)
"mr-rpu-ps-alias", &s->mr_ps, 0, UINT64_MAX);
}
-static Property versal_properties[] = {
+static const Property versal_properties[] = {
DEFINE_PROP_LINK("ddr", Versal, cfg.mr_ddr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_LINK("canbus0", Versal, lpd.iou.canbus[0],
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index ab2d50e31b..1082c62c30 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -857,7 +857,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
}
}
-static Property xlnx_zynqmp_props[] = {
+static const Property xlnx_zynqmp_props[] = {
DEFINE_PROP_STRING("boot-cpu", XlnxZynqMPState, boot_cpu),
DEFINE_PROP_BOOL("secure", XlnxZynqMPState, secure, false),
DEFINE_PROP_BOOL("virtualization", XlnxZynqMPState, virt, false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 15/71] hw/arm: Constify all Property
2024-12-13 19:06 ` [PATCH 15/71] hw/arm: " Richard Henderson
@ 2024-12-14 10:03 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:03 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Steven Lee, Troy Lee, Jamin Lin, Andrew Jeffery,
Joel Stanley, Philippe Mathieu-Daudé, Jean-Christophe Dubois,
Andrey Smirnov, Subbaraya Sundeep, Tyrone Ting, Hao Wu,
Eric Auger, Alistair Francis, Edgar E. Iglesias,
open list:MPS2 / MPS3
On 12/13/24 20:06, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/arm/armsse.c | 8 ++++----
> hw/arm/armv7m.c | 4 ++--
> hw/arm/aspeed_soc_common.c | 2 +-
> hw/arm/bcm2836.c | 2 +-
> hw/arm/fsl-imx25.c | 2 +-
> hw/arm/fsl-imx6.c | 2 +-
> hw/arm/fsl-imx6ul.c | 2 +-
> hw/arm/fsl-imx7.c | 2 +-
> hw/arm/integratorcp.c | 2 +-
> hw/arm/msf2-soc.c | 2 +-
> hw/arm/npcm7xx.c | 2 +-
> hw/arm/nrf51_soc.c | 2 +-
> hw/arm/smmu-common.c | 2 +-
> hw/arm/smmuv3.c | 2 +-
> hw/arm/stellaris.c | 2 +-
> hw/arm/strongarm.c | 2 +-
> hw/arm/xlnx-versal.c | 2 +-
> hw/arm/xlnx-zynqmp.c | 2 +-
> 18 files changed, 22 insertions(+), 22 deletions(-)
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
> index 58ed504b2b..1cd6b4a4b2 100644
> --- a/hw/arm/armsse.c
> +++ b/hw/arm/armsse.c
> @@ -72,12 +72,12 @@ struct ARMSSEInfo {
> bool has_cpu_pwrctrl;
> bool has_sse_counter;
> bool has_tcms;
> - Property *props;
> + const Property *props;
> const ARMSSEDeviceInfo *devinfo;
> const bool *irq_is_common;
> };
>
> -static Property iotkit_properties[] = {
> +static const Property iotkit_properties[] = {
> DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
> @@ -90,7 +90,7 @@ static Property iotkit_properties[] = {
> DEFINE_PROP_END_OF_LIST()
> };
>
> -static Property sse200_properties[] = {
> +static const Property sse200_properties[] = {
> DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
> @@ -107,7 +107,7 @@ static Property sse200_properties[] = {
> DEFINE_PROP_END_OF_LIST()
> };
>
> -static Property sse300_properties[] = {
> +static const Property sse300_properties[] = {
> DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index 7c68525a9e..e20f719c9b 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -538,7 +538,7 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property armv7m_properties[] = {
> +static const Property armv7m_properties[] = {
> DEFINE_PROP_STRING("cpu-type", ARMv7MState, cpu_type),
> DEFINE_PROP_LINK("memory", ARMv7MState, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> @@ -631,7 +631,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename,
> qemu_register_reset(armv7m_reset, cpu);
> }
>
> -static Property bitband_properties[] = {
> +static const Property bitband_properties[] = {
> DEFINE_PROP_UINT32("base", BitBandState, base, 0),
> DEFINE_PROP_LINK("source-memory", BitBandState, source_memory,
> TYPE_MEMORY_REGION, MemoryRegion *),
> diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c
> index a5ff33c46d..4221cacd51 100644
> --- a/hw/arm/aspeed_soc_common.c
> +++ b/hw/arm/aspeed_soc_common.c
> @@ -139,7 +139,7 @@ static bool aspeed_soc_boot_from_emmc(AspeedSoCState *s)
> return false;
> }
>
> -static Property aspeed_soc_properties[] = {
> +static const Property aspeed_soc_properties[] = {
> DEFINE_PROP_LINK("dram", AspeedSoCState, dram_mr, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
> diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
> index 40a379bc36..95e16806fa 100644
> --- a/hw/arm/bcm2836.c
> +++ b/hw/arm/bcm2836.c
> @@ -18,7 +18,7 @@
> #include "target/arm/cpu-qom.h"
> #include "target/arm/gtimer.h"
>
> -static Property bcm2836_enabled_cores_property =
> +static const Property bcm2836_enabled_cores_property =
> DEFINE_PROP_UINT32("enabled-cpus", BCM283XBaseState, enabled_cpus, 0);
>
> static void bcm283x_base_init(Object *obj)
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index 5ed87edfe4..48763b03fe 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -309,7 +309,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
> &s->iram_alias);
> }
>
> -static Property fsl_imx25_properties[] = {
> +static const Property fsl_imx25_properties[] = {
> DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
> index 85748cb233..236d15bc9c 100644
> --- a/hw/arm/fsl-imx6.c
> +++ b/hw/arm/fsl-imx6.c
> @@ -481,7 +481,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
> &s->ocram_alias);
> }
>
> -static Property fsl_imx6_properties[] = {
> +static const Property fsl_imx6_properties[] = {
> DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
> index 19f443570b..1e0bbbb5d7 100644
> --- a/hw/arm/fsl-imx6ul.c
> +++ b/hw/arm/fsl-imx6ul.c
> @@ -718,7 +718,7 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp)
> FSL_IMX6UL_OCRAM_ALIAS_ADDR, &s->ocram_alias);
> }
>
> -static Property fsl_imx6ul_properties[] = {
> +static const Property fsl_imx6ul_properties[] = {
> DEFINE_PROP_UINT32("fec1-phy-num", FslIMX6ULState, phy_num[0], 0),
> DEFINE_PROP_UINT32("fec2-phy-num", FslIMX6ULState, phy_num[1], 1),
> DEFINE_PROP_BOOL("fec1-phy-connected", FslIMX6ULState, phy_connected[0],
> diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
> index 9f2ef34555..0310c15b0c 100644
> --- a/hw/arm/fsl-imx7.c
> +++ b/hw/arm/fsl-imx7.c
> @@ -736,7 +736,7 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
> &s->caam);
> }
>
> -static Property fsl_imx7_properties[] = {
> +static const Property fsl_imx7_properties[] = {
> DEFINE_PROP_UINT32("fec1-phy-num", FslIMX7State, phy_num[0], 0),
> DEFINE_PROP_UINT32("fec2-phy-num", FslIMX7State, phy_num[1], 1),
> DEFINE_PROP_BOOL("fec1-phy-connected", FslIMX7State, phy_connected[0],
> diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
> index feb0dd63df..ee6c7e0c0d 100644
> --- a/hw/arm/integratorcp.c
> +++ b/hw/arm/integratorcp.c
> @@ -694,7 +694,7 @@ static void integratorcp_machine_init(MachineClass *mc)
>
> DEFINE_MACHINE("integratorcp", integratorcp_machine_init)
>
> -static Property core_properties[] = {
> +static const Property core_properties[] = {
> DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
> index c4999ebce3..5d7c3f2e5a 100644
> --- a/hw/arm/msf2-soc.c
> +++ b/hw/arm/msf2-soc.c
> @@ -222,7 +222,7 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp)
> create_unimplemented_device("usb", 0x40043000, 0x1000);
> }
>
> -static Property m2sxxx_soc_properties[] = {
> +static const Property m2sxxx_soc_properties[] = {
> /*
> * part name specifies the type of SmartFusion2 device variant(this
> * property is for information purpose only.
> diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
> index af04c4b7ec..2960b63b59 100644
> --- a/hw/arm/npcm7xx.c
> +++ b/hw/arm/npcm7xx.c
> @@ -810,7 +810,7 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
> create_unimplemented_device("npcm7xx.spix", 0xfb001000, 4 * KiB);
> }
>
> -static Property npcm7xx_properties[] = {
> +static const Property npcm7xx_properties[] = {
> DEFINE_PROP_LINK("dram-mr", NPCM7xxState, dram, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
> index ac53441630..43fac8a8db 100644
> --- a/hw/arm/nrf51_soc.c
> +++ b/hw/arm/nrf51_soc.c
> @@ -208,7 +208,7 @@ static void nrf51_soc_init(Object *obj)
> s->sysclk = qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0);
> }
>
> -static Property nrf51_soc_properties[] = {
> +static const Property nrf51_soc_properties[] = {
> DEFINE_PROP_LINK("memory", NRF51State, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_SIZE),
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 3f82728758..6baa9d0fc3 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -934,7 +934,7 @@ static void smmu_base_reset_hold(Object *obj, ResetType type)
> g_hash_table_remove_all(s->iotlb);
> }
>
> -static Property smmu_dev_properties[] = {
> +static const Property smmu_dev_properties[] = {
> DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0),
> DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus,
> TYPE_PCI_BUS, PCIBus *),
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 6e847e8773..026838f9ac 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -1976,7 +1976,7 @@ static const VMStateDescription vmstate_smmuv3 = {
> }
> };
>
> -static Property smmuv3_properties[] = {
> +static const Property smmuv3_properties[] = {
> /*
> * Stages of translation advertised.
> * "1": Stage 1
> diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
> index 376746251e..7fc13d96c9 100644
> --- a/hw/arm/stellaris.c
> +++ b/hw/arm/stellaris.c
> @@ -438,7 +438,7 @@ static const VMStateDescription vmstate_stellaris_sys = {
> }
> };
>
> -static Property stellaris_sys_properties[] = {
> +static const Property stellaris_sys_properties[] = {
> DEFINE_PROP_UINT32("user0", ssys_state, user0, 0),
> DEFINE_PROP_UINT32("user1", ssys_state, user1, 0),
> DEFINE_PROP_UINT32("did0", ssys_state, did0, 0),
> diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
> index 612115ab5b..4c4ff21e80 100644
> --- a/hw/arm/strongarm.c
> +++ b/hw/arm/strongarm.c
> @@ -1332,7 +1332,7 @@ static const VMStateDescription vmstate_strongarm_uart_regs = {
> },
> };
>
> -static Property strongarm_uart_properties[] = {
> +static const Property strongarm_uart_properties[] = {
> DEFINE_PROP_CHR("chardev", StrongARMUARTState, chr),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
> index 3a1e2e29f1..3adbe7b1fb 100644
> --- a/hw/arm/xlnx-versal.c
> +++ b/hw/arm/xlnx-versal.c
> @@ -968,7 +968,7 @@ static void versal_init(Object *obj)
> "mr-rpu-ps-alias", &s->mr_ps, 0, UINT64_MAX);
> }
>
> -static Property versal_properties[] = {
> +static const Property versal_properties[] = {
> DEFINE_PROP_LINK("ddr", Versal, cfg.mr_ddr, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_LINK("canbus0", Versal, lpd.iou.canbus[0],
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index ab2d50e31b..1082c62c30 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -857,7 +857,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property xlnx_zynqmp_props[] = {
> +static const Property xlnx_zynqmp_props[] = {
> DEFINE_PROP_STRING("boot-cpu", XlnxZynqMPState, boot_cpu),
> DEFINE_PROP_BOOL("secure", XlnxZynqMPState, secure, false),
> DEFINE_PROP_BOOL("virtualization", XlnxZynqMPState, virt, false),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 16/71] hw/audio: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (18 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 15/71] hw/arm: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 17/71] hw/avr: " Richard Henderson
` (52 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Gerd Hoffmann, Laurent Vivier, Michael S. Tsirkin,
Manos Pitsidianakis
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/audio/ac97.c | 2 +-
hw/audio/adlib.c | 2 +-
hw/audio/asc.c | 2 +-
hw/audio/cs4231a.c | 2 +-
hw/audio/es1370.c | 2 +-
hw/audio/gus.c | 2 +-
hw/audio/hda-codec.c | 2 +-
hw/audio/intel-hda.c | 4 ++--
hw/audio/pcspk.c | 2 +-
hw/audio/pl041.c | 2 +-
hw/audio/sb16.c | 2 +-
hw/audio/via-ac97.c | 2 +-
hw/audio/virtio-snd-pci.c | 2 +-
hw/audio/virtio-snd.c | 2 +-
hw/audio/wm8750.c | 2 +-
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index e373f09d78..8033bbbaed 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1324,7 +1324,7 @@ static void ac97_exit(PCIDevice *dev)
AUD_remove_card(&s->card);
}
-static Property ac97_properties[] = {
+static const Property ac97_properties[] = {
DEFINE_AUDIO_PROPERTIES(AC97LinkState, card),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index bd73806d83..c1d8faecb4 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -297,7 +297,7 @@ static void adlib_realizefn (DeviceState *dev, Error **errp)
portio_list_add (&s->port_list, isa_address_space_io(&s->parent_obj), 0);
}
-static Property adlib_properties[] = {
+static const Property adlib_properties[] = {
DEFINE_AUDIO_PROPERTIES(AdlibState, card),
DEFINE_PROP_UINT32 ("iobase", AdlibState, port, 0x220),
DEFINE_PROP_UINT32 ("freq", AdlibState, freq, 44100),
diff --git a/hw/audio/asc.c b/hw/audio/asc.c
index 805416372c..452039418d 100644
--- a/hw/audio/asc.c
+++ b/hw/audio/asc.c
@@ -695,7 +695,7 @@ static void asc_init(Object *obj)
sysbus_init_mmio(sbd, &s->asc);
}
-static Property asc_properties[] = {
+static const Property asc_properties[] = {
DEFINE_AUDIO_PROPERTIES(ASCState, card),
DEFINE_PROP_UINT8("asctype", ASCState, type, ASC_TYPE_ASC),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index 2d69372087..abc38720a3 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -689,7 +689,7 @@ static void cs4231a_realizefn (DeviceState *dev, Error **errp)
isa_register_ioport (d, &s->ioports, s->port);
}
-static Property cs4231a_properties[] = {
+static const Property cs4231a_properties[] = {
DEFINE_AUDIO_PROPERTIES(CSState, card),
DEFINE_PROP_UINT32 ("iobase", CSState, port, 0x534),
DEFINE_PROP_UINT32 ("irq", CSState, irq, 9),
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index 9a508e7b81..6170425a5a 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -868,7 +868,7 @@ static void es1370_exit(PCIDevice *dev)
AUD_remove_card(&s->card);
}
-static Property es1370_properties[] = {
+static const Property es1370_properties[] = {
DEFINE_AUDIO_PROPERTIES(ES1370State, card),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 4beb3fd74e..dd5a5a3441 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -290,7 +290,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp)
AUD_set_active_out (s->voice, 1);
}
-static Property gus_properties[] = {
+static const Property gus_properties[] = {
DEFINE_AUDIO_PROPERTIES(GUSState, card),
DEFINE_PROP_UINT32 ("freq", GUSState, freq, 44100),
DEFINE_PROP_UINT32 ("iobase", GUSState, port, 0x240),
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index c340a9481d..8bd8f62c48 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -857,7 +857,7 @@ static const VMStateDescription vmstate_hda_audio = {
}
};
-static Property hda_audio_properties[] = {
+static const Property hda_audio_properties[] = {
DEFINE_AUDIO_PROPERTIES(HDAAudioState, card),
DEFINE_PROP_UINT32("debug", HDAAudioState, debug, 0),
DEFINE_PROP_BOOL("mixer", HDAAudioState, mixer, true),
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 6918e23c5d..3e4a755228 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -37,7 +37,7 @@
/* --------------------------------------------------------------------- */
/* hda bus */
-static Property hda_props[] = {
+static const Property hda_props[] = {
DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1),
DEFINE_PROP_END_OF_LIST()
};
@@ -1215,7 +1215,7 @@ static const VMStateDescription vmstate_intel_hda = {
}
};
-static Property intel_hda_properties[] = {
+static const Property intel_hda_properties[] = {
DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
DEFINE_PROP_ON_OFF_AUTO("msi", IntelHDAState, msi, ON_OFF_AUTO_AUTO),
DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false),
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index a4b89f1768..7a6b9f52d3 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -215,7 +215,7 @@ static const VMStateDescription vmstate_spk = {
}
};
-static Property pcspk_properties[] = {
+static const Property pcspk_properties[] = {
DEFINE_AUDIO_PROPERTIES(PCSpkState, card),
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, 0x61),
DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true),
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
index eb96dc2898..6c66a240cb 100644
--- a/hw/audio/pl041.c
+++ b/hw/audio/pl041.c
@@ -625,7 +625,7 @@ static const VMStateDescription vmstate_pl041 = {
}
};
-static Property pl041_device_properties[] = {
+static const Property pl041_device_properties[] = {
DEFINE_AUDIO_PROPERTIES(PL041State, codec.card),
/* Non-compact FIFO depth property */
DEFINE_PROP_UINT32("nc_fifo_depth", PL041State, fifo_depth,
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index fd76e78d18..143b9e71e1 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -1440,7 +1440,7 @@ static void sb16_realizefn (DeviceState *dev, Error **errp)
s->can_write = 1;
}
-static Property sb16_properties[] = {
+static const Property sb16_properties[] = {
DEFINE_AUDIO_PROPERTIES(SB16State, card),
DEFINE_PROP_UINT32 ("version", SB16State, ver, 0x0405), /* 4.5 */
DEFINE_PROP_UINT32 ("iobase", SB16State, port, 0x220),
diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c
index 85243e6313..e43ddf37f3 100644
--- a/hw/audio/via-ac97.c
+++ b/hw/audio/via-ac97.c
@@ -459,7 +459,7 @@ static void via_ac97_exit(PCIDevice *dev)
AUD_remove_card(&s->card);
}
-static Property via_ac97_properties[] = {
+static const Property via_ac97_properties[] = {
DEFINE_AUDIO_PROPERTIES(ViaAC97State, card),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/audio/virtio-snd-pci.c b/hw/audio/virtio-snd-pci.c
index ab58c6410e..b762d7e81e 100644
--- a/hw/audio/virtio-snd-pci.c
+++ b/hw/audio/virtio-snd-pci.c
@@ -27,7 +27,7 @@ struct VirtIOSoundPCI {
VirtIOSound vdev;
};
-static Property virtio_snd_pci_properties[] = {
+static const Property virtio_snd_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
index c5581d7b3d..e2b112e059 100644
--- a/hw/audio/virtio-snd.c
+++ b/hw/audio/virtio-snd.c
@@ -77,7 +77,7 @@ static const VMStateDescription vmstate_virtio_snd = {
},
};
-static Property virtio_snd_properties[] = {
+static const Property virtio_snd_properties[] = {
DEFINE_AUDIO_PROPERTIES(VirtIOSound, card),
DEFINE_PROP_UINT32("jacks", VirtIOSound, snd_conf.jacks,
VIRTIO_SOUND_JACK_DEFAULT),
diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c
index ec2c4e1374..19e7755060 100644
--- a/hw/audio/wm8750.c
+++ b/hw/audio/wm8750.c
@@ -706,7 +706,7 @@ void wm8750_set_bclk_in(void *opaque, int new_hz)
wm8750_clk_update(s, 1);
}
-static Property wm8750_properties[] = {
+static const Property wm8750_properties[] = {
DEFINE_AUDIO_PROPERTIES(WM8750State, card),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 17/71] hw/avr: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (19 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 16/71] hw/audio: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 18/71] hw/block/xen-block: Unexport PropertyInfo Richard Henderson
` (51 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael Rolnik
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/avr/atmega.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c
index 31c8992d75..ce630ec572 100644
--- a/hw/avr/atmega.c
+++ b/hw/avr/atmega.c
@@ -355,7 +355,7 @@ static void atmega_realize(DeviceState *dev, Error **errp)
create_unimplemented_device("avr-eeprom", OFFSET_DATA + 0x03f, 3);
}
-static Property atmega_props[] = {
+static const Property atmega_props[] = {
DEFINE_PROP_UINT64("xtal-frequency-hz", AtmegaMcuState,
xtal_freq_hz, 0),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 18/71] hw/block/xen-block: Unexport PropertyInfo
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (20 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 17/71] hw/avr: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-14 17:52 ` Jason Andryuk
2024-12-13 19:06 ` [PATCH 19/71] hw/block: Constify all Property Richard Henderson
` (50 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, Kevin Wolf, Hanna Reitz,
open list:X86 Xen CPUs, open list:Block layer core
xen_block_prop_vdev is not used outside the file.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/block/xen-block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index aed1d5c330..72cfd6893a 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -659,7 +659,7 @@ invalid:
*
* https://xenbits.xen.org/docs/unstable/man/xen-vbd-interface.7.html
*/
-const PropertyInfo xen_block_prop_vdev = {
+static const PropertyInfo xen_block_prop_vdev = {
.name = "str",
.description = "Virtual Disk specifier: d*p*/xvd*/hd*/sd*",
.get = xen_block_get_vdev,
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 18/71] hw/block/xen-block: Unexport PropertyInfo
2024-12-13 19:06 ` [PATCH 18/71] hw/block/xen-block: Unexport PropertyInfo Richard Henderson
@ 2024-12-14 17:52 ` Jason Andryuk
0 siblings, 0 replies; 124+ messages in thread
From: Jason Andryuk @ 2024-12-14 17:52 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, Kevin Wolf, Hanna Reitz,
open list:X86 Xen CPUs, open list:Block layer core
On 2024-12-13 14:06, Richard Henderson wrote:
> xen_block_prop_vdev is not used outside the file.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 19/71] hw/block: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (21 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 18/71] hw/block/xen-block: Unexport PropertyInfo Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 20/71] hw/char: " Richard Henderson
` (49 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Kevin Wolf, Hanna Reitz, Alistair Francis,
Philippe Mathieu-Daudé, Laurent Vivier, Raphael Norwitz,
Michael S. Tsirkin, Stefano Garzarella, Stefan Hajnoczi,
Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, open list:Floppy, open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/block/fdc-isa.c | 2 +-
hw/block/fdc-sysbus.c | 4 ++--
hw/block/fdc.c | 2 +-
hw/block/m25p80.c | 2 +-
hw/block/nand.c | 2 +-
hw/block/pflash_cfi01.c | 2 +-
hw/block/pflash_cfi02.c | 2 +-
hw/block/swim.c | 2 +-
hw/block/vhost-user-blk.c | 2 +-
hw/block/virtio-blk.c | 2 +-
hw/block/xen-block.c | 2 +-
11 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index 5ed3c18c28..2b9f667fe4 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -283,7 +283,7 @@ static const VMStateDescription vmstate_isa_fdc = {
}
};
-static Property isa_fdc_properties[] = {
+static const Property isa_fdc_properties[] = {
DEFINE_PROP_UINT32("iobase", FDCtrlISABus, iobase, 0x3f0),
DEFINE_PROP_UINT32("irq", FDCtrlISABus, irq, 6),
DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2),
diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c
index e1ddbf3d1a..f17e04b138 100644
--- a/hw/block/fdc-sysbus.c
+++ b/hw/block/fdc-sysbus.c
@@ -196,7 +196,7 @@ static const TypeInfo sysbus_fdc_common_typeinfo = {
.class_size = sizeof(FDCtrlSysBusClass),
};
-static Property sysbus_fdc_properties[] = {
+static const Property sysbus_fdc_properties[] = {
DEFINE_PROP_SIGNED("fdtypeA", FDCtrlSysBus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
@@ -223,7 +223,7 @@ static const TypeInfo sysbus_fdc_typeinfo = {
.class_init = sysbus_fdc_class_init,
};
-static Property sun4m_fdc_properties[] = {
+static const Property sun4m_fdc_properties[] = {
DEFINE_PROP_SIGNED("fdtype", FDCtrlSysBus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 6dd94e98bc..57d6844806 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -454,7 +454,7 @@ struct FloppyDrive {
FloppyDriveType type;
};
-static Property floppy_drive_properties[] = {
+static const Property floppy_drive_properties[] = {
DEFINE_PROP_UINT32("unit", FloppyDrive, unit, -1),
DEFINE_BLOCK_PROPERTIES(FloppyDrive, conf),
DEFINE_PROP_SIGNED("drive-type", FloppyDrive, type,
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 748594524e..ca97365926 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -1720,7 +1720,7 @@ static int m25p80_pre_save(void *opaque)
return 0;
}
-static Property m25p80_properties[] = {
+static const Property m25p80_properties[] = {
/* This is default value for Micron flash */
DEFINE_PROP_BOOL("write-enable", Flash, write_enable, false),
DEFINE_PROP_UINT32("nonvolatile-cfg", Flash, nonvolatile_cfg, 0x8FFF),
diff --git a/hw/block/nand.c b/hw/block/nand.c
index ac0a5d2b42..b6e6bfac23 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -445,7 +445,7 @@ static void nand_realize(DeviceState *dev, Error **errp)
s->ioaddr = s->io;
}
-static Property nand_properties[] = {
+static const Property nand_properties[] = {
DEFINE_PROP_UINT8("manufacturer_id", NANDFlashState, manf_id, 0),
DEFINE_PROP_UINT8("chip_id", NANDFlashState, chip_id, 0),
DEFINE_PROP_DRIVE("drive", NANDFlashState, blk),
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 21a81b44f0..20f4fc67a0 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -895,7 +895,7 @@ static void pflash_cfi01_system_reset(DeviceState *dev)
pfl->blk_offset = -1;
}
-static Property pflash_cfi01_properties[] = {
+static const Property pflash_cfi01_properties[] = {
DEFINE_PROP_DRIVE("drive", PFlashCFI01, blk),
/* num-blocks is the number of blocks actually visible to the guest,
* ie the total size of the device divided by the sector length.
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 8393f261b8..c82002d665 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -937,7 +937,7 @@ static void pflash_cfi02_reset(DeviceState *dev)
pflash_reset_state_machine(pfl);
}
-static Property pflash_cfi02_properties[] = {
+static const Property pflash_cfi02_properties[] = {
DEFINE_PROP_DRIVE("drive", PFlashCFI02, blk),
DEFINE_PROP_UINT32("num-blocks", PFlashCFI02, uniform_nb_blocs, 0),
DEFINE_PROP_UINT32("sector-length", PFlashCFI02, uniform_sector_len, 0),
diff --git a/hw/block/swim.c b/hw/block/swim.c
index 64992eb72e..c336d83bdc 100644
--- a/hw/block/swim.c
+++ b/hw/block/swim.c
@@ -166,7 +166,7 @@ static const BlockDevOps swim_block_ops = {
.change_media_cb = swim_change_cb,
};
-static Property swim_drive_properties[] = {
+static const Property swim_drive_properties[] = {
DEFINE_PROP_INT32("unit", SWIMDrive, unit, -1),
DEFINE_BLOCK_PROPERTIES(SWIMDrive, conf),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 7996e49821..f3ac007108 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -570,7 +570,7 @@ static const VMStateDescription vmstate_vhost_user_blk = {
},
};
-static Property vhost_user_blk_properties[] = {
+static const Property vhost_user_blk_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBlk, chardev),
DEFINE_PROP_UINT16("num-queues", VHostUserBlk, num_queues,
VHOST_USER_BLK_AUTO_NUM_QUEUES),
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9166d7974d..9ca60fbc07 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1985,7 +1985,7 @@ static const VMStateDescription vmstate_virtio_blk = {
},
};
-static Property virtio_blk_properties[] = {
+static const Property virtio_blk_properties[] = {
DEFINE_BLOCK_PROPERTIES(VirtIOBlock, conf.conf),
DEFINE_BLOCK_ERROR_PROPERTIES(VirtIOBlock, conf.conf),
DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlock, conf.conf),
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 72cfd6893a..0c0817f498 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -666,7 +666,7 @@ static const PropertyInfo xen_block_prop_vdev = {
.set = xen_block_set_vdev,
};
-static Property xen_block_props[] = {
+static const Property xen_block_props[] = {
DEFINE_PROP("vdev", XenBlockDevice, props.vdev,
xen_block_prop_vdev, XenBlockVdev),
DEFINE_BLOCK_PROPERTIES(XenBlockDevice, props.conf),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 20/71] hw/char: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (22 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 19/71] hw/block: Constify all Property Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-14 0:05 ` Alberto Garcia
2024-12-13 19:06 ` [PATCH 21/71] hw/core: " Richard Henderson
` (48 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Michael Rolnik, Marc-André Lureau, Paolo Bonzini,
Peter Maydell, Philippe Mathieu-Daudé, Edgar E. Iglesias,
Alistair Francis, Michael S. Tsirkin, Antony Pavlov,
Igor Mitsyanko, Laurent Vivier, Clément Chigot,
Frederic Konrad, Alberto Garcia, Thomas Huth, Joel Stanley,
Yoshinori Sato, Magnus Damm, Halil Pasic, Christian Borntraeger,
Vijai Kumar K, Bin Meng, Palmer Dabbelt, Nicholas Piggin,
Daniel Henrique Barboza, Harsh Prateek Bora, Samuel Tardieu,
Amit Shah, Stefano Stabellini, Anthony PERARD, Paul Durrant,
open list:Raspberry Pi, open list:OpenTitan,
open list:S390 general arch..., open list:sPAPR (pseries),
open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/char/avr_usart.c | 2 +-
hw/char/bcm2835_aux.c | 2 +-
hw/char/cadence_uart.c | 2 +-
hw/char/cmsdk-apb-uart.c | 2 +-
hw/char/debugcon.c | 2 +-
hw/char/digic-uart.c | 2 +-
hw/char/escc.c | 2 +-
hw/char/exynos4210_uart.c | 2 +-
hw/char/goldfish_tty.c | 2 +-
hw/char/grlib_apbuart.c | 2 +-
hw/char/ibex_uart.c | 2 +-
hw/char/imx_serial.c | 2 +-
hw/char/ipoctal232.c | 2 +-
hw/char/mcf_uart.c | 2 +-
hw/char/nrf51_uart.c | 2 +-
hw/char/parallel.c | 2 +-
hw/char/pl011.c | 2 +-
hw/char/renesas_sci.c | 2 +-
hw/char/sclpconsole-lm.c | 2 +-
hw/char/sclpconsole.c | 2 +-
hw/char/serial-isa.c | 2 +-
hw/char/serial-mm.c | 2 +-
hw/char/serial-pci-multi.c | 4 ++--
hw/char/serial-pci.c | 2 +-
hw/char/serial.c | 2 +-
hw/char/sh_serial.c | 2 +-
hw/char/shakti_uart.c | 2 +-
hw/char/sifive_uart.c | 2 +-
hw/char/spapr_vty.c | 2 +-
hw/char/stm32f2xx_usart.c | 2 +-
hw/char/stm32l4x5_usart.c | 2 +-
hw/char/terminal3270.c | 2 +-
hw/char/virtio-console.c | 2 +-
hw/char/virtio-serial-bus.c | 4 ++--
hw/char/xen_console.c | 2 +-
hw/char/xilinx_uartlite.c | 2 +-
36 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/hw/char/avr_usart.c b/hw/char/avr_usart.c
index 3aff01cd54..3421576e45 100644
--- a/hw/char/avr_usart.c
+++ b/hw/char/avr_usart.c
@@ -259,7 +259,7 @@ static const MemoryRegionOps avr_usart_ops = {
.impl = {.min_access_size = 1, .max_access_size = 1}
};
-static Property avr_usart_properties[] = {
+static const Property avr_usart_properties[] = {
DEFINE_PROP_CHR("chardev", AVRUsartState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/bcm2835_aux.c b/hw/char/bcm2835_aux.c
index fca2f27a55..30285c97b0 100644
--- a/hw/char/bcm2835_aux.c
+++ b/hw/char/bcm2835_aux.c
@@ -290,7 +290,7 @@ static void bcm2835_aux_realize(DeviceState *dev, Error **errp)
bcm2835_aux_receive, NULL, NULL, s, NULL, true);
}
-static Property bcm2835_aux_props[] = {
+static const Property bcm2835_aux_props[] = {
DEFINE_PROP_CHR("chardev", BCM2835AuxState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c
index 77d9a2a221..2e778f7a9c 100644
--- a/hw/char/cadence_uart.c
+++ b/hw/char/cadence_uart.c
@@ -617,7 +617,7 @@ static const VMStateDescription vmstate_cadence_uart = {
},
};
-static Property cadence_uart_properties[] = {
+static const Property cadence_uart_properties[] = {
DEFINE_PROP_CHR("chardev", CadenceUARTState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/cmsdk-apb-uart.c b/hw/char/cmsdk-apb-uart.c
index 467e40b715..e37e14e0f2 100644
--- a/hw/char/cmsdk-apb-uart.c
+++ b/hw/char/cmsdk-apb-uart.c
@@ -377,7 +377,7 @@ static const VMStateDescription cmsdk_apb_uart_vmstate = {
}
};
-static Property cmsdk_apb_uart_properties[] = {
+static const Property cmsdk_apb_uart_properties[] = {
DEFINE_PROP_CHR("chardev", CMSDKAPBUART, chr),
DEFINE_PROP_UINT32("pclk-frq", CMSDKAPBUART, pclk_frq, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
index fdb04fee09..c0f16e9bd6 100644
--- a/hw/char/debugcon.c
+++ b/hw/char/debugcon.c
@@ -114,7 +114,7 @@ static void debugcon_isa_realizefn(DeviceState *dev, Error **errp)
isa->iobase, &s->io);
}
-static Property debugcon_isa_properties[] = {
+static const Property debugcon_isa_properties[] = {
DEFINE_PROP_UINT32("iobase", ISADebugconState, iobase, 0xe9),
DEFINE_PROP_CHR("chardev", ISADebugconState, state.chr),
DEFINE_PROP_UINT32("readback", ISADebugconState, state.readback, 0xe9),
diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c
index 5b04abec1d..03beba11ad 100644
--- a/hw/char/digic-uart.c
+++ b/hw/char/digic-uart.c
@@ -172,7 +172,7 @@ static const VMStateDescription vmstate_digic_uart = {
}
};
-static Property digic_uart_properties[] = {
+static const Property digic_uart_properties[] = {
DEFINE_PROP_CHR("chardev", DigicUartState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/escc.c b/hw/char/escc.c
index b1b1bbed15..08bc65ef2c 100644
--- a/hw/char/escc.c
+++ b/hw/char/escc.c
@@ -1089,7 +1089,7 @@ static void escc_realize(DeviceState *dev, Error **errp)
}
}
-static Property escc_properties[] = {
+static const Property escc_properties[] = {
DEFINE_PROP_UINT32("frequency", ESCCState, frequency, 0),
DEFINE_PROP_UINT32("it_shift", ESCCState, it_shift, 0),
DEFINE_PROP_BOOL("bit_swap", ESCCState, bit_swap, false),
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index d9e732f98b..c2836ff8fd 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -704,7 +704,7 @@ static void exynos4210_uart_realize(DeviceState *dev, Error **errp)
NULL, s, NULL, true);
}
-static Property exynos4210_uart_properties[] = {
+static const Property exynos4210_uart_properties[] = {
DEFINE_PROP_CHR("chardev", Exynos4210UartState, chr),
DEFINE_PROP_UINT32("channel", Exynos4210UartState, channel, 0),
DEFINE_PROP_UINT32("rx-size", Exynos4210UartState, rx.size, 16),
diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c
index d1917b83d8..68e261236e 100644
--- a/hw/char/goldfish_tty.c
+++ b/hw/char/goldfish_tty.c
@@ -241,7 +241,7 @@ static const VMStateDescription vmstate_goldfish_tty = {
}
};
-static Property goldfish_tty_properties[] = {
+static const Property goldfish_tty_properties[] = {
DEFINE_PROP_CHR("chardev", GoldfishTTYState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c
index d0032b4d2a..caae88d77d 100644
--- a/hw/char/grlib_apbuart.c
+++ b/hw/char/grlib_apbuart.c
@@ -277,7 +277,7 @@ static void grlib_apbuart_reset(DeviceState *d)
uart->current = 0;
}
-static Property grlib_apbuart_properties[] = {
+static const Property grlib_apbuart_properties[] = {
DEFINE_PROP_CHR("chrdev", UART, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c
index 589177f85b..b1bdb2ad15 100644
--- a/hw/char/ibex_uart.c
+++ b/hw/char/ibex_uart.c
@@ -508,7 +508,7 @@ static const VMStateDescription vmstate_ibex_uart = {
}
};
-static Property ibex_uart_properties[] = {
+static const Property ibex_uart_properties[] = {
DEFINE_PROP_CHR("chardev", IbexUartState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
index 22c9080b1c..6376f2cadc 100644
--- a/hw/char/imx_serial.c
+++ b/hw/char/imx_serial.c
@@ -438,7 +438,7 @@ static void imx_serial_init(Object *obj)
sysbus_init_irq(sbd, &s->irq);
}
-static Property imx_serial_properties[] = {
+static const Property imx_serial_properties[] = {
DEFINE_PROP_CHR("chardev", IMXSerialState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c
index 64be5226d4..fb8cb6c2b7 100644
--- a/hw/char/ipoctal232.c
+++ b/hw/char/ipoctal232.c
@@ -558,7 +558,7 @@ static void ipoctal_realize(DeviceState *dev, Error **errp)
}
}
-static Property ipoctal_properties[] = {
+static const Property ipoctal_properties[] = {
DEFINE_PROP_CHR("chardev0", IPOctalState, ch[0].dev),
DEFINE_PROP_CHR("chardev1", IPOctalState, ch[1].dev),
DEFINE_PROP_CHR("chardev2", IPOctalState, ch[2].dev),
diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c
index ad15e28944..c044536d5d 100644
--- a/hw/char/mcf_uart.c
+++ b/hw/char/mcf_uart.c
@@ -312,7 +312,7 @@ static void mcf_uart_realize(DeviceState *dev, Error **errp)
mcf_uart_event, NULL, s, NULL, true);
}
-static Property mcf_uart_properties[] = {
+static const Property mcf_uart_properties[] = {
DEFINE_PROP_CHR("chardev", mcf_uart_state, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/nrf51_uart.c b/hw/char/nrf51_uart.c
index 04da3f8d97..b164c70f52 100644
--- a/hw/char/nrf51_uart.c
+++ b/hw/char/nrf51_uart.c
@@ -304,7 +304,7 @@ static const VMStateDescription nrf51_uart_vmstate = {
}
};
-static Property nrf51_uart_properties[] = {
+static const Property nrf51_uart_properties[] = {
DEFINE_PROP_CHR("chardev", NRF51UARTState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
index c394635ada..15191698f5 100644
--- a/hw/char/parallel.c
+++ b/hw/char/parallel.c
@@ -603,7 +603,7 @@ bool parallel_mm_init(MemoryRegion *address_space,
return true;
}
-static Property parallel_isa_properties[] = {
+static const Property parallel_isa_properties[] = {
DEFINE_PROP_UINT32("index", ISAParallelState, index, -1),
DEFINE_PROP_UINT32("iobase", ISAParallelState, iobase, -1),
DEFINE_PROP_UINT32("irq", ISAParallelState, isairq, 7),
diff --git a/hw/char/pl011.c b/hw/char/pl011.c
index 0fd1334fab..5fbee5e6c5 100644
--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -603,7 +603,7 @@ static const VMStateDescription vmstate_pl011 = {
}
};
-static Property pl011_properties[] = {
+static const Property pl011_properties[] = {
DEFINE_PROP_CHR("chardev", PL011State, chr),
DEFINE_PROP_BOOL("migrate-clk", PL011State, migrate_clk, true),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/char/renesas_sci.c b/hw/char/renesas_sci.c
index 7ce0408b0c..516b48648b 100644
--- a/hw/char/renesas_sci.c
+++ b/hw/char/renesas_sci.c
@@ -319,7 +319,7 @@ static const VMStateDescription vmstate_rsci = {
}
};
-static Property rsci_properties[] = {
+static const Property rsci_properties[] = {
DEFINE_PROP_UINT64("input-freq", RSCIState, input_freq, 0),
DEFINE_PROP_CHR("chardev", RSCIState, chr),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index 4fe1c4d289..536b283471 100644
--- a/hw/char/sclpconsole-lm.c
+++ b/hw/char/sclpconsole-lm.c
@@ -333,7 +333,7 @@ static void console_reset(DeviceState *dev)
scon->write_errors = 0;
}
-static Property console_properties[] = {
+static const Property console_properties[] = {
DEFINE_PROP_CHR("chardev", SCLPConsoleLM, chr),
DEFINE_PROP_UINT32("write_errors", SCLPConsoleLM, write_errors, 0),
DEFINE_PROP_BOOL("echo", SCLPConsoleLM, echo, true),
diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c
index e6d49e819e..a90b892d1d 100644
--- a/hw/char/sclpconsole.c
+++ b/hw/char/sclpconsole.c
@@ -251,7 +251,7 @@ static void console_reset(DeviceState *dev)
scon->notify = false;
}
-static Property console_properties[] = {
+static const Property console_properties[] = {
DEFINE_PROP_CHR("chardev", SCLPConsole, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index b562ec9d37..2cf50eb0bb 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -113,7 +113,7 @@ static const VMStateDescription vmstate_isa_serial = {
}
};
-static Property serial_isa_properties[] = {
+static const Property serial_isa_properties[] = {
DEFINE_PROP_UINT32("index", ISASerialState, index, -1),
DEFINE_PROP_UINT32("iobase", ISASerialState, iobase, -1),
DEFINE_PROP_UINT32("irq", ISASerialState, isairq, -1),
diff --git a/hw/char/serial-mm.c b/hw/char/serial-mm.c
index 2f67776b19..8f51f1d3b8 100644
--- a/hw/char/serial-mm.c
+++ b/hw/char/serial-mm.c
@@ -125,7 +125,7 @@ static void serial_mm_instance_init(Object *o)
qdev_alias_all_properties(DEVICE(&smm->serial), o);
}
-static Property serial_mm_properties[] = {
+static const Property serial_mm_properties[] = {
/*
* Set the spacing between adjacent memory-mapped UART registers.
* Each register will be at (1 << regshift) bytes after the previous one.
diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c
index 28b275709a..c2f20d8e74 100644
--- a/hw/char/serial-pci-multi.c
+++ b/hw/char/serial-pci-multi.c
@@ -132,14 +132,14 @@ static const VMStateDescription vmstate_pci_multi_serial = {
}
};
-static Property multi_2x_serial_pci_properties[] = {
+static const Property multi_2x_serial_pci_properties[] = {
DEFINE_PROP_CHR("chardev1", PCIMultiSerialState, state[0].chr),
DEFINE_PROP_CHR("chardev2", PCIMultiSerialState, state[1].chr),
DEFINE_PROP_UINT8("prog_if", PCIMultiSerialState, prog_if, 0x02),
DEFINE_PROP_END_OF_LIST(),
};
-static Property multi_4x_serial_pci_properties[] = {
+static const Property multi_4x_serial_pci_properties[] = {
DEFINE_PROP_CHR("chardev1", PCIMultiSerialState, state[0].chr),
DEFINE_PROP_CHR("chardev2", PCIMultiSerialState, state[1].chr),
DEFINE_PROP_CHR("chardev3", PCIMultiSerialState, state[2].chr),
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index f8a1a94d0c..2f487a3a79 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -81,7 +81,7 @@ static const VMStateDescription vmstate_pci_serial = {
}
};
-static Property serial_pci_properties[] = {
+static const Property serial_pci_properties[] = {
DEFINE_PROP_UINT8("prog_if", PCISerialState, prog_if, 0x02),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/serial.c b/hw/char/serial.c
index b50a8a1313..85dba02ace 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -964,7 +964,7 @@ const MemoryRegionOps serial_io_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-static Property serial_properties[] = {
+static const Property serial_properties[] = {
DEFINE_PROP_CHR("chardev", SerialState, chr),
DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200),
DEFINE_PROP_BOOL("wakeup", SerialState, wakeup, false),
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 429b2562aa..2ab7197aee 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -447,7 +447,7 @@ static void sh_serial_init(Object *obj)
{
}
-static Property sh_serial_properties[] = {
+static const Property sh_serial_properties[] = {
DEFINE_PROP_CHR("chardev", SHSerialState, chr),
DEFINE_PROP_UINT8("features", SHSerialState, feat, 0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/char/shakti_uart.c b/hw/char/shakti_uart.c
index 4a71953c9a..6e56754ca6 100644
--- a/hw/char/shakti_uart.c
+++ b/hw/char/shakti_uart.c
@@ -157,7 +157,7 @@ static void shakti_uart_instance_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &sus->mmio);
}
-static Property shakti_uart_properties[] = {
+static const Property shakti_uart_properties[] = {
DEFINE_PROP_CHR("chardev", ShaktiUartState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c
index 5ae2a29ed6..97e4be37c0 100644
--- a/hw/char/sifive_uart.c
+++ b/hw/char/sifive_uart.c
@@ -251,7 +251,7 @@ static int sifive_uart_be_change(void *opaque)
return 0;
}
-static Property sifive_uart_properties[] = {
+static const Property sifive_uart_properties[] = {
DEFINE_PROP_CHR("chardev", SiFiveUARTState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 3e23d9cbab..cd91dad709 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -163,7 +163,7 @@ void spapr_vty_create(SpaprVioBus *bus, Chardev *chardev)
qdev_realize_and_unref(dev, &bus->bus, &error_fatal);
}
-static Property spapr_vty_properties[] = {
+static const Property spapr_vty_properties[] = {
DEFINE_SPAPR_PROPERTIES(SpaprVioVty, sdev),
DEFINE_PROP_CHR("chardev", SpaprVioVty, chardev),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c
index 17b5b1f15f..4a3c30eddb 100644
--- a/hw/char/stm32f2xx_usart.c
+++ b/hw/char/stm32f2xx_usart.c
@@ -199,7 +199,7 @@ static const MemoryRegionOps stm32f2xx_usart_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-static Property stm32f2xx_usart_properties[] = {
+static const Property stm32f2xx_usart_properties[] = {
DEFINE_PROP_CHR("chardev", STM32F2XXUsartState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/stm32l4x5_usart.c b/hw/char/stm32l4x5_usart.c
index 3cf200c080..360e79cc3f 100644
--- a/hw/char/stm32l4x5_usart.c
+++ b/hw/char/stm32l4x5_usart.c
@@ -534,7 +534,7 @@ static const MemoryRegionOps stm32l4x5_usart_base_ops = {
},
};
-static Property stm32l4x5_usart_base_properties[] = {
+static const Property stm32l4x5_usart_base_properties[] = {
DEFINE_PROP_CHR("chardev", Stm32l4x5UsartBaseState, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c
index 82e85fac2e..c2aafda0ce 100644
--- a/hw/char/terminal3270.c
+++ b/hw/char/terminal3270.c
@@ -283,7 +283,7 @@ static int write_payload_3270(EmulatedCcw3270Device *dev, uint8_t cmd)
return (retval <= 0) ? 0 : get_cds(t)->count;
}
-static Property terminal_properties[] = {
+static const Property terminal_properties[] = {
DEFINE_PROP_CHR("chardev", Terminal3270, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index dbe0b28e60..f58292e2bb 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -274,7 +274,7 @@ static const TypeInfo virtconsole_info = {
.class_init = virtconsole_class_init,
};
-static Property virtserialport_properties[] = {
+static const Property virtserialport_properties[] = {
DEFINE_PROP_CHR("chardev", VirtConsole, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 2094d213cd..1e631bcb2b 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -835,7 +835,7 @@ static int virtio_serial_load_device(VirtIODevice *vdev, QEMUFile *f,
static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent);
-static Property virtser_props[] = {
+static const Property virtser_props[] = {
DEFINE_PROP_UINT32("nr", VirtIOSerialPort, id, VIRTIO_CONSOLE_BAD_ID),
DEFINE_PROP_STRING("name", VirtIOSerialPort, name),
DEFINE_PROP_END_OF_LIST()
@@ -1153,7 +1153,7 @@ static const VMStateDescription vmstate_virtio_console = {
},
};
-static Property virtio_serial_properties[] = {
+static const Property virtio_serial_properties[] = {
DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports,
31),
DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features,
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index 683c92aca1..c20c1b4b84 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -487,7 +487,7 @@ static char *xen_console_get_frontend_path(XenDevice *xendev, Error **errp)
}
-static Property xen_console_properties[] = {
+static const Property xen_console_properties[] = {
DEFINE_PROP_CHR("chardev", XenConsole, chr),
DEFINE_PROP_INT32("idx", XenConsole, dev, -1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c
index f325084f8b..ad77226217 100644
--- a/hw/char/xilinx_uartlite.c
+++ b/hw/char/xilinx_uartlite.c
@@ -176,7 +176,7 @@ static const MemoryRegionOps uart_ops = {
}
};
-static Property xilinx_uartlite_properties[] = {
+static const Property xilinx_uartlite_properties[] = {
DEFINE_PROP_CHR("chardev", XilinxUARTLite, chr),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 20/71] hw/char: Constify all Property
2024-12-13 19:06 ` [PATCH 20/71] hw/char: " Richard Henderson
@ 2024-12-14 0:05 ` Alberto Garcia
0 siblings, 0 replies; 124+ messages in thread
From: Alberto Garcia @ 2024-12-14 0:05 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Michael Rolnik, Marc-André Lureau, Paolo Bonzini,
Peter Maydell, Philippe Mathieu-Daudé, Edgar E. Iglesias,
Alistair Francis, Michael S. Tsirkin, Antony Pavlov,
Igor Mitsyanko, Laurent Vivier, Clément Chigot,
Frederic Konrad, Thomas Huth, Joel Stanley, Yoshinori Sato,
Magnus Damm, Halil Pasic, Christian Borntraeger, Vijai Kumar K,
Bin Meng, Palmer Dabbelt, Nicholas Piggin,
Daniel Henrique Barboza, Harsh Prateek Bora, Samuel Tardieu,
Amit Shah, Stefano Stabellini, Anthony PERARD, Paul Durrant,
open list:Raspberry Pi, open list:OpenTitan,
open list:S390 general arch..., open list:sPAPR (pseries),
open list:X86 Xen CPUs
On Fri 13 Dec 2024 01:06:54 PM -06, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alberto Garcia <berto@igalia.com>
Berto
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 21/71] hw/core: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (23 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 20/71] hw/char: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 22/71] hw/cpu: " Richard Henderson
` (47 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Alistair Francis, Alex Bennée
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/core/generic-loader.c | 2 +-
hw/core/guest-loader.c | 2 +-
hw/core/or-irq.c | 2 +-
hw/core/platform-bus.c | 2 +-
hw/core/split-irq.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
index ea8628b892..c1cddecf60 100644
--- a/hw/core/generic-loader.c
+++ b/hw/core/generic-loader.c
@@ -179,7 +179,7 @@ static void generic_loader_unrealize(DeviceState *dev)
qemu_unregister_reset(generic_loader_reset, dev);
}
-static Property generic_loader_props[] = {
+static const Property generic_loader_props[] = {
DEFINE_PROP_UINT64("addr", GenericLoaderState, addr, 0),
DEFINE_PROP_UINT64("data", GenericLoaderState, data, 0),
DEFINE_PROP_UINT8("data-len", GenericLoaderState, data_len, 0),
diff --git a/hw/core/guest-loader.c b/hw/core/guest-loader.c
index 391c875a29..74af00cee7 100644
--- a/hw/core/guest-loader.c
+++ b/hw/core/guest-loader.c
@@ -111,7 +111,7 @@ static void guest_loader_realize(DeviceState *dev, Error **errp)
loader_insert_platform_data(s, size, errp);
}
-static Property guest_loader_props[] = {
+static const Property guest_loader_props[] = {
DEFINE_PROP_UINT64("addr", GuestLoaderState, addr, 0),
DEFINE_PROP_STRING("kernel", GuestLoaderState, kernel),
DEFINE_PROP_STRING("bootargs", GuestLoaderState, args),
diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c
index b25468e38a..fc52796f54 100644
--- a/hw/core/or-irq.c
+++ b/hw/core/or-irq.c
@@ -115,7 +115,7 @@ static const VMStateDescription vmstate_or_irq = {
},
};
-static Property or_irq_properties[] = {
+static const Property or_irq_properties[] = {
DEFINE_PROP_UINT16("num-lines", OrIRQState, num_lines, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c
index dc58bf505a..a29c9c6e59 100644
--- a/hw/core/platform-bus.c
+++ b/hw/core/platform-bus.c
@@ -204,7 +204,7 @@ static void platform_bus_realize(DeviceState *dev, Error **errp)
plaform_bus_refresh_irqs(pbus);
}
-static Property platform_bus_properties[] = {
+static const Property platform_bus_properties[] = {
DEFINE_PROP_UINT32("num_irqs", PlatformBusDevice, num_irqs, 0),
DEFINE_PROP_UINT32("mmio_size", PlatformBusDevice, mmio_size, 0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/core/split-irq.c b/hw/core/split-irq.c
index 3b90af2e8f..40fc7e2e77 100644
--- a/hw/core/split-irq.c
+++ b/hw/core/split-irq.c
@@ -59,7 +59,7 @@ static void split_irq_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out(dev, s->out_irq, s->num_lines);
}
-static Property split_irq_properties[] = {
+static const Property split_irq_properties[] = {
DEFINE_PROP_UINT16("num-lines", SplitIRQ, num_lines, 1),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 22/71] hw/cpu: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (24 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 21/71] hw/core: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-18 15:20 ` Zhao Liu
2024-12-13 19:06 ` [PATCH 23/71] hw/cxl: " Richard Henderson
` (46 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Zhao Liu,
open list:ARM TCG CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/cpu/a15mpcore.c | 2 +-
hw/cpu/a9mpcore.c | 2 +-
hw/cpu/arm11mpcore.c | 2 +-
hw/cpu/cluster.c | 2 +-
hw/cpu/realview_mpcore.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index 967d8d3dd5..5346b8b6c6 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -144,7 +144,7 @@ static void a15mp_priv_realize(DeviceState *dev, Error **errp)
}
}
-static Property a15mp_priv_properties[] = {
+static const Property a15mp_priv_properties[] = {
DEFINE_PROP_UINT32("num-cpu", A15MPPrivState, num_cpu, 1),
/* The Cortex-A15MP may have anything from 0 to 224 external interrupt
* IRQ lines (with another 32 internal). We default to 128+32, which
diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c
index c30ef72c66..c3fdfb92e1 100644
--- a/hw/cpu/a9mpcore.c
+++ b/hw/cpu/a9mpcore.c
@@ -158,7 +158,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp)
}
}
-static Property a9mp_priv_properties[] = {
+static const Property a9mp_priv_properties[] = {
DEFINE_PROP_UINT32("num-cpu", A9MPPrivState, num_cpu, 1),
/* The Cortex-A9MP may have anything from 0 to 224 external interrupt
* IRQ lines (with another 32 internal). We default to 64+32, which
diff --git a/hw/cpu/arm11mpcore.c b/hw/cpu/arm11mpcore.c
index 89c4e35143..193fc182ab 100644
--- a/hw/cpu/arm11mpcore.c
+++ b/hw/cpu/arm11mpcore.c
@@ -131,7 +131,7 @@ static void mpcore_priv_initfn(Object *obj)
object_initialize_child(obj, "wdtimer", &s->wdtimer, TYPE_ARM_MPTIMER);
}
-static Property mpcore_priv_properties[] = {
+static const Property mpcore_priv_properties[] = {
DEFINE_PROP_UINT32("num-cpu", ARM11MPCorePriveState, num_cpu, 1),
/* The ARM11 MPCORE TRM says the on-chip controller may have
* anything from 0 to 224 external interrupt IRQ lines (with another
diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c
index 61289a840d..8e43621b5c 100644
--- a/hw/cpu/cluster.c
+++ b/hw/cpu/cluster.c
@@ -25,7 +25,7 @@
#include "hw/qdev-properties.h"
#include "qapi/error.h"
-static Property cpu_cluster_properties[] = {
+static const Property cpu_cluster_properties[] = {
DEFINE_PROP_UINT32("cluster-id", CPUClusterState, cluster_id, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c
index 72c792eef1..9a0ff1df86 100644
--- a/hw/cpu/realview_mpcore.c
+++ b/hw/cpu/realview_mpcore.c
@@ -108,7 +108,7 @@ static void mpcore_rirq_init(Object *obj)
}
}
-static Property mpcore_rirq_properties[] = {
+static const Property mpcore_rirq_properties[] = {
DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 22/71] hw/cpu: Constify all Property
2024-12-13 19:06 ` [PATCH 22/71] hw/cpu: " Richard Henderson
@ 2024-12-18 15:20 ` Zhao Liu
0 siblings, 0 replies; 124+ messages in thread
From: Zhao Liu @ 2024-12-18 15:20 UTC (permalink / raw)
To: Richard Henderson
Cc: qemu-devel, Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, open list:ARM TCG CPUs
On Fri, Dec 13, 2024 at 01:06:56PM -0600, Richard Henderson wrote:
> Date: Fri, 13 Dec 2024 13:06:56 -0600
> From: Richard Henderson <richard.henderson@linaro.org>
> Subject: [PATCH 22/71] hw/cpu: Constify all Property
> X-Mailer: git-send-email 2.43.0
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/cpu/a15mpcore.c | 2 +-
> hw/cpu/a9mpcore.c | 2 +-
> hw/cpu/arm11mpcore.c | 2 +-
> hw/cpu/cluster.c | 2 +-
> hw/cpu/realview_mpcore.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
Hope I'm not late :-)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 23/71] hw/cxl: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (25 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 22/71] hw/cpu: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-16 10:04 ` Jonathan Cameron via
2024-12-13 19:06 ` [PATCH 24/71] hw/display: " Richard Henderson
` (45 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Jonathan Cameron, Fan Ni
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/cxl/switch-mailbox-cci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/cxl/switch-mailbox-cci.c b/hw/cxl/switch-mailbox-cci.c
index 4f419443ab..3fde0f8aae 100644
--- a/hw/cxl/switch-mailbox-cci.c
+++ b/hw/cxl/switch-mailbox-cci.c
@@ -65,7 +65,7 @@ static void cswmbcci_exit(PCIDevice *pci_dev)
/* Nothing to do here yet */
}
-static Property cxl_switch_cci_props[] = {
+static const Property cxl_switch_cci_props[] = {
DEFINE_PROP_LINK("target", CSWMBCCIDev,
target, TYPE_CXL_USP, PCIDevice *),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 23/71] hw/cxl: Constify all Property
2024-12-13 19:06 ` [PATCH 23/71] hw/cxl: " Richard Henderson
@ 2024-12-16 10:04 ` Jonathan Cameron via
0 siblings, 0 replies; 124+ messages in thread
From: Jonathan Cameron via @ 2024-12-16 10:04 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Fan Ni
On Fri, 13 Dec 2024 13:06:57 -0600
Richard Henderson <richard.henderson@linaro.org> wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/cxl/switch-mailbox-cci.c | 2 +-
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/cxl/switch-mailbox-cci.c b/hw/cxl/switch-mailbox-cci.c
> index 4f419443ab..3fde0f8aae 100644
> --- a/hw/cxl/switch-mailbox-cci.c
> +++ b/hw/cxl/switch-mailbox-cci.c
> @@ -65,7 +65,7 @@ static void cswmbcci_exit(PCIDevice *pci_dev)
> /* Nothing to do here yet */
> }
>
> -static Property cxl_switch_cci_props[] = {
> +static const Property cxl_switch_cci_props[] = {
> DEFINE_PROP_LINK("target", CSWMBCCIDev,
> target, TYPE_CXL_USP, PCIDevice *),
> DEFINE_PROP_END_OF_LIST(),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 24/71] hw/display: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (26 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 23/71] hw/cxl: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:06 ` [PATCH 25/71] hw/dma: " Richard Henderson
` (44 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Helge Deller, Peter Maydell, Philippe Mathieu-Daudé,
Gerd Hoffmann, Mark Cave-Ayland, Igor Mitsyanko,
Hervé Poussineau, Aleksandar Rikalo, Laurent Vivier,
BALATON Zoltan, Michael S. Tsirkin, Stefano Garzarella,
Marc-André Lureau, Dmitry Fleytman, Alistair Francis,
Edgar E. Iglesias, open list:Raspberry Pi, open list:sam460ex
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/display/artist.c | 2 +-
hw/display/ati.c | 2 +-
hw/display/bcm2835_fb.c | 2 +-
hw/display/bochs-display.c | 2 +-
hw/display/cg3.c | 2 +-
hw/display/cirrus_vga.c | 2 +-
hw/display/cirrus_vga_isa.c | 2 +-
hw/display/exynos4210_fimd.c | 2 +-
hw/display/g364fb.c | 2 +-
hw/display/i2c-ddc.c | 2 +-
hw/display/macfb.c | 4 ++--
hw/display/pl110.c | 2 +-
hw/display/qxl.c | 2 +-
hw/display/ramfb-standalone.c | 2 +-
hw/display/sm501.c | 4 ++--
hw/display/tcx.c | 2 +-
hw/display/vga-isa.c | 2 +-
hw/display/vga-mmio.c | 2 +-
hw/display/vga-pci.c | 4 ++--
hw/display/vhost-user-gpu.c | 2 +-
hw/display/virtio-gpu-gl.c | 2 +-
hw/display/virtio-gpu-pci.c | 2 +-
hw/display/virtio-gpu-rutabaga.c | 2 +-
hw/display/virtio-gpu.c | 2 +-
hw/display/virtio-vga.c | 2 +-
hw/display/vmware_vga.c | 2 +-
hw/display/xlnx_dp.c | 2 +-
27 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 5790b7a64e..49deed328d 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -1474,7 +1474,7 @@ static const VMStateDescription vmstate_artist = {
}
};
-static Property artist_properties[] = {
+static const Property artist_properties[] = {
DEFINE_PROP_UINT16("width", ARTISTState, width, 1280),
DEFINE_PROP_UINT16("height", ARTISTState, height, 1024),
DEFINE_PROP_UINT16("depth", ARTISTState, depth, 8),
diff --git a/hw/display/ati.c b/hw/display/ati.c
index 593a25328d..e24e092bbc 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -1039,7 +1039,7 @@ static void ati_vga_exit(PCIDevice *dev)
graphic_console_close(s->vga.con);
}
-static Property ati_vga_properties[] = {
+static const Property ati_vga_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", ATIVGAState, vga.vram_size_mb, 16),
DEFINE_PROP_STRING("model", ATIVGAState, model),
DEFINE_PROP_UINT16("x-device-id", ATIVGAState, dev_id,
diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c
index 7005d5bfea..2539fcc8ab 100644
--- a/hw/display/bcm2835_fb.c
+++ b/hw/display/bcm2835_fb.c
@@ -429,7 +429,7 @@ static void bcm2835_fb_realize(DeviceState *dev, Error **errp)
qemu_console_resize(s->con, s->config.xres, s->config.yres);
}
-static Property bcm2835_fb_props[] = {
+static const Property bcm2835_fb_props[] = {
DEFINE_PROP_UINT32("vcram-base", BCM2835FBState, vcram_base, 0),/*required*/
DEFINE_PROP_UINT32("vcram-size", BCM2835FBState, vcram_size,
DEFAULT_VCRAM_SIZE),
diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index 3b1d922b6e..9a3263aa01 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -345,7 +345,7 @@ static void bochs_display_exit(PCIDevice *dev)
graphic_console_close(s->con);
}
-static Property bochs_display_properties[] = {
+static const Property bochs_display_properties[] = {
DEFINE_PROP_SIZE("vgamem", BochsDisplayState, vgamem, 16 * MiB),
DEFINE_PROP_BOOL("edid", BochsDisplayState, enable_edid, true),
DEFINE_EDID_PROPERTIES(BochsDisplayState, edid_info),
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index 95f8f98b99..75b3312c24 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -361,7 +361,7 @@ static void cg3_reset(DeviceState *d)
qemu_irq_lower(s->irq);
}
-static Property cg3_properties[] = {
+static const Property cg3_properties[] = {
DEFINE_PROP_UINT32("vram-size", CG3State, vram_size, -1),
DEFINE_PROP_UINT16("width", CG3State, width, -1),
DEFINE_PROP_UINT16("height", CG3State, height, -1),
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 150883a971..198ed9ed9b 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -2982,7 +2982,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
}
}
-static Property pci_vga_cirrus_properties[] = {
+static const Property pci_vga_cirrus_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
cirrus_vga.vga.vram_size_mb, 4),
DEFINE_PROP_BOOL("blitter", struct PCICirrusVGAState,
diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c
index 84be51670e..d0d134470f 100644
--- a/hw/display/cirrus_vga_isa.c
+++ b/hw/display/cirrus_vga_isa.c
@@ -69,7 +69,7 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp)
/* FIXME not qdev yet */
}
-static Property isa_cirrus_vga_properties[] = {
+static const Property isa_cirrus_vga_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
cirrus_vga.vga.vram_size_mb, 4),
DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState,
diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c
index f3d82498bf..4f097a172c 100644
--- a/hw/display/exynos4210_fimd.c
+++ b/hw/display/exynos4210_fimd.c
@@ -1925,7 +1925,7 @@ static const GraphicHwOps exynos4210_fimd_ops = {
.gfx_update = exynos4210_fimd_update,
};
-static Property exynos4210_fimd_properties[] = {
+static const Property exynos4210_fimd_properties[] = {
DEFINE_PROP_LINK("framebuffer-memory", Exynos4210fimdState, fbmem,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index fa2f184908..a7533c6908 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -512,7 +512,7 @@ static void g364fb_sysbus_reset(DeviceState *d)
g364fb_reset(&s->g364);
}
-static Property g364fb_sysbus_properties[] = {
+static const Property g364fb_sysbus_properties[] = {
DEFINE_PROP_UINT32("vram_size", G364SysBusState, g364.vram_size, 8 * MiB),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/i2c-ddc.c b/hw/display/i2c-ddc.c
index 465b00355e..a2d1f2b044 100644
--- a/hw/display/i2c-ddc.c
+++ b/hw/display/i2c-ddc.c
@@ -95,7 +95,7 @@ static const VMStateDescription vmstate_i2c_ddc = {
}
};
-static Property i2c_ddc_properties[] = {
+static const Property i2c_ddc_properties[] = {
DEFINE_EDID_PROPERTIES(I2CDDCState, edid_info),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/macfb.c b/hw/display/macfb.c
index a5b4a499f3..977901bfdd 100644
--- a/hw/display/macfb.c
+++ b/hw/display/macfb.c
@@ -758,7 +758,7 @@ static void macfb_nubus_reset(DeviceState *d)
macfb_reset(&s->macfb);
}
-static Property macfb_sysbus_properties[] = {
+static const Property macfb_sysbus_properties[] = {
DEFINE_PROP_UINT32("width", MacfbSysBusState, macfb.width, 640),
DEFINE_PROP_UINT32("height", MacfbSysBusState, macfb.height, 480),
DEFINE_PROP_UINT8("depth", MacfbSysBusState, macfb.depth, 8),
@@ -777,7 +777,7 @@ static const VMStateDescription vmstate_macfb_sysbus = {
}
};
-static Property macfb_nubus_properties[] = {
+static const Property macfb_nubus_properties[] = {
DEFINE_PROP_UINT32("width", MacfbNubusState, macfb.width, 640),
DEFINE_PROP_UINT32("height", MacfbNubusState, macfb.height, 480),
DEFINE_PROP_UINT8("depth", MacfbNubusState, macfb.depth, 8),
diff --git a/hw/display/pl110.c b/hw/display/pl110.c
index 7f145bbdba..eca00b4279 100644
--- a/hw/display/pl110.c
+++ b/hw/display/pl110.c
@@ -535,7 +535,7 @@ static const GraphicHwOps pl110_gfx_ops = {
.gfx_update = pl110_update_display,
};
-static Property pl110_properties[] = {
+static const Property pl110_properties[] = {
DEFINE_PROP_LINK("framebuffer-memory", PL110State, fbmem,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 0c4b1c9bf2..949949d374 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2458,7 +2458,7 @@ static const VMStateDescription qxl_vmstate = {
}
};
-static Property qxl_properties[] = {
+static const Property qxl_properties[] = {
DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * MiB),
DEFINE_PROP_UINT64("vram_size", PCIQXLDevice, vram32_size, 64 * MiB),
DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision,
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 20eab34ff4..e677f44be6 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -60,7 +60,7 @@ static const VMStateDescription ramfb_dev_vmstate = {
}
};
-static Property ramfb_properties[] = {
+static const Property ramfb_properties[] = {
DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 38d005c168..446b648f1a 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -2054,7 +2054,7 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp)
/* TODO : chain irq to IRL */
}
-static Property sm501_sysbus_properties[] = {
+static const Property sm501_sysbus_properties[] = {
DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0),
/* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFAULT_X_PIXMAN),
@@ -2143,7 +2143,7 @@ static void sm501_realize_pci(PCIDevice *dev, Error **errp)
&s->state.mmio_region);
}
-static Property sm501_pci_properties[] = {
+static const Property sm501_pci_properties[] = {
DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB),
DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, DEFAULT_X_PIXMAN),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index f000288fcd..3eb0a91ff9 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -879,7 +879,7 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)
qemu_console_resize(s->con, s->width, s->height);
}
-static Property tcx_properties[] = {
+static const Property tcx_properties[] = {
DEFINE_PROP_UINT32("vram_size", TCXState, vram_size, -1),
DEFINE_PROP_UINT16("width", TCXState, width, -1),
DEFINE_PROP_UINT16("height", TCXState, height, -1),
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index c025632635..a6cbf77103 100644
--- a/hw/display/vga-isa.c
+++ b/hw/display/vga-isa.c
@@ -88,7 +88,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
rom_add_vga(VGABIOS_FILENAME);
}
-static Property vga_isa_properties[] = {
+static const Property vga_isa_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
index be33204517..b759efdde7 100644
--- a/hw/display/vga-mmio.c
+++ b/hw/display/vga-mmio.c
@@ -111,7 +111,7 @@ static void vga_mmio_realizefn(DeviceState *dev, Error **errp)
s->vga.con = graphic_console_init(dev, 0, s->vga.hw_ops, &s->vga);
}
-static Property vga_mmio_properties[] = {
+static const Property vga_mmio_properties[] = {
DEFINE_PROP_UINT8("it_shift", VGAMmioState, it_shift, 0),
DEFINE_PROP_UINT32("vgamem_mb", VGAMmioState, vga.vram_size_mb, 8),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index 6b51019966..3145c448f5 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -330,7 +330,7 @@ static void pci_secondary_vga_reset(DeviceState *dev)
vga_common_reset(&d->vga);
}
-static Property vga_pci_properties[] = {
+static const Property vga_pci_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
DEFINE_PROP_BIT("mmio", PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_MMIO, true),
DEFINE_PROP_BIT("qemu-extended-regs",
@@ -342,7 +342,7 @@ static Property vga_pci_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
-static Property secondary_pci_properties[] = {
+static const Property secondary_pci_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
DEFINE_PROP_BIT("qemu-extended-regs",
PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_QEXT, true),
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 14548f1a57..a36eddcb12 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -645,7 +645,7 @@ static struct vhost_dev *vhost_user_gpu_get_vhost(VirtIODevice *vdev)
return g->vhost ? &g->vhost->dev : NULL;
}
-static Property vhost_user_gpu_properties[] = {
+static const Property vhost_user_gpu_properties[] = {
VIRTIO_GPU_BASE_PROPERTIES(VhostUserGPU, parent_obj.conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index 7c0e448b46..6f31149e1e 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -154,7 +154,7 @@ static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp)
virtio_gpu_device_realize(qdev, errp);
}
-static Property virtio_gpu_gl_properties[] = {
+static const Property virtio_gpu_gl_properties[] = {
DEFINE_PROP_BIT("stats", VirtIOGPU, parent_obj.conf.flags,
VIRTIO_GPU_FLAG_STATS_ENABLED, false),
DEFINE_PROP_BIT("venus", VirtIOGPU, parent_obj.conf.flags,
diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c
index da6a99f038..89d27c9d85 100644
--- a/hw/display/virtio-gpu-pci.c
+++ b/hw/display/virtio-gpu-pci.c
@@ -21,7 +21,7 @@
#include "hw/virtio/virtio-gpu-pci.h"
#include "qom/object.h"
-static Property virtio_gpu_pci_base_properties[] = {
+static const Property virtio_gpu_pci_base_properties[] = {
DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/virtio-gpu-rutabaga.c b/hw/display/virtio-gpu-rutabaga.c
index 17bf701a21..f6486acdda 100644
--- a/hw/display/virtio-gpu-rutabaga.c
+++ b/hw/display/virtio-gpu-rutabaga.c
@@ -1096,7 +1096,7 @@ static void virtio_gpu_rutabaga_realize(DeviceState *qdev, Error **errp)
virtio_gpu_device_realize(qdev, errp);
}
-static Property virtio_gpu_rutabaga_properties[] = {
+static const Property virtio_gpu_rutabaga_properties[] = {
DEFINE_PROP_BIT64("gfxstream-vulkan", VirtIOGPURutabaga, capset_mask,
RUTABAGA_CAPSET_GFXSTREAM_VULKAN, false),
DEFINE_PROP_BIT64("cross-domain", VirtIOGPURutabaga, capset_mask,
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 7d22d03bbf..82741d19e5 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1674,7 +1674,7 @@ static const VMStateDescription vmstate_virtio_gpu = {
.post_load = virtio_gpu_post_load,
};
-static Property virtio_gpu_properties[] = {
+static const Property virtio_gpu_properties[] = {
VIRTIO_GPU_BASE_PROPERTIES(VirtIOGPU, parent_obj.conf),
DEFINE_PROP_SIZE("max_hostmem", VirtIOGPU, conf_max_hostmem,
256 * MiB),
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index 276f315108..532e4c62d5 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -209,7 +209,7 @@ static void virtio_vga_set_big_endian_fb(Object *obj, bool value, Error **errp)
d->vga.big_endian_fb = value;
}
-static Property virtio_vga_base_properties[] = {
+static const Property virtio_vga_base_properties[] = {
DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index f2d72c3fc7..f49bbf393a 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -1332,7 +1332,7 @@ static void pci_vmsvga_realize(PCIDevice *dev, Error **errp)
&s->chip.fifo_ram);
}
-static Property vga_vmware_properties[] = {
+static const Property vga_vmware_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", struct pci_vmsvga_state_s,
chip.vga.vram_size_mb, 16),
DEFINE_PROP_BOOL("global-vmstate", struct pci_vmsvga_state_s,
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 6ab2335499..7838f28bca 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -1387,7 +1387,7 @@ static void xlnx_dp_reset(DeviceState *dev)
xlnx_dp_update_irq(s);
}
-static Property xlnx_dp_device_properties[] = {
+static const Property xlnx_dp_device_properties[] = {
DEFINE_AUDIO_PROPERTIES(XlnxDPState, aud_card),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 25/71] hw/dma: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (27 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 24/71] hw/display: " Richard Henderson
@ 2024-12-13 19:06 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 26/71] hw/gpio: " Richard Henderson
` (43 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:06 UTC (permalink / raw)
To: qemu-devel
Cc: Hervé Poussineau, Michael S. Tsirkin, Paolo Bonzini,
Peter Maydell, Edgar E. Iglesias, Alistair Francis,
open list:PReP, open list:ARM PrimeCell and...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/dma/i82374.c | 2 +-
hw/dma/i8257.c | 2 +-
hw/dma/pl080.c | 2 +-
hw/dma/pl330.c | 2 +-
hw/dma/xilinx_axidma.c | 2 +-
hw/dma/xlnx-zdma.c | 2 +-
hw/dma/xlnx_csu_dma.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index e72aa2e1ce..032afedde2 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -139,7 +139,7 @@ static void i82374_realize(DeviceState *dev, Error **errp)
memset(s->commands, 0, sizeof(s->commands));
}
-static Property i82374_properties[] = {
+static const Property i82374_properties[] = {
DEFINE_PROP_UINT32("iobase", I82374State, iobase, 0x400),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c
index 3e6700e53b..8b04177393 100644
--- a/hw/dma/i8257.c
+++ b/hw/dma/i8257.c
@@ -585,7 +585,7 @@ static void i8257_realize(DeviceState *dev, Error **errp)
d->dma_bh = qemu_bh_new(i8257_dma_run, d);
}
-static Property i8257_properties[] = {
+static const Property i8257_properties[] = {
DEFINE_PROP_INT32("base", I8257State, base, 0x00),
DEFINE_PROP_INT32("page-base", I8257State, page_base, 0x80),
DEFINE_PROP_INT32("pageh-base", I8257State, pageh_base, 0x480),
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
index 8e76f88a69..3f392822ed 100644
--- a/hw/dma/pl080.c
+++ b/hw/dma/pl080.c
@@ -408,7 +408,7 @@ static void pl081_init(Object *obj)
s->nchannels = 2;
}
-static Property pl080_properties[] = {
+static const Property pl080_properties[] = {
DEFINE_PROP_LINK("downstream", PL080State, downstream,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c
index 0668caed7c..d5a0a1caa2 100644
--- a/hw/dma/pl330.c
+++ b/hw/dma/pl330.c
@@ -1646,7 +1646,7 @@ static void pl330_realize(DeviceState *dev, Error **errp)
pl330_fifo_init(&s->fifo, s->data_width / 4 * s->data_buffer_dep);
}
-static Property pl330_properties[] = {
+static const Property pl330_properties[] = {
/* CR0 */
DEFINE_PROP_UINT32("num_chnls", PL330State, num_chnls, 8),
DEFINE_PROP_UINT8("num_periph_req", PL330State, num_periph_req, 4),
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index 73a480bfbf..f09452d0b5 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -611,7 +611,7 @@ static void xilinx_axidma_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property axidma_properties[] = {
+static const Property axidma_properties[] = {
DEFINE_PROP_UINT32("freqhz", XilinxAXIDMA, freqhz, 50000000),
DEFINE_PROP_LINK("axistream-connected", XilinxAXIDMA,
tx_data_dev, TYPE_STREAM_SINK, StreamSink *),
diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c
index 46f50631ff..1a63d5f3b2 100644
--- a/hw/dma/xlnx-zdma.c
+++ b/hw/dma/xlnx-zdma.c
@@ -810,7 +810,7 @@ static const VMStateDescription vmstate_zdma = {
}
};
-static Property zdma_props[] = {
+static const Property zdma_props[] = {
DEFINE_PROP_UINT32("bus-width", XlnxZDMA, cfg.bus_width, 64),
DEFINE_PROP_LINK("dma", XlnxZDMA, dma_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c
index 43738c4350..d78dc6444b 100644
--- a/hw/dma/xlnx_csu_dma.c
+++ b/hw/dma/xlnx_csu_dma.c
@@ -691,7 +691,7 @@ static const VMStateDescription vmstate_xlnx_csu_dma = {
}
};
-static Property xlnx_csu_dma_properties[] = {
+static const Property xlnx_csu_dma_properties[] = {
/*
* Ref PG021, Stream Data Width:
* Data width in bits of the AXI S2MM AXI4-Stream Data bus.
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 26/71] hw/gpio: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (28 preceding siblings ...)
2024-12-13 19:06 ` [PATCH 25/71] hw/dma: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2025-01-06 20:15 ` Miles Glenn
2024-12-13 19:07 ` [PATCH 27/71] hw/hyperv: " Richard Henderson
` (42 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Tyrone Ting, Hao Wu, Glenn Miles, Alistair Francis,
Bin Meng, Palmer Dabbelt, Samuel Tardieu, open list:i.MX31 (kzm),
open list:pca955x, open list:SiFive Machines
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/gpio/imx_gpio.c | 2 +-
hw/gpio/npcm7xx_gpio.c | 2 +-
hw/gpio/omap_gpio.c | 2 +-
hw/gpio/pca9552.c | 2 +-
hw/gpio/pca9554.c | 2 +-
hw/gpio/pl061.c | 2 +-
hw/gpio/sifive_gpio.c | 2 +-
hw/gpio/stm32l4x5_gpio.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c
index 27535a577f..919d53701f 100644
--- a/hw/gpio/imx_gpio.c
+++ b/hw/gpio/imx_gpio.c
@@ -290,7 +290,7 @@ static const VMStateDescription vmstate_imx_gpio = {
}
};
-static Property imx_gpio_properties[] = {
+static const Property imx_gpio_properties[] = {
DEFINE_PROP_BOOL("has-edge-sel", IMXGPIOState, has_edge_sel, true),
DEFINE_PROP_BOOL("has-upper-pin-irq", IMXGPIOState, has_upper_pin_irq,
false),
diff --git a/hw/gpio/npcm7xx_gpio.c b/hw/gpio/npcm7xx_gpio.c
index ba19b9ebad..db6792b2ad 100644
--- a/hw/gpio/npcm7xx_gpio.c
+++ b/hw/gpio/npcm7xx_gpio.c
@@ -386,7 +386,7 @@ static const VMStateDescription vmstate_npcm7xx_gpio = {
},
};
-static Property npcm7xx_gpio_properties[] = {
+static const Property npcm7xx_gpio_properties[] = {
/* Bit n set => pin n has pullup enabled by default. */
DEFINE_PROP_UINT32("reset-pullup", NPCM7xxGPIOState, reset_pu, 0),
/* Bit n set => pin n has pulldown enabled by default. */
diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index a47a2167a6..03ee9e47c6 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -225,7 +225,7 @@ void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk)
gpio->clk = clk;
}
-static Property omap_gpio_properties[] = {
+static const Property omap_gpio_properties[] = {
DEFINE_PROP_INT32("mpu_model", Omap1GpioState, mpu_model, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
index 59b233339a..427419d218 100644
--- a/hw/gpio/pca9552.c
+++ b/hw/gpio/pca9552.c
@@ -428,7 +428,7 @@ static void pca955x_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(dev, pca955x_gpio_in_handler, k->pin_count);
}
-static Property pca955x_properties[] = {
+static const Property pca955x_properties[] = {
DEFINE_PROP_STRING("description", PCA955xState, description),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/gpio/pca9554.c b/hw/gpio/pca9554.c
index 68cc9e1de4..e8b0458aac 100644
--- a/hw/gpio/pca9554.c
+++ b/hw/gpio/pca9554.c
@@ -291,7 +291,7 @@ static void pca9554_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(dev, pca9554_gpio_in_handler, PCA9554_PIN_COUNT);
}
-static Property pca9554_properties[] = {
+static const Property pca9554_properties[] = {
DEFINE_PROP_STRING("description", PCA9554State, description),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index d5838b8e98..9b8ca6de32 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -562,7 +562,7 @@ static void pl061_realize(DeviceState *dev, Error **errp)
}
}
-static Property pl061_props[] = {
+static const Property pl061_props[] = {
DEFINE_PROP_UINT32("pullups", PL061State, pullups, 0xff),
DEFINE_PROP_UINT32("pulldowns", PL061State, pulldowns, 0x0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/gpio/sifive_gpio.c b/hw/gpio/sifive_gpio.c
index e85c0406a2..5603f0c235 100644
--- a/hw/gpio/sifive_gpio.c
+++ b/hw/gpio/sifive_gpio.c
@@ -349,7 +349,7 @@ static const VMStateDescription vmstate_sifive_gpio = {
}
};
-static Property sifive_gpio_properties[] = {
+static const Property sifive_gpio_properties[] = {
DEFINE_PROP_UINT32("ngpio", SIFIVEGPIOState, ngpio, SIFIVE_GPIO_PINS),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/gpio/stm32l4x5_gpio.c b/hw/gpio/stm32l4x5_gpio.c
index 30d8d6cba4..d1394f3f55 100644
--- a/hw/gpio/stm32l4x5_gpio.c
+++ b/hw/gpio/stm32l4x5_gpio.c
@@ -447,7 +447,7 @@ static const VMStateDescription vmstate_stm32l4x5_gpio = {
}
};
-static Property stm32l4x5_gpio_properties[] = {
+static const Property stm32l4x5_gpio_properties[] = {
DEFINE_PROP_STRING("name", Stm32l4x5GpioState, name),
DEFINE_PROP_UINT32("mode-reset", Stm32l4x5GpioState, moder_reset, 0),
DEFINE_PROP_UINT32("ospeed-reset", Stm32l4x5GpioState, ospeedr_reset, 0),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 26/71] hw/gpio: Constify all Property
2024-12-13 19:07 ` [PATCH 26/71] hw/gpio: " Richard Henderson
@ 2025-01-06 20:15 ` Miles Glenn
0 siblings, 0 replies; 124+ messages in thread
From: Miles Glenn @ 2025-01-06 20:15 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Tyrone Ting, Hao Wu, Alistair Francis, Bin Meng,
Palmer Dabbelt, Samuel Tardieu, open list:i.MX31 (kzm),
open list:pca955x, open list:SiFive Machines
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
On Fri, 2024-12-13 at 13:07 -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/gpio/imx_gpio.c | 2 +-
> hw/gpio/npcm7xx_gpio.c | 2 +-
> hw/gpio/omap_gpio.c | 2 +-
> hw/gpio/pca9552.c | 2 +-
> hw/gpio/pca9554.c | 2 +-
> hw/gpio/pl061.c | 2 +-
> hw/gpio/sifive_gpio.c | 2 +-
> hw/gpio/stm32l4x5_gpio.c | 2 +-
> 8 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c
> index 27535a577f..919d53701f 100644
> --- a/hw/gpio/imx_gpio.c
> +++ b/hw/gpio/imx_gpio.c
> @@ -290,7 +290,7 @@ static const VMStateDescription vmstate_imx_gpio
> = {
> }
> };
>
> -static Property imx_gpio_properties[] = {
> +static const Property imx_gpio_properties[] = {
> DEFINE_PROP_BOOL("has-edge-sel", IMXGPIOState, has_edge_sel,
> true),
> DEFINE_PROP_BOOL("has-upper-pin-irq", IMXGPIOState,
> has_upper_pin_irq,
> false),
> diff --git a/hw/gpio/npcm7xx_gpio.c b/hw/gpio/npcm7xx_gpio.c
> index ba19b9ebad..db6792b2ad 100644
> --- a/hw/gpio/npcm7xx_gpio.c
> +++ b/hw/gpio/npcm7xx_gpio.c
> @@ -386,7 +386,7 @@ static const VMStateDescription
> vmstate_npcm7xx_gpio = {
> },
> };
>
> -static Property npcm7xx_gpio_properties[] = {
> +static const Property npcm7xx_gpio_properties[] = {
> /* Bit n set => pin n has pullup enabled by default. */
> DEFINE_PROP_UINT32("reset-pullup", NPCM7xxGPIOState, reset_pu,
> 0),
> /* Bit n set => pin n has pulldown enabled by default. */
> diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
> index a47a2167a6..03ee9e47c6 100644
> --- a/hw/gpio/omap_gpio.c
> +++ b/hw/gpio/omap_gpio.c
> @@ -225,7 +225,7 @@ void omap_gpio_set_clk(Omap1GpioState *gpio,
> omap_clk clk)
> gpio->clk = clk;
> }
>
> -static Property omap_gpio_properties[] = {
> +static const Property omap_gpio_properties[] = {
> DEFINE_PROP_INT32("mpu_model", Omap1GpioState, mpu_model, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
> index 59b233339a..427419d218 100644
> --- a/hw/gpio/pca9552.c
> +++ b/hw/gpio/pca9552.c
> @@ -428,7 +428,7 @@ static void pca955x_realize(DeviceState *dev,
> Error **errp)
> qdev_init_gpio_in(dev, pca955x_gpio_in_handler, k->pin_count);
> }
>
> -static Property pca955x_properties[] = {
> +static const Property pca955x_properties[] = {
> DEFINE_PROP_STRING("description", PCA955xState, description),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/gpio/pca9554.c b/hw/gpio/pca9554.c
> index 68cc9e1de4..e8b0458aac 100644
> --- a/hw/gpio/pca9554.c
> +++ b/hw/gpio/pca9554.c
> @@ -291,7 +291,7 @@ static void pca9554_realize(DeviceState *dev,
> Error **errp)
> qdev_init_gpio_in(dev, pca9554_gpio_in_handler,
> PCA9554_PIN_COUNT);
> }
>
> -static Property pca9554_properties[] = {
> +static const Property pca9554_properties[] = {
> DEFINE_PROP_STRING("description", PCA9554State, description),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
> index d5838b8e98..9b8ca6de32 100644
> --- a/hw/gpio/pl061.c
> +++ b/hw/gpio/pl061.c
> @@ -562,7 +562,7 @@ static void pl061_realize(DeviceState *dev, Error
> **errp)
> }
> }
>
> -static Property pl061_props[] = {
> +static const Property pl061_props[] = {
> DEFINE_PROP_UINT32("pullups", PL061State, pullups, 0xff),
> DEFINE_PROP_UINT32("pulldowns", PL061State, pulldowns, 0x0),
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/gpio/sifive_gpio.c b/hw/gpio/sifive_gpio.c
> index e85c0406a2..5603f0c235 100644
> --- a/hw/gpio/sifive_gpio.c
> +++ b/hw/gpio/sifive_gpio.c
> @@ -349,7 +349,7 @@ static const VMStateDescription
> vmstate_sifive_gpio = {
> }
> };
>
> -static Property sifive_gpio_properties[] = {
> +static const Property sifive_gpio_properties[] = {
> DEFINE_PROP_UINT32("ngpio", SIFIVEGPIOState, ngpio,
> SIFIVE_GPIO_PINS),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/gpio/stm32l4x5_gpio.c b/hw/gpio/stm32l4x5_gpio.c
> index 30d8d6cba4..d1394f3f55 100644
> --- a/hw/gpio/stm32l4x5_gpio.c
> +++ b/hw/gpio/stm32l4x5_gpio.c
> @@ -447,7 +447,7 @@ static const VMStateDescription
> vmstate_stm32l4x5_gpio = {
> }
> };
>
> -static Property stm32l4x5_gpio_properties[] = {
> +static const Property stm32l4x5_gpio_properties[] = {
> DEFINE_PROP_STRING("name", Stm32l4x5GpioState, name),
> DEFINE_PROP_UINT32("mode-reset", Stm32l4x5GpioState,
> moder_reset, 0),
> DEFINE_PROP_UINT32("ospeed-reset", Stm32l4x5GpioState,
> ospeedr_reset, 0),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 27/71] hw/hyperv: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (29 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 26/71] hw/gpio: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-16 21:12 ` Maciej S. Szmigiero
2024-12-13 19:07 ` [PATCH 28/71] hw/i2c: " Richard Henderson
` (41 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Maciej S. Szmigiero
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/hyperv/hv-balloon.c | 2 +-
hw/hyperv/syndbg.c | 2 +-
hw/hyperv/vmbus.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c
index 3a9ef07691..74897b1604 100644
--- a/hw/hyperv/hv-balloon.c
+++ b/hw/hyperv/hv-balloon.c
@@ -1733,7 +1733,7 @@ static void hv_balloon_finalize(Object *obj)
hv_balloon_unrealize_finalize_common(balloon);
}
-static Property hv_balloon_properties[] = {
+static const Property hv_balloon_properties[] = {
DEFINE_PROP_BOOL("status-report", HvBalloon,
status_report.enabled, false),
diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c
index 065e12fb1e..0193addd42 100644
--- a/hw/hyperv/syndbg.c
+++ b/hw/hyperv/syndbg.c
@@ -366,7 +366,7 @@ static const VMStateDescription vmstate_hv_syndbg = {
.unmigratable = 1,
};
-static Property hv_syndbg_properties[] = {
+static const Property hv_syndbg_properties[] = {
DEFINE_PROP_STRING("host_ip", HvSynDbg, host_ip),
DEFINE_PROP_UINT16("host_port", HvSynDbg, host_port, 50000),
DEFINE_PROP_BOOL("use_hcalls", HvSynDbg, use_hcalls, false),
diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index b36bd3d67d..3d1f4d14e8 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -2346,7 +2346,7 @@ static void vmbus_dev_unrealize(DeviceState *dev)
free_channels(vdev);
}
-static Property vmbus_dev_props[] = {
+static const Property vmbus_dev_props[] = {
DEFINE_PROP_UUID("instanceid", VMBusDevice, instanceid),
DEFINE_PROP_END_OF_LIST()
};
@@ -2653,7 +2653,7 @@ static const VMStateDescription vmstate_vmbus_bridge = {
},
};
-static Property vmbus_bridge_props[] = {
+static const Property vmbus_bridge_props[] = {
DEFINE_PROP_UINT8("irq", VMBusBridge, irq, 7),
DEFINE_PROP_END_OF_LIST()
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 28/71] hw/i2c: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (30 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 27/71] hw/hyperv: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:36 ` Corey Minyard
2024-12-14 10:03 ` Cédric Le Goater
2024-12-13 19:07 ` [PATCH 29/71] hw/i386: " Richard Henderson
` (40 subsequent siblings)
72 siblings, 2 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Cédric Le Goater, Peter Maydell, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley, Corey Minyard,
Patrick Leis, open list:ASPEED BMCs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/i2c/aspeed_i2c.c | 4 ++--
hw/i2c/core.c | 2 +-
hw/i2c/i2c_mux_pca954x.c | 2 +-
hw/i2c/omap_i2c.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 3ae22cb052..2ea68c3090 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -1258,7 +1258,7 @@ static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
}
}
-static Property aspeed_i2c_properties[] = {
+static const Property aspeed_i2c_properties[] = {
DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
@@ -1446,7 +1446,7 @@ static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr_pool);
}
-static Property aspeed_i2c_bus_properties[] = {
+static const Property aspeed_i2c_bus_properties[] = {
DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
AspeedI2CState *),
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index 4cf30b2c86..4118d3db50 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -18,7 +18,7 @@
#define I2C_BROADCAST 0x00
-static Property i2c_props[] = {
+static const Property i2c_props[] = {
DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
index db5db956a6..80c570fd10 100644
--- a/hw/i2c/i2c_mux_pca954x.c
+++ b/hw/i2c/i2c_mux_pca954x.c
@@ -211,7 +211,7 @@ static void pca954x_init(Object *obj)
}
}
-static Property pca954x_props[] = {
+static const Property pca954x_props[] = {
DEFINE_PROP_STRING("name", Pca954xState, name),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
index e78505ebdd..172df135f5 100644
--- a/hw/i2c/omap_i2c.c
+++ b/hw/i2c/omap_i2c.c
@@ -511,7 +511,7 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
i2c->fclk = clk;
}
-static Property omap_i2c_properties[] = {
+static const Property omap_i2c_properties[] = {
DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 28/71] hw/i2c: Constify all Property
2024-12-13 19:07 ` [PATCH 28/71] hw/i2c: " Richard Henderson
@ 2024-12-13 19:36 ` Corey Minyard
2024-12-14 10:03 ` Cédric Le Goater
1 sibling, 0 replies; 124+ messages in thread
From: Corey Minyard @ 2024-12-13 19:36 UTC (permalink / raw)
To: Richard Henderson
Cc: qemu-devel, Cédric Le Goater, Peter Maydell, Steven Lee,
Troy Lee, Jamin Lin, Andrew Jeffery, Joel Stanley, Patrick Leis,
open list:ASPEED BMCs
[-- Attachment #1: Type: text/plain, Size: 2704 bytes --]
Yeah, a no brainer.
Acked-by: Corey Minyard <cminyard@mvista.com>
On Fri, Dec 13, 2024 at 01:07:02PM -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/i2c/aspeed_i2c.c | 4 ++--
> hw/i2c/core.c | 2 +-
> hw/i2c/i2c_mux_pca954x.c | 2 +-
> hw/i2c/omap_i2c.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
> index 3ae22cb052..2ea68c3090 100644
> --- a/hw/i2c/aspeed_i2c.c
> +++ b/hw/i2c/aspeed_i2c.c
> @@ -1258,7 +1258,7 @@ static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property aspeed_i2c_properties[] = {
> +static const Property aspeed_i2c_properties[] = {
> DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> @@ -1446,7 +1446,7 @@ static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr_pool);
> }
>
> -static Property aspeed_i2c_bus_properties[] = {
> +static const Property aspeed_i2c_bus_properties[] = {
> DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
> DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
> AspeedI2CState *),
> diff --git a/hw/i2c/core.c b/hw/i2c/core.c
> index 4cf30b2c86..4118d3db50 100644
> --- a/hw/i2c/core.c
> +++ b/hw/i2c/core.c
> @@ -18,7 +18,7 @@
>
> #define I2C_BROADCAST 0x00
>
> -static Property i2c_props[] = {
> +static const Property i2c_props[] = {
> DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
> index db5db956a6..80c570fd10 100644
> --- a/hw/i2c/i2c_mux_pca954x.c
> +++ b/hw/i2c/i2c_mux_pca954x.c
> @@ -211,7 +211,7 @@ static void pca954x_init(Object *obj)
> }
> }
>
> -static Property pca954x_props[] = {
> +static const Property pca954x_props[] = {
> DEFINE_PROP_STRING("name", Pca954xState, name),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
> index e78505ebdd..172df135f5 100644
> --- a/hw/i2c/omap_i2c.c
> +++ b/hw/i2c/omap_i2c.c
> @@ -511,7 +511,7 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
> i2c->fclk = clk;
> }
>
> -static Property omap_i2c_properties[] = {
> +static const Property omap_i2c_properties[] = {
> DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> --
> 2.43.0
>
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3365 bytes --]
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 28/71] hw/i2c: Constify all Property
2024-12-13 19:07 ` [PATCH 28/71] hw/i2c: " Richard Henderson
2024-12-13 19:36 ` Corey Minyard
@ 2024-12-14 10:03 ` Cédric Le Goater
1 sibling, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:03 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Steven Lee, Troy Lee, Jamin Lin, Andrew Jeffery,
Joel Stanley, Corey Minyard, Patrick Leis, open list:ASPEED BMCs
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/i2c/aspeed_i2c.c | 4 ++--
> hw/i2c/core.c | 2 +-
> hw/i2c/i2c_mux_pca954x.c | 2 +-
> hw/i2c/omap_i2c.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
> index 3ae22cb052..2ea68c3090 100644
> --- a/hw/i2c/aspeed_i2c.c
> +++ b/hw/i2c/aspeed_i2c.c
> @@ -1258,7 +1258,7 @@ static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property aspeed_i2c_properties[] = {
> +static const Property aspeed_i2c_properties[] = {
> DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> @@ -1446,7 +1446,7 @@ static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr_pool);
> }
>
> -static Property aspeed_i2c_bus_properties[] = {
> +static const Property aspeed_i2c_bus_properties[] = {
> DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
> DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
> AspeedI2CState *),
> diff --git a/hw/i2c/core.c b/hw/i2c/core.c
> index 4cf30b2c86..4118d3db50 100644
> --- a/hw/i2c/core.c
> +++ b/hw/i2c/core.c
> @@ -18,7 +18,7 @@
>
> #define I2C_BROADCAST 0x00
>
> -static Property i2c_props[] = {
> +static const Property i2c_props[] = {
> DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
> index db5db956a6..80c570fd10 100644
> --- a/hw/i2c/i2c_mux_pca954x.c
> +++ b/hw/i2c/i2c_mux_pca954x.c
> @@ -211,7 +211,7 @@ static void pca954x_init(Object *obj)
> }
> }
>
> -static Property pca954x_props[] = {
> +static const Property pca954x_props[] = {
> DEFINE_PROP_STRING("name", Pca954xState, name),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
> index e78505ebdd..172df135f5 100644
> --- a/hw/i2c/omap_i2c.c
> +++ b/hw/i2c/omap_i2c.c
> @@ -511,7 +511,7 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
> i2c->fclk = clk;
> }
>
> -static Property omap_i2c_properties[] = {
> +static const Property omap_i2c_properties[] = {
> DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 29/71] hw/i386: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (31 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 28/71] hw/i2c: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-16 6:14 ` CLEMENT MATHIEU--DRIF
2024-12-13 19:07 ` [PATCH 30/71] hw/ide: " Richard Henderson
` (39 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Eduardo Habkost, Jason Wang, Yi Liu, Clément Mathieu--Drif,
Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/i386/amd_iommu.c | 2 +-
hw/i386/intel_iommu.c | 2 +-
hw/i386/kvm/clock.c | 2 +-
hw/i386/kvm/i8254.c | 2 +-
hw/i386/kvm/ioapic.c | 2 +-
hw/i386/sgx-epc.c | 2 +-
hw/i386/vmmouse.c | 2 +-
hw/i386/vmport.c | 2 +-
hw/i386/x86-iommu.c | 2 +-
hw/i386/xen/xen_pvdevice.c | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index af0f4da1f6..ca3e62a244 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1668,7 +1668,7 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
amdvi_init(s);
}
-static Property amdvi_properties[] = {
+static const Property amdvi_properties[] = {
DEFINE_PROP_BOOL("xtsup", AMDVIState, xtsup, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 4c0d1d7d47..a5b268342f 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3404,7 +3404,7 @@ static const MemoryRegionOps vtd_mem_ops = {
},
};
-static Property vtd_properties[] = {
+static const Property vtd_properties[] = {
DEFINE_PROP_UINT32("version", IntelIOMMUState, version, 0),
DEFINE_PROP_ON_OFF_AUTO("eim", IntelIOMMUState, intr_eim,
ON_OFF_AUTO_AUTO),
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 40aa9a32c3..71150ed2e0 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -305,7 +305,7 @@ static const VMStateDescription kvmclock_vmsd = {
}
};
-static Property kvmclock_properties[] = {
+static const Property kvmclock_properties[] = {
DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState,
mach_use_reliable_get_clock, true),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index baa4b39582..2933d3f458 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -287,7 +287,7 @@ static void kvm_pit_realizefn(DeviceState *dev, Error **errp)
kpc->parent_realize(dev, errp);
}
-static Property kvm_pit_properties[] = {
+static const Property kvm_pit_properties[] = {
DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState,
lost_tick_policy, LOST_TICK_POLICY_DELAY),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index 2907b08164..217ff43b98 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -133,7 +133,7 @@ static void kvm_ioapic_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(dev, kvm_ioapic_set_irq, IOAPIC_NUM_PINS);
}
-static Property kvm_ioapic_properties[] = {
+static const Property kvm_ioapic_properties[] = {
DEFINE_PROP_UINT32("gsi_base", KVMIOAPICState, kvm_gsi_base, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c
index d664829d35..c232e825e0 100644
--- a/hw/i386/sgx-epc.c
+++ b/hw/i386/sgx-epc.c
@@ -19,7 +19,7 @@
#include "target/i386/cpu.h"
#include "exec/address-spaces.h"
-static Property sgx_epc_properties[] = {
+static const Property sgx_epc_properties[] = {
DEFINE_PROP_UINT64(SGX_EPC_ADDR_PROP, SGXEPCDevice, addr, 0),
DEFINE_PROP_UINT32(SGX_EPC_NUMA_NODE_PROP, SGXEPCDevice, node, 0),
DEFINE_PROP_LINK(SGX_EPC_MEMDEV_PROP, SGXEPCDevice, hostmem,
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index 76130cd46d..da9c35c1ec 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -317,7 +317,7 @@ static void vmmouse_realizefn(DeviceState *dev, Error **errp)
vmport_register(VMPORT_CMD_VMMOUSE_DATA, vmmouse_ioport_read, s);
}
-static Property vmmouse_properties[] = {
+static const Property vmmouse_properties[] = {
DEFINE_PROP_LINK("i8042", VMMouseState, i8042, TYPE_I8042, ISAKBDState *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 7cc75dbc6d..cab6e72089 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -252,7 +252,7 @@ static void vmport_realizefn(DeviceState *dev, Error **errp)
}
}
-static Property vmport_properties[] = {
+static const Property vmport_properties[] = {
/* Used to enforce compatibility for migration */
DEFINE_PROP_BIT("x-read-set-eax", VMPortState, compat_flags,
VMPORT_COMPAT_READ_SET_EAX_BIT, true),
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 60af896225..155f6262ea 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -125,7 +125,7 @@ static void x86_iommu_realize(DeviceState *dev, Error **errp)
}
}
-static Property x86_iommu_properties[] = {
+static const Property x86_iommu_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("intremap", X86IOMMUState,
intr_supported, ON_OFF_AUTO_AUTO),
DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false),
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index ed621531d8..e71483e6e3 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -115,7 +115,7 @@ static void xen_pv_realize(PCIDevice *pci_dev, Error **errp)
&d->mmio);
}
-static Property xen_pv_props[] = {
+static const Property xen_pv_props[] = {
DEFINE_PROP_UINT16("vendor-id", XenPVDevice, vendor_id, PCI_VENDOR_ID_XEN),
DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, 0xffff),
DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 29/71] hw/i386: Constify all Property
2024-12-13 19:07 ` [PATCH 29/71] hw/i386: " Richard Henderson
@ 2024-12-16 6:14 ` CLEMENT MATHIEU--DRIF
2024-12-16 14:05 ` Richard Henderson
0 siblings, 1 reply; 124+ messages in thread
From: CLEMENT MATHIEU--DRIF @ 2024-12-16 6:14 UTC (permalink / raw)
To: Richard Henderson, qemu-devel@nongnu.org
Cc: Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Eduardo Habkost, Jason Wang, Yi Liu, Stefano Stabellini,
Anthony PERARD, Paul Durrant, Edgar E. Iglesias,
open list:X86 Xen CPUs
Hi Rihard.
Good idea, LGTM.
Just out of curiosity, what was the motivation for such a patch?
It it simply about cleaning the code or is it intended to solve a deeper
problem.
Thanks,
cmd
On 13/12/2024 20:07, Richard Henderson wrote:
> Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
>
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/i386/amd_iommu.c | 2 +-
> hw/i386/intel_iommu.c | 2 +-
> hw/i386/kvm/clock.c | 2 +-
> hw/i386/kvm/i8254.c | 2 +-
> hw/i386/kvm/ioapic.c | 2 +-
> hw/i386/sgx-epc.c | 2 +-
> hw/i386/vmmouse.c | 2 +-
> hw/i386/vmport.c | 2 +-
> hw/i386/x86-iommu.c | 2 +-
> hw/i386/xen/xen_pvdevice.c | 2 +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index af0f4da1f6..ca3e62a244 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1668,7 +1668,7 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
> amdvi_init(s);
> }
>
> -static Property amdvi_properties[] = {
> +static const Property amdvi_properties[] = {
> DEFINE_PROP_BOOL("xtsup", AMDVIState, xtsup, false),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 4c0d1d7d47..a5b268342f 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3404,7 +3404,7 @@ static const MemoryRegionOps vtd_mem_ops = {
> },
> };
>
> -static Property vtd_properties[] = {
> +static const Property vtd_properties[] = {
> DEFINE_PROP_UINT32("version", IntelIOMMUState, version, 0),
> DEFINE_PROP_ON_OFF_AUTO("eim", IntelIOMMUState, intr_eim,
> ON_OFF_AUTO_AUTO),
> diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
> index 40aa9a32c3..71150ed2e0 100644
> --- a/hw/i386/kvm/clock.c
> +++ b/hw/i386/kvm/clock.c
> @@ -305,7 +305,7 @@ static const VMStateDescription kvmclock_vmsd = {
> }
> };
>
> -static Property kvmclock_properties[] = {
> +static const Property kvmclock_properties[] = {
> DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState,
> mach_use_reliable_get_clock, true),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
> index baa4b39582..2933d3f458 100644
> --- a/hw/i386/kvm/i8254.c
> +++ b/hw/i386/kvm/i8254.c
> @@ -287,7 +287,7 @@ static void kvm_pit_realizefn(DeviceState *dev, Error **errp)
> kpc->parent_realize(dev, errp);
> }
>
> -static Property kvm_pit_properties[] = {
> +static const Property kvm_pit_properties[] = {
> DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState,
> lost_tick_policy, LOST_TICK_POLICY_DELAY),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
> index 2907b08164..217ff43b98 100644
> --- a/hw/i386/kvm/ioapic.c
> +++ b/hw/i386/kvm/ioapic.c
> @@ -133,7 +133,7 @@ static void kvm_ioapic_realize(DeviceState *dev, Error **errp)
> qdev_init_gpio_in(dev, kvm_ioapic_set_irq, IOAPIC_NUM_PINS);
> }
>
> -static Property kvm_ioapic_properties[] = {
> +static const Property kvm_ioapic_properties[] = {
> DEFINE_PROP_UINT32("gsi_base", KVMIOAPICState, kvm_gsi_base, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c
> index d664829d35..c232e825e0 100644
> --- a/hw/i386/sgx-epc.c
> +++ b/hw/i386/sgx-epc.c
> @@ -19,7 +19,7 @@
> #include "target/i386/cpu.h"
> #include "exec/address-spaces.h"
>
> -static Property sgx_epc_properties[] = {
> +static const Property sgx_epc_properties[] = {
> DEFINE_PROP_UINT64(SGX_EPC_ADDR_PROP, SGXEPCDevice, addr, 0),
> DEFINE_PROP_UINT32(SGX_EPC_NUMA_NODE_PROP, SGXEPCDevice, node, 0),
> DEFINE_PROP_LINK(SGX_EPC_MEMDEV_PROP, SGXEPCDevice, hostmem,
> diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
> index 76130cd46d..da9c35c1ec 100644
> --- a/hw/i386/vmmouse.c
> +++ b/hw/i386/vmmouse.c
> @@ -317,7 +317,7 @@ static void vmmouse_realizefn(DeviceState *dev, Error **errp)
> vmport_register(VMPORT_CMD_VMMOUSE_DATA, vmmouse_ioport_read, s);
> }
>
> -static Property vmmouse_properties[] = {
> +static const Property vmmouse_properties[] = {
> DEFINE_PROP_LINK("i8042", VMMouseState, i8042, TYPE_I8042, ISAKBDState *),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
> index 7cc75dbc6d..cab6e72089 100644
> --- a/hw/i386/vmport.c
> +++ b/hw/i386/vmport.c
> @@ -252,7 +252,7 @@ static void vmport_realizefn(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property vmport_properties[] = {
> +static const Property vmport_properties[] = {
> /* Used to enforce compatibility for migration */
> DEFINE_PROP_BIT("x-read-set-eax", VMPortState, compat_flags,
> VMPORT_COMPAT_READ_SET_EAX_BIT, true),
> diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
> index 60af896225..155f6262ea 100644
> --- a/hw/i386/x86-iommu.c
> +++ b/hw/i386/x86-iommu.c
> @@ -125,7 +125,7 @@ static void x86_iommu_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property x86_iommu_properties[] = {
> +static const Property x86_iommu_properties[] = {
> DEFINE_PROP_ON_OFF_AUTO("intremap", X86IOMMUState,
> intr_supported, ON_OFF_AUTO_AUTO),
> DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false),
> diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
> index ed621531d8..e71483e6e3 100644
> --- a/hw/i386/xen/xen_pvdevice.c
> +++ b/hw/i386/xen/xen_pvdevice.c
> @@ -115,7 +115,7 @@ static void xen_pv_realize(PCIDevice *pci_dev, Error **errp)
> &d->mmio);
> }
>
> -static Property xen_pv_props[] = {
> +static const Property xen_pv_props[] = {
> DEFINE_PROP_UINT16("vendor-id", XenPVDevice, vendor_id, PCI_VENDOR_ID_XEN),
> DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, 0xffff),
> DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01),
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 29/71] hw/i386: Constify all Property
2024-12-16 6:14 ` CLEMENT MATHIEU--DRIF
@ 2024-12-16 14:05 ` Richard Henderson
0 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-16 14:05 UTC (permalink / raw)
To: CLEMENT MATHIEU--DRIF, qemu-devel@nongnu.org
Cc: Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Eduardo Habkost, Jason Wang, Yi Liu, Stefano Stabellini,
Anthony PERARD, Paul Durrant, Edgar E. Iglesias,
open list:X86 Xen CPUs
On 12/16/24 00:14, CLEMENT MATHIEU--DRIF wrote:
> Hi Rihard.
>
> Good idea, LGTM.
>
> Just out of curiosity, what was the motivation for such a patch?
> It it simply about cleaning the code or is it intended to solve a deeper
> problem.
Simply cleaning the code, prompted by a change to core QAPI code for Rust enablement.
r~
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 30/71] hw/ide: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (32 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 29/71] hw/i386: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 18:38 ` Bernhard Beschow
2024-12-13 19:07 ` [PATCH 31/71] hw/input: " Richard Henderson
` (38 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, open list:IDE
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ide/ahci.c | 2 +-
hw/ide/cf.c | 2 +-
hw/ide/cmd646.c | 2 +-
hw/ide/ide-dev.c | 6 +++---
hw/ide/isa.c | 2 +-
hw/ide/macio.c | 2 +-
hw/ide/mmio.c | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 0eb24304ee..8ee015c1a4 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1867,7 +1867,7 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp)
ahci_realize(&s->ahci, dev, &address_space_memory);
}
-static Property sysbus_ahci_properties[] = {
+static const Property sysbus_ahci_properties[] = {
DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ide/cf.c b/hw/ide/cf.c
index 2a425cb0f2..190914f513 100644
--- a/hw/ide/cf.c
+++ b/hw/ide/cf.c
@@ -24,7 +24,7 @@ static void ide_cf_realize(IDEDevice *dev, Error **errp)
ide_dev_initfn(dev, IDE_CFATA, errp);
}
-static Property ide_cf_properties[] = {
+static const Property ide_cf_properties[] = {
DEFINE_IDE_DEV_PROPERTIES(),
DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 6b02fc81ec..942f6c470c 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -313,7 +313,7 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
}
}
-static Property cmd646_ide_properties[] = {
+static const Property cmd646_ide_properties[] = {
DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c
index 03f7967798..cc92531f1c 100644
--- a/hw/ide/ide-dev.c
+++ b/hw/ide/ide-dev.c
@@ -29,7 +29,7 @@
#include "qapi/visitor.h"
#include "ide-internal.h"
-static Property ide_props[] = {
+static const Property ide_props[] = {
DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1),
DEFINE_PROP_BOOL("win2k-install-hack", IDEDevice, win2k_install_hack, false),
DEFINE_PROP_END_OF_LIST(),
@@ -191,7 +191,7 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
ide_dev_initfn(dev, IDE_CD, errp);
}
-static Property ide_hd_properties[] = {
+static const Property ide_hd_properties[] = {
DEFINE_IDE_DEV_PROPERTIES(),
DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
@@ -218,7 +218,7 @@ static const TypeInfo ide_hd_info = {
.class_init = ide_hd_class_init,
};
-static Property ide_cd_properties[] = {
+static const Property ide_cd_properties[] = {
DEFINE_IDE_DEV_PROPERTIES(),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index 211ebc9ba7..a0a7e4837c 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -101,7 +101,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum,
return isadev;
}
-static Property isa_ide_properties[] = {
+static const Property isa_ide_properties[] = {
DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0),
DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6),
DEFINE_PROP_UINT32("irq", ISAIDEState, irqnum, 14),
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 99477a3d13..25f8403e80 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -459,7 +459,7 @@ static void macio_ide_initfn(Object *obj)
qdev_prop_allow_set_link_before_realize, 0);
}
-static Property macio_ide_properties[] = {
+static const Property macio_ide_properties[] = {
DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0),
DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index 53d22fb37f..43ab66f347 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -141,7 +141,7 @@ static void mmio_ide_initfn(Object *obj)
sysbus_init_irq(d, &s->irq);
}
-static Property mmio_ide_properties[] = {
+static const Property mmio_ide_properties[] = {
DEFINE_PROP_UINT32("shift", MMIOIDEState, shift, 0),
DEFINE_PROP_END_OF_LIST()
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 30/71] hw/ide: Constify all Property
2024-12-13 19:07 ` [PATCH 30/71] hw/ide: " Richard Henderson
@ 2024-12-14 18:38 ` Bernhard Beschow
0 siblings, 0 replies; 124+ messages in thread
From: Bernhard Beschow @ 2024-12-14 18:38 UTC (permalink / raw)
To: qemu-devel, Richard Henderson; +Cc: John Snow, qemu-block
Am 13. Dezember 2024 19:07:04 UTC schrieb Richard Henderson <richard.henderson@linaro.org>:
>Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>---
> hw/ide/ahci.c | 2 +-
> hw/ide/cf.c | 2 +-
> hw/ide/cmd646.c | 2 +-
> hw/ide/ide-dev.c | 6 +++---
> hw/ide/isa.c | 2 +-
> hw/ide/macio.c | 2 +-
> hw/ide/mmio.c | 2 +-
> 7 files changed, 9 insertions(+), 9 deletions(-)
>
>diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
>index 0eb24304ee..8ee015c1a4 100644
>--- a/hw/ide/ahci.c
>+++ b/hw/ide/ahci.c
>@@ -1867,7 +1867,7 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp)
> ahci_realize(&s->ahci, dev, &address_space_memory);
> }
>
>-static Property sysbus_ahci_properties[] = {
>+static const Property sysbus_ahci_properties[] = {
> DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
>diff --git a/hw/ide/cf.c b/hw/ide/cf.c
>index 2a425cb0f2..190914f513 100644
>--- a/hw/ide/cf.c
>+++ b/hw/ide/cf.c
>@@ -24,7 +24,7 @@ static void ide_cf_realize(IDEDevice *dev, Error **errp)
> ide_dev_initfn(dev, IDE_CFATA, errp);
> }
>
>-static Property ide_cf_properties[] = {
>+static const Property ide_cf_properties[] = {
> DEFINE_IDE_DEV_PROPERTIES(),
> DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
> DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
>diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
>index 6b02fc81ec..942f6c470c 100644
>--- a/hw/ide/cmd646.c
>+++ b/hw/ide/cmd646.c
>@@ -313,7 +313,7 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
> }
> }
>
>-static Property cmd646_ide_properties[] = {
>+static const Property cmd646_ide_properties[] = {
> DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
>diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c
>index 03f7967798..cc92531f1c 100644
>--- a/hw/ide/ide-dev.c
>+++ b/hw/ide/ide-dev.c
>@@ -29,7 +29,7 @@
> #include "qapi/visitor.h"
> #include "ide-internal.h"
>
>-static Property ide_props[] = {
>+static const Property ide_props[] = {
> DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1),
> DEFINE_PROP_BOOL("win2k-install-hack", IDEDevice, win2k_install_hack, false),
> DEFINE_PROP_END_OF_LIST(),
>@@ -191,7 +191,7 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
> ide_dev_initfn(dev, IDE_CD, errp);
> }
>
>-static Property ide_hd_properties[] = {
>+static const Property ide_hd_properties[] = {
> DEFINE_IDE_DEV_PROPERTIES(),
> DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
> DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
>@@ -218,7 +218,7 @@ static const TypeInfo ide_hd_info = {
> .class_init = ide_hd_class_init,
> };
>
>-static Property ide_cd_properties[] = {
>+static const Property ide_cd_properties[] = {
> DEFINE_IDE_DEV_PROPERTIES(),
> DEFINE_PROP_END_OF_LIST(),
> };
>diff --git a/hw/ide/isa.c b/hw/ide/isa.c
>index 211ebc9ba7..a0a7e4837c 100644
>--- a/hw/ide/isa.c
>+++ b/hw/ide/isa.c
>@@ -101,7 +101,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum,
> return isadev;
> }
>
>-static Property isa_ide_properties[] = {
>+static const Property isa_ide_properties[] = {
> DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0),
> DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6),
> DEFINE_PROP_UINT32("irq", ISAIDEState, irqnum, 14),
>diff --git a/hw/ide/macio.c b/hw/ide/macio.c
>index 99477a3d13..25f8403e80 100644
>--- a/hw/ide/macio.c
>+++ b/hw/ide/macio.c
>@@ -459,7 +459,7 @@ static void macio_ide_initfn(Object *obj)
> qdev_prop_allow_set_link_before_realize, 0);
> }
>
>-static Property macio_ide_properties[] = {
>+static const Property macio_ide_properties[] = {
> DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0),
> DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1),
> DEFINE_PROP_END_OF_LIST(),
>diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
>index 53d22fb37f..43ab66f347 100644
>--- a/hw/ide/mmio.c
>+++ b/hw/ide/mmio.c
>@@ -141,7 +141,7 @@ static void mmio_ide_initfn(Object *obj)
> sysbus_init_irq(d, &s->irq);
> }
>
>-static Property mmio_ide_properties[] = {
>+static const Property mmio_ide_properties[] = {
> DEFINE_PROP_UINT32("shift", MMIOIDEState, shift, 0),
> DEFINE_PROP_END_OF_LIST()
> };
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 31/71] hw/input: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (33 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 30/71] hw/ide: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 32/71] hw/intc: " Richard Henderson
` (37 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Paolo Bonzini, Peter Maydell, Gerd Hoffmann,
open list:Stellaris
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/input/pckbd.c | 4 ++--
hw/input/stellaris_gamepad.c | 2 +-
hw/input/virtio-input-hid.c | 6 +++---
hw/input/virtio-input-host.c | 2 +-
hw/input/virtio-input.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 04c1b3cbf9..24a133fd25 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -735,7 +735,7 @@ static void i8042_mmio_init(Object *obj)
"ps2-mouse-input-irq", 1);
}
-static Property i8042_mmio_properties[] = {
+static const Property i8042_mmio_properties[] = {
DEFINE_PROP_UINT64("mask", MMIOKBDState, kbd.mask, UINT64_MAX),
DEFINE_PROP_UINT32("size", MMIOKBDState, size, -1),
DEFINE_PROP_END_OF_LIST(),
@@ -933,7 +933,7 @@ static void i8042_build_aml(AcpiDevAmlIf *adev, Aml *scope)
aml_append(scope, mou);
}
-static Property i8042_properties[] = {
+static const Property i8042_properties[] = {
DEFINE_PROP_BOOL("extended-state", ISAKBDState, kbd.extended_state, true),
DEFINE_PROP_BOOL("kbd-throttle", ISAKBDState, kbd_throttle, false),
DEFINE_PROP_UINT8("kbd-irq", ISAKBDState, kbd_irq, 1),
diff --git a/hw/input/stellaris_gamepad.c b/hw/input/stellaris_gamepad.c
index 17ee42b9fc..b1cc693189 100644
--- a/hw/input/stellaris_gamepad.c
+++ b/hw/input/stellaris_gamepad.c
@@ -77,7 +77,7 @@ static void stellaris_gamepad_reset_enter(Object *obj, ResetType type)
memset(s->pressed, 0, s->num_buttons * sizeof(uint8_t));
}
-static Property stellaris_gamepad_properties[] = {
+static const Property stellaris_gamepad_properties[] = {
DEFINE_PROP_ARRAY("keycodes", StellarisGamepad, num_buttons,
keycodes, qdev_prop_uint32, uint32_t),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 45e4d4c75d..7396385508 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -237,7 +237,7 @@ static void virtio_input_hid_handle_status(VirtIOInput *vinput,
}
}
-static Property virtio_input_hid_properties[] = {
+static const Property virtio_input_hid_properties[] = {
DEFINE_PROP_STRING("display", VirtIOInputHID, display),
DEFINE_PROP_UINT32("head", VirtIOInputHID, head, 0),
DEFINE_PROP_END_OF_LIST(),
@@ -380,7 +380,7 @@ static struct virtio_input_config virtio_mouse_config_v2[] = {
{ /* end of list */ },
};
-static Property virtio_mouse_properties[] = {
+static const Property virtio_mouse_properties[] = {
DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true),
DEFINE_PROP_END_OF_LIST(),
};
@@ -505,7 +505,7 @@ static struct virtio_input_config virtio_tablet_config_v2[] = {
{ /* end of list */ },
};
-static Property virtio_tablet_properties[] = {
+static const Property virtio_tablet_properties[] = {
DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c
index fea7139382..2be2c633ab 100644
--- a/hw/input/virtio-input-host.c
+++ b/hw/input/virtio-input-host.c
@@ -221,7 +221,7 @@ static const VMStateDescription vmstate_virtio_input_host = {
.unmigratable = 1,
};
-static Property virtio_input_host_properties[] = {
+static const Property virtio_input_host_properties[] = {
DEFINE_PROP_STRING("evdev", VirtIOInputHost, evdev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index 3bcdae41b2..edcd94dedb 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -300,7 +300,7 @@ static const VMStateDescription vmstate_virtio_input = {
.post_load = virtio_input_post_load,
};
-static Property virtio_input_properties[] = {
+static const Property virtio_input_properties[] = {
DEFINE_PROP_STRING("serial", VirtIOInput, serial),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 32/71] hw/intc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (34 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 31/71] hw/input: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 20:41 ` Daniel Henrique Barboza
2024-12-13 19:07 ` [PATCH 33/71] hw/ipack: " Richard Henderson
` (36 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Paolo Bonzini, Peter Maydell, Igor Mitsyanko,
Laurent Vivier, Clément Chigot, Frederic Konrad, Song Gao,
Bibo Mao, Jiaxun Yang, Huacai Chen, Philippe Mathieu-Daudé,
Jia Liu, Mark Cave-Ayland, Bernhard Beschow,
Frédéric Barrat, Nicholas Piggin, Palmer Dabbelt,
Alistair Francis, Bin Meng, Weiwei Li, Daniel Henrique Barboza,
Liu Zhiwei, Yoshinori Sato, Thomas Huth, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Harsh Prateek Bora,
Edgar E. Iglesias, open list:ARM cores, open list:e500,
open list:RISC-V TCG CPUs, open list:S390 general arch...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/intc/apic_common.c | 2 +-
hw/intc/arm_gic_common.c | 2 +-
hw/intc/arm_gicv2m.c | 2 +-
hw/intc/arm_gicv3_common.c | 2 +-
hw/intc/arm_gicv3_its.c | 2 +-
hw/intc/arm_gicv3_its_kvm.c | 2 +-
hw/intc/armv7m_nvic.c | 2 +-
hw/intc/exynos4210_combiner.c | 2 +-
hw/intc/exynos4210_gic.c | 2 +-
hw/intc/goldfish_pic.c | 2 +-
hw/intc/grlib_irqmp.c | 2 +-
hw/intc/i8259_common.c | 2 +-
hw/intc/ioapic.c | 2 +-
hw/intc/loongarch_extioi.c | 2 +-
hw/intc/loongarch_pch_msi.c | 2 +-
hw/intc/loongarch_pch_pic.c | 2 +-
hw/intc/loongson_ipi_common.c | 2 +-
hw/intc/m68k_irqc.c | 2 +-
hw/intc/mips_gic.c | 2 +-
hw/intc/omap_intc.c | 2 +-
hw/intc/ompic.c | 2 +-
hw/intc/openpic.c | 2 +-
hw/intc/openpic_kvm.c | 2 +-
hw/intc/pnv_xive.c | 2 +-
hw/intc/pnv_xive2.c | 2 +-
hw/intc/ppc-uic.c | 2 +-
hw/intc/riscv_aclint.c | 4 ++--
hw/intc/riscv_aplic.c | 2 +-
hw/intc/riscv_imsic.c | 2 +-
hw/intc/rx_icu.c | 2 +-
hw/intc/s390_flic.c | 4 ++--
hw/intc/sifive_plic.c | 2 +-
hw/intc/spapr_xive.c | 2 +-
hw/intc/xics.c | 4 ++--
hw/intc/xilinx_intc.c | 2 +-
hw/intc/xive.c | 8 ++++----
hw/intc/xive2.c | 4 ++--
hw/intc/xlnx-pmu-iomod-intc.c | 2 +-
38 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 62f3bbf203..8be9f22de8 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -408,7 +408,7 @@ static const VMStateDescription vmstate_apic_common = {
}
};
-static Property apic_properties_common[] = {
+static const Property apic_properties_common[] = {
DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14),
DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABLE_BIT,
true),
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
index 53fb2c4e2d..e961cd9156 100644
--- a/hw/intc/arm_gic_common.c
+++ b/hw/intc/arm_gic_common.c
@@ -348,7 +348,7 @@ static void arm_gic_common_linux_init(ARMLinuxBootIf *obj,
}
}
-static Property arm_gic_common_properties[] = {
+static const Property arm_gic_common_properties[] = {
DEFINE_PROP_UINT32("num-cpu", GICState, num_cpu, 1),
DEFINE_PROP_UINT32("num-irq", GICState, num_irq, 32),
/* Revision can be 1 or 2 for GIC architecture specification
diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
index d564b857eb..ffa830b433 100644
--- a/hw/intc/arm_gicv2m.c
+++ b/hw/intc/arm_gicv2m.c
@@ -170,7 +170,7 @@ static void gicv2m_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property gicv2m_properties[] = {
+static const Property gicv2m_properties[] = {
DEFINE_PROP_UINT32("base-spi", ARMGICv2mState, base_spi, 0),
DEFINE_PROP_UINT32("num-spi", ARMGICv2mState, num_spi, 64),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index bd50a1b079..a8ec615a3f 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -605,7 +605,7 @@ static void arm_gic_common_linux_init(ARMLinuxBootIf *obj,
}
}
-static Property arm_gicv3_common_properties[] = {
+static const Property arm_gicv3_common_properties[] = {
DEFINE_PROP_UINT32("num-cpu", GICv3State, num_cpu, 1),
DEFINE_PROP_UINT32("num-irq", GICv3State, num_irq, 32),
DEFINE_PROP_UINT32("revision", GICv3State, revision, 3),
diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
index bf31158470..f50b1814ea 100644
--- a/hw/intc/arm_gicv3_its.c
+++ b/hw/intc/arm_gicv3_its.c
@@ -2002,7 +2002,7 @@ static void gicv3_its_post_load(GICv3ITSState *s)
}
}
-static Property gicv3_its_props[] = {
+static const Property gicv3_its_props[] = {
DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "arm-gicv3",
GICv3State *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index 35539c099f..68a6144add 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -234,7 +234,7 @@ static void kvm_arm_its_reset_hold(Object *obj, ResetType type)
}
}
-static Property kvm_arm_its_props[] = {
+static const Property kvm_arm_its_props[] = {
DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "kvm-arm-gicv3",
GICv3State *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 98f3cf59bc..6e2803b123 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -2569,7 +2569,7 @@ static const VMStateDescription vmstate_nvic = {
}
};
-static Property props_nvic[] = {
+static const Property props_nvic[] = {
/* Number of external IRQ lines (so excluding the 16 internal exceptions) */
DEFINE_PROP_UINT32("num-irq", NVICState, num_irq, 64),
/*
diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index afecef1e15..221dfa912a 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -325,7 +325,7 @@ static void exynos4210_combiner_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property exynos4210_combiner_properties[] = {
+static const Property exynos4210_combiner_properties[] = {
DEFINE_PROP_UINT32("external", Exynos4210CombinerState, external, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c
index fcca85c6c6..e1b956d990 100644
--- a/hw/intc/exynos4210_gic.c
+++ b/hw/intc/exynos4210_gic.c
@@ -111,7 +111,7 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(sbd, &s->dist_container);
}
-static Property exynos4210_gic_properties[] = {
+static const Property exynos4210_gic_properties[] = {
DEFINE_PROP_UINT32("num-cpu", Exynos4210GicState, num_cpu, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/goldfish_pic.c b/hw/intc/goldfish_pic.c
index 166a3cba1e..f5343c9d2f 100644
--- a/hw/intc/goldfish_pic.c
+++ b/hw/intc/goldfish_pic.c
@@ -181,7 +181,7 @@ static void goldfish_pic_instance_init(Object *obj)
qdev_init_gpio_in(DEVICE(obj), goldfish_irq_request, GOLDFISH_PIC_IRQ_NB);
}
-static Property goldfish_pic_properties[] = {
+static const Property goldfish_pic_properties[] = {
DEFINE_PROP_UINT8("index", GoldfishPICState, idx, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
index 37ac63fd80..bf53251ea2 100644
--- a/hw/intc/grlib_irqmp.c
+++ b/hw/intc/grlib_irqmp.c
@@ -376,7 +376,7 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &irqmp->iomem);
}
-static Property grlib_irqmp_properties[] = {
+static const Property grlib_irqmp_properties[] = {
DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
index d9558e3940..c3174f4fdc 100644
--- a/hw/intc/i8259_common.c
+++ b/hw/intc/i8259_common.c
@@ -193,7 +193,7 @@ static const VMStateDescription vmstate_pic_common = {
}
};
-static Property pic_properties_common[] = {
+static const Property pic_properties_common[] = {
DEFINE_PROP_UINT32("iobase", PICCommonState, iobase, -1),
DEFINE_PROP_UINT32("elcr_addr", PICCommonState, elcr_addr, -1),
DEFINE_PROP_UINT8("elcr_mask", PICCommonState, elcr_mask, -1),
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
index e73c8d4f07..6d566165b0 100644
--- a/hw/intc/ioapic.c
+++ b/hw/intc/ioapic.c
@@ -476,7 +476,7 @@ static void ioapic_unrealize(DeviceState *dev)
timer_free(s->delayed_ioapic_service_timer);
}
-static Property ioapic_properties[] = {
+static const Property ioapic_properties[] = {
DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DEF),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index 97d1af5ccc..dd91f89361 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -423,7 +423,7 @@ static const VMStateDescription vmstate_loongarch_extioi = {
}
};
-static Property extioi_properties[] = {
+static const Property extioi_properties[] = {
DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1),
DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, features,
EXTIOI_HAS_VIRT_EXTENSION, 0),
diff --git a/hw/intc/loongarch_pch_msi.c b/hw/intc/loongarch_pch_msi.c
index ecf3ed0267..e2eca30660 100644
--- a/hw/intc/loongarch_pch_msi.c
+++ b/hw/intc/loongarch_pch_msi.c
@@ -83,7 +83,7 @@ static void loongarch_pch_msi_init(Object *obj)
}
-static Property loongarch_msi_properties[] = {
+static const Property loongarch_msi_properties[] = {
DEFINE_PROP_UINT32("msi_irq_base", LoongArchPCHMSI, irq_base, 0),
DEFINE_PROP_UINT32("msi_irq_num", LoongArchPCHMSI, irq_num, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c
index b958180591..6a87b1aab7 100644
--- a/hw/intc/loongarch_pch_pic.c
+++ b/hw/intc/loongarch_pch_pic.c
@@ -411,7 +411,7 @@ static void loongarch_pch_pic_init(Object *obj)
}
-static Property loongarch_pch_pic_properties[] = {
+static const Property loongarch_pch_pic_properties[] = {
DEFINE_PROP_UINT32("pch_pic_irq_num", LoongArchPCHPIC, irq_num, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/loongson_ipi_common.c b/hw/intc/loongson_ipi_common.c
index a6ce0181f6..d3f894a5bd 100644
--- a/hw/intc/loongson_ipi_common.c
+++ b/hw/intc/loongson_ipi_common.c
@@ -315,7 +315,7 @@ static const VMStateDescription vmstate_loongson_ipi_common = {
}
};
-static Property ipi_common_properties[] = {
+static const Property ipi_common_properties[] = {
DEFINE_PROP_UINT32("num-cpu", LoongsonIPICommonState, num_cpu, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/m68k_irqc.c b/hw/intc/m68k_irqc.c
index b4471e185a..b5d10ab1f6 100644
--- a/hw/intc/m68k_irqc.c
+++ b/hw/intc/m68k_irqc.c
@@ -85,7 +85,7 @@ static const VMStateDescription vmstate_m68k_irqc = {
}
};
-static Property m68k_irqc_properties[] = {
+static const Property m68k_irqc_properties[] = {
DEFINE_PROP_LINK("m68k-cpu", M68KIRQCState, cpu,
TYPE_M68K_CPU, ArchCPU *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c
index 77ba7348a3..996db095c3 100644
--- a/hw/intc/mips_gic.c
+++ b/hw/intc/mips_gic.c
@@ -438,7 +438,7 @@ static void mips_gic_realize(DeviceState *dev, Error **errp)
}
}
-static Property mips_gic_properties[] = {
+static const Property mips_gic_properties[] = {
DEFINE_PROP_UINT32("num-vp", MIPSGICState, num_vps, 1),
DEFINE_PROP_UINT32("num-irq", MIPSGICState, num_irq, 256),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c
index a98358d92e..28606f102b 100644
--- a/hw/intc/omap_intc.c
+++ b/hw/intc/omap_intc.c
@@ -375,7 +375,7 @@ void omap_intc_set_fclk(OMAPIntcState *intc, omap_clk clk)
intc->fclk = clk;
}
-static Property omap_intc_properties[] = {
+static const Property omap_intc_properties[] = {
DEFINE_PROP_UINT32("size", OMAPIntcState, size, 0x100),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c
index 99032ea7f7..8ee1bd64bd 100644
--- a/hw/intc/ompic.c
+++ b/hw/intc/ompic.c
@@ -128,7 +128,7 @@ static void or1k_ompic_realize(DeviceState *dev, Error **errp)
}
}
-static Property or1k_ompic_properties[] = {
+static const Property or1k_ompic_properties[] = {
DEFINE_PROP_UINT32("num-cpus", OR1KOMPICState, num_cpus, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 2ead4b9ba0..2257ae2ee7 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1606,7 +1606,7 @@ static void openpic_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(dev, openpic_set_irq, opp->max_irq);
}
-static Property openpic_properties[] = {
+static const Property openpic_properties[] = {
DEFINE_PROP_UINT32("model", OpenPICState, model, OPENPIC_MODEL_FSL_MPIC_20),
DEFINE_PROP_UINT32("nb_cpus", OpenPICState, nb_cpus, 1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index 838c6b9d99..135fe8301a 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -262,7 +262,7 @@ int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs)
kvm_arch_vcpu_id(cs));
}
-static Property kvm_openpic_properties[] = {
+static const Property kvm_openpic_properties[] = {
DEFINE_PROP_UINT32("model", KVMOpenPICState, model,
OPENPIC_MODEL_FSL_MPIC_20),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
index 5bacbce6a4..581659839b 100644
--- a/hw/intc/pnv_xive.c
+++ b/hw/intc/pnv_xive.c
@@ -2059,7 +2059,7 @@ static int pnv_xive_dt_xscom(PnvXScomInterface *dev, void *fdt,
return 0;
}
-static Property pnv_xive_properties[] = {
+static const Property pnv_xive_properties[] = {
DEFINE_PROP_UINT64("ic-bar", PnvXive, ic_base, 0),
DEFINE_PROP_UINT64("vc-bar", PnvXive, vc_base, 0),
DEFINE_PROP_UINT64("pc-bar", PnvXive, pc_base, 0),
diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c
index 834d32287b..5dd305453a 100644
--- a/hw/intc/pnv_xive2.c
+++ b/hw/intc/pnv_xive2.c
@@ -2354,7 +2354,7 @@ static void pnv_xive2_realize(DeviceState *dev, Error **errp)
qemu_register_reset(pnv_xive2_reset, dev);
}
-static Property pnv_xive2_properties[] = {
+static const Property pnv_xive2_properties[] = {
DEFINE_PROP_UINT64("ic-bar", PnvXive2, ic_base, 0),
DEFINE_PROP_UINT64("esb-bar", PnvXive2, esb_base, 0),
DEFINE_PROP_UINT64("end-bar", PnvXive2, end_base, 0),
diff --git a/hw/intc/ppc-uic.c b/hw/intc/ppc-uic.c
index f2a224f3aa..d683413a83 100644
--- a/hw/intc/ppc-uic.c
+++ b/hw/intc/ppc-uic.c
@@ -259,7 +259,7 @@ static void ppc_uic_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(dev, ppcuic_set_irq, UIC_MAX_IRQ);
}
-static Property ppc_uic_properties[] = {
+static const Property ppc_uic_properties[] = {
DEFINE_PROP_UINT32("dcr-base", PPCUIC, dcr_base, 0xc0),
DEFINE_PROP_BOOL("use-vectors", PPCUIC, use_vectors, true),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c
index e9f0536b1c..db195fb1ff 100644
--- a/hw/intc/riscv_aclint.c
+++ b/hw/intc/riscv_aclint.c
@@ -262,7 +262,7 @@ static const MemoryRegionOps riscv_aclint_mtimer_ops = {
}
};
-static Property riscv_aclint_mtimer_properties[] = {
+static const Property riscv_aclint_mtimer_properties[] = {
DEFINE_PROP_UINT32("hartid-base", RISCVAclintMTimerState,
hartid_base, 0),
DEFINE_PROP_UINT32("num-harts", RISCVAclintMTimerState, num_harts, 1),
@@ -462,7 +462,7 @@ static const MemoryRegionOps riscv_aclint_swi_ops = {
}
};
-static Property riscv_aclint_swi_properties[] = {
+static const Property riscv_aclint_swi_properties[] = {
DEFINE_PROP_UINT32("hartid-base", RISCVAclintSwiState, hartid_base, 0),
DEFINE_PROP_UINT32("num-harts", RISCVAclintSwiState, num_harts, 1),
DEFINE_PROP_UINT32("sswi", RISCVAclintSwiState, sswi, false),
diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
index 4a262c82f0..353eec8136 100644
--- a/hw/intc/riscv_aplic.c
+++ b/hw/intc/riscv_aplic.c
@@ -904,7 +904,7 @@ static void riscv_aplic_realize(DeviceState *dev, Error **errp)
msi_nonbroken = true;
}
-static Property riscv_aplic_properties[] = {
+static const Property riscv_aplic_properties[] = {
DEFINE_PROP_UINT32("aperture-size", RISCVAPLICState, aperture_size, 0),
DEFINE_PROP_UINT32("hartid-base", RISCVAPLICState, hartid_base, 0),
DEFINE_PROP_UINT32("num-harts", RISCVAPLICState, num_harts, 0),
diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c
index 9ef65d4012..adc36151b4 100644
--- a/hw/intc/riscv_imsic.c
+++ b/hw/intc/riscv_imsic.c
@@ -388,7 +388,7 @@ static void riscv_imsic_realize(DeviceState *dev, Error **errp)
msi_nonbroken = true;
}
-static Property riscv_imsic_properties[] = {
+static const Property riscv_imsic_properties[] = {
DEFINE_PROP_BOOL("mmode", RISCVIMSICState, mmode, 0),
DEFINE_PROP_UINT32("hartid", RISCVIMSICState, hartid, 0),
DEFINE_PROP_UINT32("num-pages", RISCVIMSICState, num_pages, 0),
diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c
index b2d4338f61..dfe11ade20 100644
--- a/hw/intc/rx_icu.c
+++ b/hw/intc/rx_icu.c
@@ -361,7 +361,7 @@ static const VMStateDescription vmstate_rxicu = {
}
};
-static Property rxicu_properties[] = {
+static const Property rxicu_properties[] = {
DEFINE_PROP_ARRAY("ipr-map", RXICUState, nr_irqs, map,
qdev_prop_uint8, uint8_t),
DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense,
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index c3d2b8d765..2963bd5bd6 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -445,7 +445,7 @@ static void qemu_s390_flic_instance_init(Object *obj)
}
}
-static Property qemu_s390_flic_properties[] = {
+static const Property qemu_s390_flic_properties[] = {
DEFINE_PROP_BOOL("migrate-all-state", QEMUS390FLICState,
migrate_all_state, true),
DEFINE_PROP_END_OF_LIST(),
@@ -471,7 +471,7 @@ static void qemu_s390_flic_class_init(ObjectClass *oc, void *data)
fsc->inject_crw_mchk = qemu_s390_inject_crw_mchk;
}
-static Property s390_flic_common_properties[] = {
+static const Property s390_flic_common_properties[] = {
DEFINE_PROP_UINT32("adapter_routes_max_batch", S390FLICState,
adapter_routes_max_batch, ADAPTER_ROUTES_MAX_GSI),
DEFINE_PROP_BOOL("migration-enabled", S390FLICState,
diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
index ed74490dba..49895be803 100644
--- a/hw/intc/sifive_plic.c
+++ b/hw/intc/sifive_plic.c
@@ -430,7 +430,7 @@ static const VMStateDescription vmstate_sifive_plic = {
}
};
-static Property sifive_plic_properties[] = {
+static const Property sifive_plic_properties[] = {
DEFINE_PROP_STRING("hart-config", SiFivePLICState, hart_config),
DEFINE_PROP_UINT32("hartid-base", SiFivePLICState, hartid_base, 0),
/* number of interrupt sources including interrupt source 0 */
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
index 283a6b8fd2..09f643d633 100644
--- a/hw/intc/spapr_xive.c
+++ b/hw/intc/spapr_xive.c
@@ -627,7 +627,7 @@ static void spapr_xive_free_irq(SpaprInterruptController *intc, int lisn)
xive->eat[lisn].w &= cpu_to_be64(~EAS_VALID);
}
-static Property spapr_xive_properties[] = {
+static const Property spapr_xive_properties[] = {
DEFINE_PROP_UINT32("nr-irqs", SpaprXive, nr_irqs, 0),
DEFINE_PROP_UINT32("nr-ends", SpaprXive, nr_ends, 0),
DEFINE_PROP_UINT64("vc-base", SpaprXive, vc_base, SPAPR_XIVE_VC_BASE),
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index e893363dc9..81bbfdd84b 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -344,7 +344,7 @@ static void icp_unrealize(DeviceState *dev)
vmstate_unregister(NULL, &vmstate_icp_server, icp);
}
-static Property icp_properties[] = {
+static const Property icp_properties[] = {
DEFINE_PROP_LINK(ICP_PROP_XICS, ICPState, xics, TYPE_XICS_FABRIC,
XICSFabric *),
DEFINE_PROP_LINK(ICP_PROP_CPU, ICPState, cs, TYPE_CPU, CPUState *),
@@ -676,7 +676,7 @@ static const VMStateDescription vmstate_ics = {
},
};
-static Property ics_properties[] = {
+static const Property ics_properties[] = {
DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0),
DEFINE_PROP_LINK(ICS_PROP_XICS, ICSState, xics, TYPE_XICS_FABRIC,
XICSFabric *),
diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
index 6e5012e66e..3e860ab582 100644
--- a/hw/intc/xilinx_intc.c
+++ b/hw/intc/xilinx_intc.c
@@ -176,7 +176,7 @@ static void xilinx_intc_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &p->mmio);
}
-static Property xilinx_intc_properties[] = {
+static const Property xilinx_intc_properties[] = {
DEFINE_PROP_UINT32("kind-of-intr", XpsIntc, c_kind_of_intr, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 245e4d181a..308e5743bd 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -927,7 +927,7 @@ static const VMStateDescription vmstate_xive_tctx = {
},
};
-static Property xive_tctx_properties[] = {
+static const Property xive_tctx_properties[] = {
DEFINE_PROP_LINK("cpu", XiveTCTX, cs, TYPE_CPU, CPUState *),
DEFINE_PROP_LINK("presenter", XiveTCTX, xptr, TYPE_XIVE_PRESENTER,
XivePresenter *),
@@ -1403,7 +1403,7 @@ static const VMStateDescription vmstate_xive_source = {
* The default XIVE interrupt source setting for the ESB MMIOs is two
* 64k pages without Store EOI, to be in sync with KVM.
*/
-static Property xive_source_properties[] = {
+static const Property xive_source_properties[] = {
DEFINE_PROP_UINT64("flags", XiveSource, esb_flags, 0),
DEFINE_PROP_UINT32("nr-irqs", XiveSource, nr_irqs, 0),
DEFINE_PROP_UINT32("shift", XiveSource, esb_shift, XIVE_ESB_64K_2PAGE),
@@ -2002,7 +2002,7 @@ void xive_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
xive_router_end_notify_handler(xrtr, &eas);
}
-static Property xive_router_properties[] = {
+static const Property xive_router_properties[] = {
DEFINE_PROP_LINK("xive-fabric", XiveRouter, xfb,
TYPE_XIVE_FABRIC, XiveFabric *),
DEFINE_PROP_END_OF_LIST(),
@@ -2170,7 +2170,7 @@ static void xive_end_source_realize(DeviceState *dev, Error **errp)
(1ull << (xsrc->esb_shift + 1)) * xsrc->nr_ends);
}
-static Property xive_end_source_properties[] = {
+static const Property xive_end_source_properties[] = {
DEFINE_PROP_UINT32("nr-ends", XiveENDSource, nr_ends, 0),
DEFINE_PROP_UINT32("shift", XiveENDSource, esb_shift, XIVE_ESB_64K),
DEFINE_PROP_LINK("xive", XiveENDSource, xrtr, TYPE_XIVE_ROUTER,
diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c
index d1df35e9b3..3233d3f14e 100644
--- a/hw/intc/xive2.c
+++ b/hw/intc/xive2.c
@@ -1028,7 +1028,7 @@ void xive2_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
xive_get_field64(EAS2_END_DATA, eas.w));
}
-static Property xive2_router_properties[] = {
+static const Property xive2_router_properties[] = {
DEFINE_PROP_LINK("xive-fabric", Xive2Router, xfb,
TYPE_XIVE_FABRIC, XiveFabric *),
DEFINE_PROP_END_OF_LIST(),
@@ -1242,7 +1242,7 @@ static void xive2_end_source_realize(DeviceState *dev, Error **errp)
(1ull << (xsrc->esb_shift + 1)) * xsrc->nr_ends);
}
-static Property xive2_end_source_properties[] = {
+static const Property xive2_end_source_properties[] = {
DEFINE_PROP_UINT32("nr-ends", Xive2EndSource, nr_ends, 0),
DEFINE_PROP_UINT32("shift", Xive2EndSource, esb_shift, XIVE_ESB_64K),
DEFINE_PROP_LINK("xive", Xive2EndSource, xrtr, TYPE_XIVE2_ROUTER,
diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c
index 48cd3ae94b..21b9c83658 100644
--- a/hw/intc/xlnx-pmu-iomod-intc.c
+++ b/hw/intc/xlnx-pmu-iomod-intc.c
@@ -474,7 +474,7 @@ static const MemoryRegionOps xlnx_pmu_io_intc_ops = {
},
};
-static Property xlnx_pmu_io_intc_properties[] = {
+static const Property xlnx_pmu_io_intc_properties[] = {
DEFINE_PROP_UINT32("intc-intr-size", XlnxPMUIOIntc, cfg.intr_size, 0),
DEFINE_PROP_UINT32("intc-level-edge", XlnxPMUIOIntc, cfg.level_edge, 0),
DEFINE_PROP_UINT32("intc-positive", XlnxPMUIOIntc, cfg.positive, 0),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 32/71] hw/intc: Constify all Property
2024-12-13 19:07 ` [PATCH 32/71] hw/intc: " Richard Henderson
@ 2024-12-13 20:41 ` Daniel Henrique Barboza
0 siblings, 0 replies; 124+ messages in thread
From: Daniel Henrique Barboza @ 2024-12-13 20:41 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Michael S. Tsirkin, Paolo Bonzini, Peter Maydell, Igor Mitsyanko,
Laurent Vivier, Clément Chigot, Frederic Konrad, Song Gao,
Bibo Mao, Jiaxun Yang, Huacai Chen, Philippe Mathieu-Daudé,
Jia Liu, Mark Cave-Ayland, Bernhard Beschow,
Frédéric Barrat, Nicholas Piggin, Palmer Dabbelt,
Alistair Francis, Bin Meng, Weiwei Li, Liu Zhiwei, Yoshinori Sato,
Thomas Huth, Halil Pasic, Christian Borntraeger,
David Hildenbrand, Harsh Prateek Bora, Edgar E. Iglesias,
open list:ARM cores, open list:e500, open list:RISC-V TCG CPUs,
open list:S390 general arch...
On 12/13/24 4:07 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
For all riscv controllers, pnv controllers and spapr_xive:
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> hw/intc/apic_common.c | 2 +-
> hw/intc/arm_gic_common.c | 2 +-
> hw/intc/arm_gicv2m.c | 2 +-
> hw/intc/arm_gicv3_common.c | 2 +-
> hw/intc/arm_gicv3_its.c | 2 +-
> hw/intc/arm_gicv3_its_kvm.c | 2 +-
> hw/intc/armv7m_nvic.c | 2 +-
> hw/intc/exynos4210_combiner.c | 2 +-
> hw/intc/exynos4210_gic.c | 2 +-
> hw/intc/goldfish_pic.c | 2 +-
> hw/intc/grlib_irqmp.c | 2 +-
> hw/intc/i8259_common.c | 2 +-
> hw/intc/ioapic.c | 2 +-
> hw/intc/loongarch_extioi.c | 2 +-
> hw/intc/loongarch_pch_msi.c | 2 +-
> hw/intc/loongarch_pch_pic.c | 2 +-
> hw/intc/loongson_ipi_common.c | 2 +-
> hw/intc/m68k_irqc.c | 2 +-
> hw/intc/mips_gic.c | 2 +-
> hw/intc/omap_intc.c | 2 +-
> hw/intc/ompic.c | 2 +-
> hw/intc/openpic.c | 2 +-
> hw/intc/openpic_kvm.c | 2 +-
> hw/intc/pnv_xive.c | 2 +-
> hw/intc/pnv_xive2.c | 2 +-
> hw/intc/ppc-uic.c | 2 +-
> hw/intc/riscv_aclint.c | 4 ++--
> hw/intc/riscv_aplic.c | 2 +-
> hw/intc/riscv_imsic.c | 2 +-
> hw/intc/rx_icu.c | 2 +-
> hw/intc/s390_flic.c | 4 ++--
> hw/intc/sifive_plic.c | 2 +-
> hw/intc/spapr_xive.c | 2 +-
> hw/intc/xics.c | 4 ++--
> hw/intc/xilinx_intc.c | 2 +-
> hw/intc/xive.c | 8 ++++----
> hw/intc/xive2.c | 4 ++--
> hw/intc/xlnx-pmu-iomod-intc.c | 2 +-
> 38 files changed, 45 insertions(+), 45 deletions(-)
>
> diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> index 62f3bbf203..8be9f22de8 100644
> --- a/hw/intc/apic_common.c
> +++ b/hw/intc/apic_common.c
> @@ -408,7 +408,7 @@ static const VMStateDescription vmstate_apic_common = {
> }
> };
>
> -static Property apic_properties_common[] = {
> +static const Property apic_properties_common[] = {
> DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14),
> DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABLE_BIT,
> true),
> diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
> index 53fb2c4e2d..e961cd9156 100644
> --- a/hw/intc/arm_gic_common.c
> +++ b/hw/intc/arm_gic_common.c
> @@ -348,7 +348,7 @@ static void arm_gic_common_linux_init(ARMLinuxBootIf *obj,
> }
> }
>
> -static Property arm_gic_common_properties[] = {
> +static const Property arm_gic_common_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", GICState, num_cpu, 1),
> DEFINE_PROP_UINT32("num-irq", GICState, num_irq, 32),
> /* Revision can be 1 or 2 for GIC architecture specification
> diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
> index d564b857eb..ffa830b433 100644
> --- a/hw/intc/arm_gicv2m.c
> +++ b/hw/intc/arm_gicv2m.c
> @@ -170,7 +170,7 @@ static void gicv2m_init(Object *obj)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property gicv2m_properties[] = {
> +static const Property gicv2m_properties[] = {
> DEFINE_PROP_UINT32("base-spi", ARMGICv2mState, base_spi, 0),
> DEFINE_PROP_UINT32("num-spi", ARMGICv2mState, num_spi, 64),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
> index bd50a1b079..a8ec615a3f 100644
> --- a/hw/intc/arm_gicv3_common.c
> +++ b/hw/intc/arm_gicv3_common.c
> @@ -605,7 +605,7 @@ static void arm_gic_common_linux_init(ARMLinuxBootIf *obj,
> }
> }
>
> -static Property arm_gicv3_common_properties[] = {
> +static const Property arm_gicv3_common_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", GICv3State, num_cpu, 1),
> DEFINE_PROP_UINT32("num-irq", GICv3State, num_irq, 32),
> DEFINE_PROP_UINT32("revision", GICv3State, revision, 3),
> diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
> index bf31158470..f50b1814ea 100644
> --- a/hw/intc/arm_gicv3_its.c
> +++ b/hw/intc/arm_gicv3_its.c
> @@ -2002,7 +2002,7 @@ static void gicv3_its_post_load(GICv3ITSState *s)
> }
> }
>
> -static Property gicv3_its_props[] = {
> +static const Property gicv3_its_props[] = {
> DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "arm-gicv3",
> GICv3State *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
> index 35539c099f..68a6144add 100644
> --- a/hw/intc/arm_gicv3_its_kvm.c
> +++ b/hw/intc/arm_gicv3_its_kvm.c
> @@ -234,7 +234,7 @@ static void kvm_arm_its_reset_hold(Object *obj, ResetType type)
> }
> }
>
> -static Property kvm_arm_its_props[] = {
> +static const Property kvm_arm_its_props[] = {
> DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "kvm-arm-gicv3",
> GICv3State *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
> index 98f3cf59bc..6e2803b123 100644
> --- a/hw/intc/armv7m_nvic.c
> +++ b/hw/intc/armv7m_nvic.c
> @@ -2569,7 +2569,7 @@ static const VMStateDescription vmstate_nvic = {
> }
> };
>
> -static Property props_nvic[] = {
> +static const Property props_nvic[] = {
> /* Number of external IRQ lines (so excluding the 16 internal exceptions) */
> DEFINE_PROP_UINT32("num-irq", NVICState, num_irq, 64),
> /*
> diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
> index afecef1e15..221dfa912a 100644
> --- a/hw/intc/exynos4210_combiner.c
> +++ b/hw/intc/exynos4210_combiner.c
> @@ -325,7 +325,7 @@ static void exynos4210_combiner_init(Object *obj)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property exynos4210_combiner_properties[] = {
> +static const Property exynos4210_combiner_properties[] = {
> DEFINE_PROP_UINT32("external", Exynos4210CombinerState, external, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c
> index fcca85c6c6..e1b956d990 100644
> --- a/hw/intc/exynos4210_gic.c
> +++ b/hw/intc/exynos4210_gic.c
> @@ -111,7 +111,7 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(sbd, &s->dist_container);
> }
>
> -static Property exynos4210_gic_properties[] = {
> +static const Property exynos4210_gic_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", Exynos4210GicState, num_cpu, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/goldfish_pic.c b/hw/intc/goldfish_pic.c
> index 166a3cba1e..f5343c9d2f 100644
> --- a/hw/intc/goldfish_pic.c
> +++ b/hw/intc/goldfish_pic.c
> @@ -181,7 +181,7 @@ static void goldfish_pic_instance_init(Object *obj)
> qdev_init_gpio_in(DEVICE(obj), goldfish_irq_request, GOLDFISH_PIC_IRQ_NB);
> }
>
> -static Property goldfish_pic_properties[] = {
> +static const Property goldfish_pic_properties[] = {
> DEFINE_PROP_UINT8("index", GoldfishPICState, idx, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
> index 37ac63fd80..bf53251ea2 100644
> --- a/hw/intc/grlib_irqmp.c
> +++ b/hw/intc/grlib_irqmp.c
> @@ -376,7 +376,7 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &irqmp->iomem);
> }
>
> -static Property grlib_irqmp_properties[] = {
> +static const Property grlib_irqmp_properties[] = {
> DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
> index d9558e3940..c3174f4fdc 100644
> --- a/hw/intc/i8259_common.c
> +++ b/hw/intc/i8259_common.c
> @@ -193,7 +193,7 @@ static const VMStateDescription vmstate_pic_common = {
> }
> };
>
> -static Property pic_properties_common[] = {
> +static const Property pic_properties_common[] = {
> DEFINE_PROP_UINT32("iobase", PICCommonState, iobase, -1),
> DEFINE_PROP_UINT32("elcr_addr", PICCommonState, elcr_addr, -1),
> DEFINE_PROP_UINT8("elcr_mask", PICCommonState, elcr_mask, -1),
> diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
> index e73c8d4f07..6d566165b0 100644
> --- a/hw/intc/ioapic.c
> +++ b/hw/intc/ioapic.c
> @@ -476,7 +476,7 @@ static void ioapic_unrealize(DeviceState *dev)
> timer_free(s->delayed_ioapic_service_timer);
> }
>
> -static Property ioapic_properties[] = {
> +static const Property ioapic_properties[] = {
> DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DEF),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
> index 97d1af5ccc..dd91f89361 100644
> --- a/hw/intc/loongarch_extioi.c
> +++ b/hw/intc/loongarch_extioi.c
> @@ -423,7 +423,7 @@ static const VMStateDescription vmstate_loongarch_extioi = {
> }
> };
>
> -static Property extioi_properties[] = {
> +static const Property extioi_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1),
> DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, features,
> EXTIOI_HAS_VIRT_EXTENSION, 0),
> diff --git a/hw/intc/loongarch_pch_msi.c b/hw/intc/loongarch_pch_msi.c
> index ecf3ed0267..e2eca30660 100644
> --- a/hw/intc/loongarch_pch_msi.c
> +++ b/hw/intc/loongarch_pch_msi.c
> @@ -83,7 +83,7 @@ static void loongarch_pch_msi_init(Object *obj)
>
> }
>
> -static Property loongarch_msi_properties[] = {
> +static const Property loongarch_msi_properties[] = {
> DEFINE_PROP_UINT32("msi_irq_base", LoongArchPCHMSI, irq_base, 0),
> DEFINE_PROP_UINT32("msi_irq_num", LoongArchPCHMSI, irq_num, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c
> index b958180591..6a87b1aab7 100644
> --- a/hw/intc/loongarch_pch_pic.c
> +++ b/hw/intc/loongarch_pch_pic.c
> @@ -411,7 +411,7 @@ static void loongarch_pch_pic_init(Object *obj)
>
> }
>
> -static Property loongarch_pch_pic_properties[] = {
> +static const Property loongarch_pch_pic_properties[] = {
> DEFINE_PROP_UINT32("pch_pic_irq_num", LoongArchPCHPIC, irq_num, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/loongson_ipi_common.c b/hw/intc/loongson_ipi_common.c
> index a6ce0181f6..d3f894a5bd 100644
> --- a/hw/intc/loongson_ipi_common.c
> +++ b/hw/intc/loongson_ipi_common.c
> @@ -315,7 +315,7 @@ static const VMStateDescription vmstate_loongson_ipi_common = {
> }
> };
>
> -static Property ipi_common_properties[] = {
> +static const Property ipi_common_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", LoongsonIPICommonState, num_cpu, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/m68k_irqc.c b/hw/intc/m68k_irqc.c
> index b4471e185a..b5d10ab1f6 100644
> --- a/hw/intc/m68k_irqc.c
> +++ b/hw/intc/m68k_irqc.c
> @@ -85,7 +85,7 @@ static const VMStateDescription vmstate_m68k_irqc = {
> }
> };
>
> -static Property m68k_irqc_properties[] = {
> +static const Property m68k_irqc_properties[] = {
> DEFINE_PROP_LINK("m68k-cpu", M68KIRQCState, cpu,
> TYPE_M68K_CPU, ArchCPU *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c
> index 77ba7348a3..996db095c3 100644
> --- a/hw/intc/mips_gic.c
> +++ b/hw/intc/mips_gic.c
> @@ -438,7 +438,7 @@ static void mips_gic_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property mips_gic_properties[] = {
> +static const Property mips_gic_properties[] = {
> DEFINE_PROP_UINT32("num-vp", MIPSGICState, num_vps, 1),
> DEFINE_PROP_UINT32("num-irq", MIPSGICState, num_irq, 256),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c
> index a98358d92e..28606f102b 100644
> --- a/hw/intc/omap_intc.c
> +++ b/hw/intc/omap_intc.c
> @@ -375,7 +375,7 @@ void omap_intc_set_fclk(OMAPIntcState *intc, omap_clk clk)
> intc->fclk = clk;
> }
>
> -static Property omap_intc_properties[] = {
> +static const Property omap_intc_properties[] = {
> DEFINE_PROP_UINT32("size", OMAPIntcState, size, 0x100),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c
> index 99032ea7f7..8ee1bd64bd 100644
> --- a/hw/intc/ompic.c
> +++ b/hw/intc/ompic.c
> @@ -128,7 +128,7 @@ static void or1k_ompic_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property or1k_ompic_properties[] = {
> +static const Property or1k_ompic_properties[] = {
> DEFINE_PROP_UINT32("num-cpus", OR1KOMPICState, num_cpus, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
> index 2ead4b9ba0..2257ae2ee7 100644
> --- a/hw/intc/openpic.c
> +++ b/hw/intc/openpic.c
> @@ -1606,7 +1606,7 @@ static void openpic_realize(DeviceState *dev, Error **errp)
> qdev_init_gpio_in(dev, openpic_set_irq, opp->max_irq);
> }
>
> -static Property openpic_properties[] = {
> +static const Property openpic_properties[] = {
> DEFINE_PROP_UINT32("model", OpenPICState, model, OPENPIC_MODEL_FSL_MPIC_20),
> DEFINE_PROP_UINT32("nb_cpus", OpenPICState, nb_cpus, 1),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
> index 838c6b9d99..135fe8301a 100644
> --- a/hw/intc/openpic_kvm.c
> +++ b/hw/intc/openpic_kvm.c
> @@ -262,7 +262,7 @@ int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs)
> kvm_arch_vcpu_id(cs));
> }
>
> -static Property kvm_openpic_properties[] = {
> +static const Property kvm_openpic_properties[] = {
> DEFINE_PROP_UINT32("model", KVMOpenPICState, model,
> OPENPIC_MODEL_FSL_MPIC_20),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
> index 5bacbce6a4..581659839b 100644
> --- a/hw/intc/pnv_xive.c
> +++ b/hw/intc/pnv_xive.c
> @@ -2059,7 +2059,7 @@ static int pnv_xive_dt_xscom(PnvXScomInterface *dev, void *fdt,
> return 0;
> }
>
> -static Property pnv_xive_properties[] = {
> +static const Property pnv_xive_properties[] = {
> DEFINE_PROP_UINT64("ic-bar", PnvXive, ic_base, 0),
> DEFINE_PROP_UINT64("vc-bar", PnvXive, vc_base, 0),
> DEFINE_PROP_UINT64("pc-bar", PnvXive, pc_base, 0),
> diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c
> index 834d32287b..5dd305453a 100644
> --- a/hw/intc/pnv_xive2.c
> +++ b/hw/intc/pnv_xive2.c
> @@ -2354,7 +2354,7 @@ static void pnv_xive2_realize(DeviceState *dev, Error **errp)
> qemu_register_reset(pnv_xive2_reset, dev);
> }
>
> -static Property pnv_xive2_properties[] = {
> +static const Property pnv_xive2_properties[] = {
> DEFINE_PROP_UINT64("ic-bar", PnvXive2, ic_base, 0),
> DEFINE_PROP_UINT64("esb-bar", PnvXive2, esb_base, 0),
> DEFINE_PROP_UINT64("end-bar", PnvXive2, end_base, 0),
> diff --git a/hw/intc/ppc-uic.c b/hw/intc/ppc-uic.c
> index f2a224f3aa..d683413a83 100644
> --- a/hw/intc/ppc-uic.c
> +++ b/hw/intc/ppc-uic.c
> @@ -259,7 +259,7 @@ static void ppc_uic_realize(DeviceState *dev, Error **errp)
> qdev_init_gpio_in(dev, ppcuic_set_irq, UIC_MAX_IRQ);
> }
>
> -static Property ppc_uic_properties[] = {
> +static const Property ppc_uic_properties[] = {
> DEFINE_PROP_UINT32("dcr-base", PPCUIC, dcr_base, 0xc0),
> DEFINE_PROP_BOOL("use-vectors", PPCUIC, use_vectors, true),
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c
> index e9f0536b1c..db195fb1ff 100644
> --- a/hw/intc/riscv_aclint.c
> +++ b/hw/intc/riscv_aclint.c
> @@ -262,7 +262,7 @@ static const MemoryRegionOps riscv_aclint_mtimer_ops = {
> }
> };
>
> -static Property riscv_aclint_mtimer_properties[] = {
> +static const Property riscv_aclint_mtimer_properties[] = {
> DEFINE_PROP_UINT32("hartid-base", RISCVAclintMTimerState,
> hartid_base, 0),
> DEFINE_PROP_UINT32("num-harts", RISCVAclintMTimerState, num_harts, 1),
> @@ -462,7 +462,7 @@ static const MemoryRegionOps riscv_aclint_swi_ops = {
> }
> };
>
> -static Property riscv_aclint_swi_properties[] = {
> +static const Property riscv_aclint_swi_properties[] = {
> DEFINE_PROP_UINT32("hartid-base", RISCVAclintSwiState, hartid_base, 0),
> DEFINE_PROP_UINT32("num-harts", RISCVAclintSwiState, num_harts, 1),
> DEFINE_PROP_UINT32("sswi", RISCVAclintSwiState, sswi, false),
> diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
> index 4a262c82f0..353eec8136 100644
> --- a/hw/intc/riscv_aplic.c
> +++ b/hw/intc/riscv_aplic.c
> @@ -904,7 +904,7 @@ static void riscv_aplic_realize(DeviceState *dev, Error **errp)
> msi_nonbroken = true;
> }
>
> -static Property riscv_aplic_properties[] = {
> +static const Property riscv_aplic_properties[] = {
> DEFINE_PROP_UINT32("aperture-size", RISCVAPLICState, aperture_size, 0),
> DEFINE_PROP_UINT32("hartid-base", RISCVAPLICState, hartid_base, 0),
> DEFINE_PROP_UINT32("num-harts", RISCVAPLICState, num_harts, 0),
> diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c
> index 9ef65d4012..adc36151b4 100644
> --- a/hw/intc/riscv_imsic.c
> +++ b/hw/intc/riscv_imsic.c
> @@ -388,7 +388,7 @@ static void riscv_imsic_realize(DeviceState *dev, Error **errp)
> msi_nonbroken = true;
> }
>
> -static Property riscv_imsic_properties[] = {
> +static const Property riscv_imsic_properties[] = {
> DEFINE_PROP_BOOL("mmode", RISCVIMSICState, mmode, 0),
> DEFINE_PROP_UINT32("hartid", RISCVIMSICState, hartid, 0),
> DEFINE_PROP_UINT32("num-pages", RISCVIMSICState, num_pages, 0),
> diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c
> index b2d4338f61..dfe11ade20 100644
> --- a/hw/intc/rx_icu.c
> +++ b/hw/intc/rx_icu.c
> @@ -361,7 +361,7 @@ static const VMStateDescription vmstate_rxicu = {
> }
> };
>
> -static Property rxicu_properties[] = {
> +static const Property rxicu_properties[] = {
> DEFINE_PROP_ARRAY("ipr-map", RXICUState, nr_irqs, map,
> qdev_prop_uint8, uint8_t),
> DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense,
> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
> index c3d2b8d765..2963bd5bd6 100644
> --- a/hw/intc/s390_flic.c
> +++ b/hw/intc/s390_flic.c
> @@ -445,7 +445,7 @@ static void qemu_s390_flic_instance_init(Object *obj)
> }
> }
>
> -static Property qemu_s390_flic_properties[] = {
> +static const Property qemu_s390_flic_properties[] = {
> DEFINE_PROP_BOOL("migrate-all-state", QEMUS390FLICState,
> migrate_all_state, true),
> DEFINE_PROP_END_OF_LIST(),
> @@ -471,7 +471,7 @@ static void qemu_s390_flic_class_init(ObjectClass *oc, void *data)
> fsc->inject_crw_mchk = qemu_s390_inject_crw_mchk;
> }
>
> -static Property s390_flic_common_properties[] = {
> +static const Property s390_flic_common_properties[] = {
> DEFINE_PROP_UINT32("adapter_routes_max_batch", S390FLICState,
> adapter_routes_max_batch, ADAPTER_ROUTES_MAX_GSI),
> DEFINE_PROP_BOOL("migration-enabled", S390FLICState,
> diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
> index ed74490dba..49895be803 100644
> --- a/hw/intc/sifive_plic.c
> +++ b/hw/intc/sifive_plic.c
> @@ -430,7 +430,7 @@ static const VMStateDescription vmstate_sifive_plic = {
> }
> };
>
> -static Property sifive_plic_properties[] = {
> +static const Property sifive_plic_properties[] = {
> DEFINE_PROP_STRING("hart-config", SiFivePLICState, hart_config),
> DEFINE_PROP_UINT32("hartid-base", SiFivePLICState, hartid_base, 0),
> /* number of interrupt sources including interrupt source 0 */
> diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
> index 283a6b8fd2..09f643d633 100644
> --- a/hw/intc/spapr_xive.c
> +++ b/hw/intc/spapr_xive.c
> @@ -627,7 +627,7 @@ static void spapr_xive_free_irq(SpaprInterruptController *intc, int lisn)
> xive->eat[lisn].w &= cpu_to_be64(~EAS_VALID);
> }
>
> -static Property spapr_xive_properties[] = {
> +static const Property spapr_xive_properties[] = {
> DEFINE_PROP_UINT32("nr-irqs", SpaprXive, nr_irqs, 0),
> DEFINE_PROP_UINT32("nr-ends", SpaprXive, nr_ends, 0),
> DEFINE_PROP_UINT64("vc-base", SpaprXive, vc_base, SPAPR_XIVE_VC_BASE),
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index e893363dc9..81bbfdd84b 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -344,7 +344,7 @@ static void icp_unrealize(DeviceState *dev)
> vmstate_unregister(NULL, &vmstate_icp_server, icp);
> }
>
> -static Property icp_properties[] = {
> +static const Property icp_properties[] = {
> DEFINE_PROP_LINK(ICP_PROP_XICS, ICPState, xics, TYPE_XICS_FABRIC,
> XICSFabric *),
> DEFINE_PROP_LINK(ICP_PROP_CPU, ICPState, cs, TYPE_CPU, CPUState *),
> @@ -676,7 +676,7 @@ static const VMStateDescription vmstate_ics = {
> },
> };
>
> -static Property ics_properties[] = {
> +static const Property ics_properties[] = {
> DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0),
> DEFINE_PROP_LINK(ICS_PROP_XICS, ICSState, xics, TYPE_XICS_FABRIC,
> XICSFabric *),
> diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
> index 6e5012e66e..3e860ab582 100644
> --- a/hw/intc/xilinx_intc.c
> +++ b/hw/intc/xilinx_intc.c
> @@ -176,7 +176,7 @@ static void xilinx_intc_init(Object *obj)
> sysbus_init_mmio(SYS_BUS_DEVICE(obj), &p->mmio);
> }
>
> -static Property xilinx_intc_properties[] = {
> +static const Property xilinx_intc_properties[] = {
> DEFINE_PROP_UINT32("kind-of-intr", XpsIntc, c_kind_of_intr, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/intc/xive.c b/hw/intc/xive.c
> index 245e4d181a..308e5743bd 100644
> --- a/hw/intc/xive.c
> +++ b/hw/intc/xive.c
> @@ -927,7 +927,7 @@ static const VMStateDescription vmstate_xive_tctx = {
> },
> };
>
> -static Property xive_tctx_properties[] = {
> +static const Property xive_tctx_properties[] = {
> DEFINE_PROP_LINK("cpu", XiveTCTX, cs, TYPE_CPU, CPUState *),
> DEFINE_PROP_LINK("presenter", XiveTCTX, xptr, TYPE_XIVE_PRESENTER,
> XivePresenter *),
> @@ -1403,7 +1403,7 @@ static const VMStateDescription vmstate_xive_source = {
> * The default XIVE interrupt source setting for the ESB MMIOs is two
> * 64k pages without Store EOI, to be in sync with KVM.
> */
> -static Property xive_source_properties[] = {
> +static const Property xive_source_properties[] = {
> DEFINE_PROP_UINT64("flags", XiveSource, esb_flags, 0),
> DEFINE_PROP_UINT32("nr-irqs", XiveSource, nr_irqs, 0),
> DEFINE_PROP_UINT32("shift", XiveSource, esb_shift, XIVE_ESB_64K_2PAGE),
> @@ -2002,7 +2002,7 @@ void xive_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
> xive_router_end_notify_handler(xrtr, &eas);
> }
>
> -static Property xive_router_properties[] = {
> +static const Property xive_router_properties[] = {
> DEFINE_PROP_LINK("xive-fabric", XiveRouter, xfb,
> TYPE_XIVE_FABRIC, XiveFabric *),
> DEFINE_PROP_END_OF_LIST(),
> @@ -2170,7 +2170,7 @@ static void xive_end_source_realize(DeviceState *dev, Error **errp)
> (1ull << (xsrc->esb_shift + 1)) * xsrc->nr_ends);
> }
>
> -static Property xive_end_source_properties[] = {
> +static const Property xive_end_source_properties[] = {
> DEFINE_PROP_UINT32("nr-ends", XiveENDSource, nr_ends, 0),
> DEFINE_PROP_UINT32("shift", XiveENDSource, esb_shift, XIVE_ESB_64K),
> DEFINE_PROP_LINK("xive", XiveENDSource, xrtr, TYPE_XIVE_ROUTER,
> diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c
> index d1df35e9b3..3233d3f14e 100644
> --- a/hw/intc/xive2.c
> +++ b/hw/intc/xive2.c
> @@ -1028,7 +1028,7 @@ void xive2_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
> xive_get_field64(EAS2_END_DATA, eas.w));
> }
>
> -static Property xive2_router_properties[] = {
> +static const Property xive2_router_properties[] = {
> DEFINE_PROP_LINK("xive-fabric", Xive2Router, xfb,
> TYPE_XIVE_FABRIC, XiveFabric *),
> DEFINE_PROP_END_OF_LIST(),
> @@ -1242,7 +1242,7 @@ static void xive2_end_source_realize(DeviceState *dev, Error **errp)
> (1ull << (xsrc->esb_shift + 1)) * xsrc->nr_ends);
> }
>
> -static Property xive2_end_source_properties[] = {
> +static const Property xive2_end_source_properties[] = {
> DEFINE_PROP_UINT32("nr-ends", Xive2EndSource, nr_ends, 0),
> DEFINE_PROP_UINT32("shift", Xive2EndSource, esb_shift, XIVE_ESB_64K),
> DEFINE_PROP_LINK("xive", Xive2EndSource, xrtr, TYPE_XIVE2_ROUTER,
> diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c
> index 48cd3ae94b..21b9c83658 100644
> --- a/hw/intc/xlnx-pmu-iomod-intc.c
> +++ b/hw/intc/xlnx-pmu-iomod-intc.c
> @@ -474,7 +474,7 @@ static const MemoryRegionOps xlnx_pmu_io_intc_ops = {
> },
> };
>
> -static Property xlnx_pmu_io_intc_properties[] = {
> +static const Property xlnx_pmu_io_intc_properties[] = {
> DEFINE_PROP_UINT32("intc-intr-size", XlnxPMUIOIntc, cfg.intr_size, 0),
> DEFINE_PROP_UINT32("intc-level-edge", XlnxPMUIOIntc, cfg.level_edge, 0),
> DEFINE_PROP_UINT32("intc-positive", XlnxPMUIOIntc, cfg.positive, 0),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 33/71] hw/ipack: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (35 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 32/71] hw/intc: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 0:05 ` Alberto Garcia
2024-12-13 19:07 ` [PATCH 34/71] hw/ipmi: " Richard Henderson
` (35 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Alberto Garcia
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ipack/ipack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c
index c39dbb481f..7ffc4ffe6f 100644
--- a/hw/ipack/ipack.c
+++ b/hw/ipack/ipack.c
@@ -73,7 +73,7 @@ static void ipack_device_unrealize(DeviceState *dev)
qemu_free_irqs(idev->irq, 2);
}
-static Property ipack_device_props[] = {
+static const Property ipack_device_props[] = {
DEFINE_PROP_INT32("slot", IPackDevice, slot, -1),
DEFINE_PROP_END_OF_LIST()
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 34/71] hw/ipmi: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (36 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 33/71] hw/ipack: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:40 ` Corey Minyard
2024-12-13 19:07 ` [PATCH 35/71] hw/isa: " Richard Henderson
` (34 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Corey Minyard
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ipmi/ipmi.c | 2 +-
hw/ipmi/ipmi_bmc_extern.c | 2 +-
hw/ipmi/ipmi_bmc_sim.c | 2 +-
hw/ipmi/isa_ipmi_bt.c | 2 +-
hw/ipmi/isa_ipmi_kcs.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/ipmi/ipmi.c b/hw/ipmi/ipmi.c
index bbb07b151e..850b3bc463 100644
--- a/hw/ipmi/ipmi.c
+++ b/hw/ipmi/ipmi.c
@@ -108,7 +108,7 @@ void ipmi_bmc_find_and_link(Object *obj, Object **bmc)
OBJ_PROP_LINK_STRONG);
}
-static Property ipmi_bmc_properties[] = {
+static const Property ipmi_bmc_properties[] = {
DEFINE_PROP_UINT8("slave_addr", IPMIBmc, slave_addr, 0x20),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index 29c5af3cc3..cfec1da87c 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -515,7 +515,7 @@ static void ipmi_bmc_extern_finalize(Object *obj)
timer_free(ibe->extern_timer);
}
-static Property ipmi_bmc_extern_properties[] = {
+static const Property ipmi_bmc_extern_properties[] = {
DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
index 33c839c65a..8a55893e89 100644
--- a/hw/ipmi/ipmi_bmc_sim.c
+++ b/hw/ipmi/ipmi_bmc_sim.c
@@ -2191,7 +2191,7 @@ static void ipmi_sim_realize(DeviceState *dev, Error **errp)
vmstate_register(NULL, 0, &vmstate_ipmi_sim, ibs);
}
-static Property ipmi_sim_properties[] = {
+static const Property ipmi_sim_properties[] = {
DEFINE_PROP_UINT16("fruareasize", IPMIBmcSim, fru.areasize, 1024),
DEFINE_PROP_STRING("frudatafile", IPMIBmcSim, fru.filename),
DEFINE_PROP_STRING("sdrfile", IPMIBmcSim, sdr_filename),
diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c
index 7b36d51494..16062abb31 100644
--- a/hw/ipmi/isa_ipmi_bt.c
+++ b/hw/ipmi/isa_ipmi_bt.c
@@ -135,7 +135,7 @@ static void *isa_ipmi_bt_get_backend_data(IPMIInterface *ii)
return &iib->bt;
}
-static Property ipmi_isa_properties[] = {
+static const Property ipmi_isa_properties[] = {
DEFINE_PROP_UINT32("ioport", ISAIPMIBTDevice, bt.io_base, 0xe4),
DEFINE_PROP_INT32("irq", ISAIPMIBTDevice, isairq, 5),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c
index f52b32e590..7e7a37659e 100644
--- a/hw/ipmi/isa_ipmi_kcs.c
+++ b/hw/ipmi/isa_ipmi_kcs.c
@@ -142,7 +142,7 @@ static void *isa_ipmi_kcs_get_backend_data(IPMIInterface *ii)
return &iik->kcs;
}
-static Property ipmi_isa_properties[] = {
+static const Property ipmi_isa_properties[] = {
DEFINE_PROP_UINT32("ioport", ISAIPMIKCSDevice, kcs.io_base, 0xca2),
DEFINE_PROP_INT32("irq", ISAIPMIKCSDevice, isairq, 5),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 34/71] hw/ipmi: Constify all Property
2024-12-13 19:07 ` [PATCH 34/71] hw/ipmi: " Richard Henderson
@ 2024-12-13 19:40 ` Corey Minyard
0 siblings, 0 replies; 124+ messages in thread
From: Corey Minyard @ 2024-12-13 19:40 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Corey Minyard
Acked-by: Corey Minyard <cminyard@mvista.com>
On Fri, Dec 13, 2024 at 01:07:08PM -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/ipmi/ipmi.c | 2 +-
> hw/ipmi/ipmi_bmc_extern.c | 2 +-
> hw/ipmi/ipmi_bmc_sim.c | 2 +-
> hw/ipmi/isa_ipmi_bt.c | 2 +-
> hw/ipmi/isa_ipmi_kcs.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/ipmi/ipmi.c b/hw/ipmi/ipmi.c
> index bbb07b151e..850b3bc463 100644
> --- a/hw/ipmi/ipmi.c
> +++ b/hw/ipmi/ipmi.c
> @@ -108,7 +108,7 @@ void ipmi_bmc_find_and_link(Object *obj, Object **bmc)
> OBJ_PROP_LINK_STRONG);
> }
>
> -static Property ipmi_bmc_properties[] = {
> +static const Property ipmi_bmc_properties[] = {
> DEFINE_PROP_UINT8("slave_addr", IPMIBmc, slave_addr, 0x20),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
> index 29c5af3cc3..cfec1da87c 100644
> --- a/hw/ipmi/ipmi_bmc_extern.c
> +++ b/hw/ipmi/ipmi_bmc_extern.c
> @@ -515,7 +515,7 @@ static void ipmi_bmc_extern_finalize(Object *obj)
> timer_free(ibe->extern_timer);
> }
>
> -static Property ipmi_bmc_extern_properties[] = {
> +static const Property ipmi_bmc_extern_properties[] = {
> DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
> index 33c839c65a..8a55893e89 100644
> --- a/hw/ipmi/ipmi_bmc_sim.c
> +++ b/hw/ipmi/ipmi_bmc_sim.c
> @@ -2191,7 +2191,7 @@ static void ipmi_sim_realize(DeviceState *dev, Error **errp)
> vmstate_register(NULL, 0, &vmstate_ipmi_sim, ibs);
> }
>
> -static Property ipmi_sim_properties[] = {
> +static const Property ipmi_sim_properties[] = {
> DEFINE_PROP_UINT16("fruareasize", IPMIBmcSim, fru.areasize, 1024),
> DEFINE_PROP_STRING("frudatafile", IPMIBmcSim, fru.filename),
> DEFINE_PROP_STRING("sdrfile", IPMIBmcSim, sdr_filename),
> diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c
> index 7b36d51494..16062abb31 100644
> --- a/hw/ipmi/isa_ipmi_bt.c
> +++ b/hw/ipmi/isa_ipmi_bt.c
> @@ -135,7 +135,7 @@ static void *isa_ipmi_bt_get_backend_data(IPMIInterface *ii)
> return &iib->bt;
> }
>
> -static Property ipmi_isa_properties[] = {
> +static const Property ipmi_isa_properties[] = {
> DEFINE_PROP_UINT32("ioport", ISAIPMIBTDevice, bt.io_base, 0xe4),
> DEFINE_PROP_INT32("irq", ISAIPMIBTDevice, isairq, 5),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c
> index f52b32e590..7e7a37659e 100644
> --- a/hw/ipmi/isa_ipmi_kcs.c
> +++ b/hw/ipmi/isa_ipmi_kcs.c
> @@ -142,7 +142,7 @@ static void *isa_ipmi_kcs_get_backend_data(IPMIInterface *ii)
> return &iik->kcs;
> }
>
> -static Property ipmi_isa_properties[] = {
> +static const Property ipmi_isa_properties[] = {
> DEFINE_PROP_UINT32("ioport", ISAIPMIKCSDevice, kcs.io_base, 0xca2),
> DEFINE_PROP_INT32("irq", ISAIPMIKCSDevice, isairq, 5),
> DEFINE_PROP_END_OF_LIST(),
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 35/71] hw/isa: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (37 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 34/71] hw/ipmi: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 22:20 ` Bernhard Beschow
2024-12-13 19:07 ` [PATCH 36/71] hw/m68k: " Richard Henderson
` (33 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Marcel Apfelbaum, Hervé Poussineau,
Philippe Mathieu-Daudé, Aurelien Jarno, open list:PReP
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/isa/lpc_ich9.c | 2 +-
hw/isa/pc87312.c | 2 +-
hw/isa/piix.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index dabd1217dd..378244aa8f 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -826,7 +826,7 @@ static const VMStateDescription vmstate_ich9_lpc = {
}
};
-static Property ich9_lpc_properties[] = {
+static const Property ich9_lpc_properties[] = {
DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, false),
DEFINE_PROP_BOOL("smm-compat", ICH9LPCState, pm.smm_compat, false),
DEFINE_PROP_BOOL("smm-enabled", ICH9LPCState, pm.smm_enabled, false),
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index f67155498d..7bb2af817d 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -327,7 +327,7 @@ static const VMStateDescription vmstate_pc87312 = {
}
};
-static Property pc87312_properties[] = {
+static const Property pc87312_properties[] = {
DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398),
DEFINE_PROP_UINT8("config", PC87312State, config, 1),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/isa/piix.c b/hw/isa/piix.c
index b4a402f61b..8ec9c63b8a 100644
--- a/hw/isa/piix.c
+++ b/hw/isa/piix.c
@@ -408,7 +408,7 @@ static void pci_piix_init(Object *obj)
object_initialize_child(obj, "rtc", &d->rtc, TYPE_MC146818_RTC);
}
-static Property pci_piix_props[] = {
+static const Property pci_piix_props[] = {
DEFINE_PROP_UINT32("smb_io_base", PIIXState, smb_io_base, 0),
DEFINE_PROP_BOOL("has-acpi", PIIXState, has_acpi, true),
DEFINE_PROP_BOOL("has-pic", PIIXState, has_pic, true),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 35/71] hw/isa: Constify all Property
2024-12-13 19:07 ` [PATCH 35/71] hw/isa: " Richard Henderson
@ 2024-12-14 22:20 ` Bernhard Beschow
0 siblings, 0 replies; 124+ messages in thread
From: Bernhard Beschow @ 2024-12-14 22:20 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Michael S. Tsirkin, Marcel Apfelbaum, Hervé Poussineau,
Philippe Mathieu-Daudé, Aurelien Jarno, qemu-ppc
Am 13. Dezember 2024 19:07:09 UTC schrieb Richard Henderson <richard.henderson@linaro.org>:
>Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>---
> hw/isa/lpc_ich9.c | 2 +-
> hw/isa/pc87312.c | 2 +-
> hw/isa/piix.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
>index dabd1217dd..378244aa8f 100644
>--- a/hw/isa/lpc_ich9.c
>+++ b/hw/isa/lpc_ich9.c
>@@ -826,7 +826,7 @@ static const VMStateDescription vmstate_ich9_lpc = {
> }
> };
>
>-static Property ich9_lpc_properties[] = {
>+static const Property ich9_lpc_properties[] = {
> DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, false),
> DEFINE_PROP_BOOL("smm-compat", ICH9LPCState, pm.smm_compat, false),
> DEFINE_PROP_BOOL("smm-enabled", ICH9LPCState, pm.smm_enabled, false),
>diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
>index f67155498d..7bb2af817d 100644
>--- a/hw/isa/pc87312.c
>+++ b/hw/isa/pc87312.c
>@@ -327,7 +327,7 @@ static const VMStateDescription vmstate_pc87312 = {
> }
> };
>
>-static Property pc87312_properties[] = {
>+static const Property pc87312_properties[] = {
> DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398),
> DEFINE_PROP_UINT8("config", PC87312State, config, 1),
> DEFINE_PROP_END_OF_LIST()
>diff --git a/hw/isa/piix.c b/hw/isa/piix.c
>index b4a402f61b..8ec9c63b8a 100644
>--- a/hw/isa/piix.c
>+++ b/hw/isa/piix.c
>@@ -408,7 +408,7 @@ static void pci_piix_init(Object *obj)
> object_initialize_child(obj, "rtc", &d->rtc, TYPE_MC146818_RTC);
> }
>
>-static Property pci_piix_props[] = {
>+static const Property pci_piix_props[] = {
> DEFINE_PROP_UINT32("smb_io_base", PIIXState, smb_io_base, 0),
> DEFINE_PROP_BOOL("has-acpi", PIIXState, has_acpi, true),
> DEFINE_PROP_BOOL("has-pic", PIIXState, has_pic, true),
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 36/71] hw/m68k: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (38 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 35/71] hw/isa: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 20:09 ` Thomas Huth
2024-12-13 19:07 ` [PATCH 37/71] hw/mem: " Richard Henderson
` (32 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth, Laurent Vivier
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/m68k/mcf5206.c | 2 +-
hw/m68k/mcf_intc.c | 2 +-
hw/m68k/next-cube.c | 2 +-
hw/m68k/q800-glue.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
index 7247cdbe5e..45e5f74600 100644
--- a/hw/m68k/mcf5206.c
+++ b/hw/m68k/mcf5206.c
@@ -600,7 +600,7 @@ static void mcf5206_mbar_realize(DeviceState *dev, Error **errp)
s->uart[1] = mcf_uart_create(s->pic[13], serial_hd(1));
}
-static Property mcf5206_mbar_properties[] = {
+static const Property mcf5206_mbar_properties[] = {
DEFINE_PROP_LINK("m68k-cpu", m5206_mbar_state, cpu,
TYPE_M68K_CPU, M68kCPU *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c
index 9fc30b03ba..c24b0b715d 100644
--- a/hw/m68k/mcf_intc.c
+++ b/hw/m68k/mcf_intc.c
@@ -177,7 +177,7 @@ static void mcf_intc_instance_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem);
}
-static Property mcf_intc_properties[] = {
+static const Property mcf_intc_properties[] = {
DEFINE_PROP_LINK("m68k-cpu", mcf_intc_state, cpu,
TYPE_M68K_CPU, M68kCPU *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 08886d432c..a37ce00874 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -914,7 +914,7 @@ static void next_pc_realize(DeviceState *dev, Error **errp)
* this cpu link property and could instead provide outbound IRQ lines
* that the board could wire up to the CPU.
*/
-static Property next_pc_properties[] = {
+static const Property next_pc_properties[] = {
DEFINE_PROP_LINK("cpu", NeXTPC, cpu, TYPE_M68K_CPU, M68kCPU *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/m68k/q800-glue.c b/hw/m68k/q800-glue.c
index e2ae7c3201..0d8cb8b1cb 100644
--- a/hw/m68k/q800-glue.c
+++ b/hw/m68k/q800-glue.c
@@ -203,7 +203,7 @@ static const VMStateDescription vmstate_glue = {
* this cpu link property and could instead provide outbound IRQ lines
* that the board could wire up to the CPU.
*/
-static Property glue_properties[] = {
+static const Property glue_properties[] = {
DEFINE_PROP_LINK("cpu", GLUEState, cpu, TYPE_M68K_CPU, M68kCPU *),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 36/71] hw/m68k: Constify all Property
2024-12-13 19:07 ` [PATCH 36/71] hw/m68k: " Richard Henderson
@ 2024-12-13 20:09 ` Thomas Huth
0 siblings, 0 replies; 124+ messages in thread
From: Thomas Huth @ 2024-12-13 20:09 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Laurent Vivier
Am Fri, 13 Dec 2024 13:07:10 -0600
schrieb Richard Henderson <richard.henderson@linaro.org>:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/m68k/mcf5206.c | 2 +-
> hw/m68k/mcf_intc.c | 2 +-
> hw/m68k/next-cube.c | 2 +-
> hw/m68k/q800-glue.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 37/71] hw/mem: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (39 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 36/71] hw/m68k: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 38/71] hw/mips: " Richard Henderson
` (31 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Jonathan Cameron, Fan Ni, David Hildenbrand, Igor Mammedov,
Xiao Guangrong, Alexander Bulekov, Paolo Bonzini, Bandan Das,
Stefan Hajnoczi, Fabiano Rosas, Darren Kenny, Qiuhao Li
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/mem/cxl_type3.c | 2 +-
hw/mem/nvdimm.c | 2 +-
hw/mem/pc-dimm.c | 2 +-
hw/mem/sparse-mem.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index 5cf754b38f..12205c4d32 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -1216,7 +1216,7 @@ static void ct3d_reset(DeviceState *dev)
}
-static Property ct3_props[] = {
+static const Property ct3_props[] = {
DEFINE_PROP_LINK("memdev", CXLType3Dev, hostmem, TYPE_MEMORY_BACKEND,
HostMemoryBackend *), /* for backward compatibility */
DEFINE_PROP_LINK("persistent-memdev", CXLType3Dev, hostpmem,
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index 1631a7d13f..10506d52e4 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -246,7 +246,7 @@ static void nvdimm_write_label_data(NVDIMMDevice *nvdimm, const void *buf,
memory_region_set_dirty(mr, backend_offset, size);
}
-static Property nvdimm_properties[] = {
+static const Property nvdimm_properties[] = {
DEFINE_PROP_BOOL(NVDIMM_UNARMED_PROP, NVDIMMDevice, unarmed, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 27919ca45d..49c5f9fd44 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -150,7 +150,7 @@ out:
return slot;
}
-static Property pc_dimm_properties[] = {
+static const Property pc_dimm_properties[] = {
DEFINE_PROP_UINT64(PC_DIMM_ADDR_PROP, PCDIMMDevice, addr, 0),
DEFINE_PROP_UINT32(PC_DIMM_NODE_PROP, PCDIMMDevice, node, 0),
DEFINE_PROP_INT32(PC_DIMM_SLOT_PROP, PCDIMMDevice, slot,
diff --git a/hw/mem/sparse-mem.c b/hw/mem/sparse-mem.c
index 6e8f4f84fb..8d681adfc0 100644
--- a/hw/mem/sparse-mem.c
+++ b/hw/mem/sparse-mem.c
@@ -96,7 +96,7 @@ static const MemoryRegionOps sparse_mem_ops = {
},
};
-static Property sparse_mem_properties[] = {
+static const Property sparse_mem_properties[] = {
/* The base address of the memory */
DEFINE_PROP_UINT64("baseaddr", SparseMemState, baseaddr, 0x0),
/* The length of the sparse memory region */
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 38/71] hw/mips: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (40 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 37/71] hw/mem: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 39/71] hw/misc/xlnx-versal-trng: Constify trng_props Richard Henderson
` (30 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Jiaxun Yang
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/mips/cps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mips/cps.c b/hw/mips/cps.c
index 13046628cd..1a2208666c 100644
--- a/hw/mips/cps.c
+++ b/hw/mips/cps.c
@@ -166,7 +166,7 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->gcr), 0));
}
-static Property mips_cps_properties[] = {
+static const Property mips_cps_properties[] = {
DEFINE_PROP_UINT32("num-vp", MIPSCPSState, num_vp, 1),
DEFINE_PROP_UINT32("num-irq", MIPSCPSState, num_irq, 256),
DEFINE_PROP_STRING("cpu-type", MIPSCPSState, cpu_type),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 39/71] hw/misc/xlnx-versal-trng: Constify trng_props
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (41 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 38/71] hw/mips: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 40/71] hw/misc: Constify all Property Richard Henderson
` (29 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Alistair Francis, Edgar E. Iglesias, Peter Maydell,
open list:Xilinx ZynqMP and...
Use DEFINE_PROP_UNSIGNED instead of DEFINE_PROP_UINT64
so that we can set the PropertyInfo during initialization,
instead of updating within trng_class_init.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/misc/xlnx-versal-trng.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c
index 86905479b8..2f6af4f680 100644
--- a/hw/misc/xlnx-versal-trng.c
+++ b/hw/misc/xlnx-versal-trng.c
@@ -660,8 +660,9 @@ static const PropertyInfo trng_prop_fault_events = {
static PropertyInfo trng_prop_uint64; /* to extend qdev_prop_uint64 */
-static Property trng_props[] = {
- DEFINE_PROP_UINT64("forced-prng", XlnxVersalTRng, forced_prng_seed, 0),
+static const Property trng_props[] = {
+ DEFINE_PROP_UNSIGNED("forced-prng", XlnxVersalTRng, forced_prng_seed,
+ 0, trng_prop_uint64, uint64_t),
DEFINE_PROP_UINT32("hw-version", XlnxVersalTRng, hw_version, 0x0200),
DEFINE_PROP("fips-fault-events", XlnxVersalTRng, forced_faults,
trng_prop_fault_events, uint32_t),
@@ -694,7 +695,6 @@ static void trng_class_init(ObjectClass *klass, void *data)
/* Clone uint64 property with set allowed after realized */
trng_prop_uint64 = qdev_prop_uint64;
trng_prop_uint64.realized_set_allowed = true;
- trng_props[0].info = &trng_prop_uint64;
device_class_set_props(dc, trng_props);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 40/71] hw/misc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (42 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 39/71] hw/misc/xlnx-versal-trng: Constify trng_props Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 10:03 ` Cédric Le Goater
2024-12-13 19:07 ` [PATCH 41/71] hw/net: " Richard Henderson
` (28 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Niek Linnenbank, Beniamino Galvani,
Strahinja Jankovic, Cédric Le Goater, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley,
Philippe Mathieu-Daudé, Michael S. Tsirkin, Paolo Bonzini,
Mark Cave-Ayland, Artyom Tarasenko, Ani Sinha, Laurent Vivier,
Subbaraya Sundeep, Tyrone Ting, Hao Wu, Marcel Apfelbaum,
Alistair Francis, Bin Meng, Palmer Dabbelt, Samuel Tardieu,
Francisco Iglesias, Edgar E. Iglesias, open list:ARM cores,
open list:New World (mac99), open list:SiFive Machines
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/misc/a9scu.c | 2 +-
hw/misc/allwinner-h3-dramc.c | 2 +-
hw/misc/allwinner-r40-dramc.c | 2 +-
hw/misc/allwinner-sid.c | 2 +-
hw/misc/applesmc.c | 2 +-
hw/misc/arm11scu.c | 2 +-
hw/misc/arm_l2x0.c | 2 +-
hw/misc/arm_sysctl.c | 2 +-
hw/misc/armsse-cpuid.c | 2 +-
hw/misc/aspeed_hace.c | 2 +-
hw/misc/aspeed_i3c.c | 2 +-
hw/misc/aspeed_lpc.c | 2 +-
hw/misc/aspeed_sbc.c | 2 +-
hw/misc/aspeed_scu.c | 2 +-
hw/misc/aspeed_sdmc.c | 2 +-
hw/misc/bcm2835_cprman.c | 2 +-
hw/misc/bcm2835_property.c | 2 +-
hw/misc/debugexit.c | 2 +-
hw/misc/eccmemctl.c | 2 +-
hw/misc/empty_slot.c | 2 +-
hw/misc/iotkit-secctl.c | 2 +-
hw/misc/iotkit-sysctl.c | 2 +-
hw/misc/iotkit-sysinfo.c | 2 +-
hw/misc/ivshmem.c | 4 ++--
hw/misc/led.c | 2 +-
hw/misc/mac_via.c | 2 +-
hw/misc/macio/cuda.c | 2 +-
hw/misc/macio/macio.c | 4 ++--
hw/misc/macio/pmu.c | 2 +-
hw/misc/mips_cmgcr.c | 2 +-
hw/misc/mips_cpc.c | 2 +-
hw/misc/mips_itu.c | 2 +-
hw/misc/mos6522.c | 2 +-
hw/misc/mps2-fpgaio.c | 2 +-
hw/misc/mps2-scc.c | 2 +-
hw/misc/msf2-sysreg.c | 2 +-
hw/misc/npcm7xx_gcr.c | 2 +-
hw/misc/nrf51_rng.c | 2 +-
hw/misc/pci-testdev.c | 2 +-
hw/misc/pvpanic-isa.c | 2 +-
hw/misc/pvpanic-pci.c | 2 +-
hw/misc/sifive_e_aon.c | 2 +-
hw/misc/sifive_u_otp.c | 2 +-
hw/misc/stm32l4x5_rcc.c | 2 +-
hw/misc/tz-mpc.c | 2 +-
hw/misc/tz-msc.c | 2 +-
hw/misc/tz-ppc.c | 2 +-
hw/misc/unimp.c | 2 +-
hw/misc/xlnx-versal-cframe-reg.c | 4 ++--
hw/misc/xlnx-versal-cfu.c | 4 ++--
hw/misc/xlnx-versal-xramc.c | 2 +-
hw/misc/zynq_slcr.c | 2 +-
52 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c
index a40d5072de..e2d73edde8 100644
--- a/hw/misc/a9scu.c
+++ b/hw/misc/a9scu.c
@@ -123,7 +123,7 @@ static const VMStateDescription vmstate_a9_scu = {
}
};
-static Property a9_scu_properties[] = {
+static const Property a9_scu_properties[] = {
DEFINE_PROP_UINT32("num-cpu", A9SCUState, num_cpu, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c
index eeab0dc5d2..247bf62c43 100644
--- a/hw/misc/allwinner-h3-dramc.c
+++ b/hw/misc/allwinner-h3-dramc.c
@@ -314,7 +314,7 @@ static void allwinner_h3_dramc_init(Object *obj)
sysbus_init_mmio(sbd, &s->dramphy_iomem);
}
-static Property allwinner_h3_dramc_properties[] = {
+static const Property allwinner_h3_dramc_properties[] = {
DEFINE_PROP_UINT64("ram-addr", AwH3DramCtlState, ram_addr, 0x0),
DEFINE_PROP_UINT32("ram-size", AwH3DramCtlState, ram_size, 256 * MiB),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/misc/allwinner-r40-dramc.c b/hw/misc/allwinner-r40-dramc.c
index 3ae4890037..a51284ff91 100644
--- a/hw/misc/allwinner-r40-dramc.c
+++ b/hw/misc/allwinner-r40-dramc.c
@@ -464,7 +464,7 @@ static void allwinner_r40_dramc_init(Object *obj)
sysbus_init_mmio(sbd, &s->dramphy_iomem);
}
-static Property allwinner_r40_dramc_properties[] = {
+static const Property allwinner_r40_dramc_properties[] = {
DEFINE_PROP_UINT64("ram-addr", AwR40DramCtlState, ram_addr, 0x0),
DEFINE_PROP_UINT32("ram-size", AwR40DramCtlState, ram_size, 256), /* MiB */
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/misc/allwinner-sid.c b/hw/misc/allwinner-sid.c
index 19ff17d24a..3a09dca111 100644
--- a/hw/misc/allwinner-sid.c
+++ b/hw/misc/allwinner-sid.c
@@ -127,7 +127,7 @@ static void allwinner_sid_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property allwinner_sid_properties[] = {
+static const Property allwinner_sid_properties[] = {
DEFINE_PROP_UUID_NODEFAULT("identifier", AwSidState, identifier),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index 5b766277d6..9d0e273e33 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -350,7 +350,7 @@ static void applesmc_unrealize(DeviceState *dev)
}
}
-static Property applesmc_isa_properties[] = {
+static const Property applesmc_isa_properties[] = {
DEFINE_PROP_UINT32(APPLESMC_PROP_IO_BASE, AppleSMCState, iobase,
APPLESMC_DEFAULT_IOBASE),
DEFINE_PROP_STRING("osk", AppleSMCState, osk),
diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c
index 17c36a0545..37feed9da7 100644
--- a/hw/misc/arm11scu.c
+++ b/hw/misc/arm11scu.c
@@ -75,7 +75,7 @@ static void arm11_scu_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property arm11_scu_properties[] = {
+static const Property arm11_scu_properties[] = {
DEFINE_PROP_UINT32("num-cpu", ARM11SCUState, num_cpu, 1),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
index 1902ebd3bc..9c209f13b0 100644
--- a/hw/misc/arm_l2x0.c
+++ b/hw/misc/arm_l2x0.c
@@ -173,7 +173,7 @@ static void l2x0_priv_init(Object *obj)
sysbus_init_mmio(dev, &s->iomem);
}
-static Property l2x0_properties[] = {
+static const Property l2x0_properties[] = {
DEFINE_PROP_UINT32("cache-type", L2x0State, cache_type, 0x1c100100),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c
index 9c4dce350a..69e379fa10 100644
--- a/hw/misc/arm_sysctl.c
+++ b/hw/misc/arm_sysctl.c
@@ -623,7 +623,7 @@ static void arm_sysctl_finalize(Object *obj)
g_free(s->db_clock_reset);
}
-static Property arm_sysctl_properties[] = {
+static const Property arm_sysctl_properties[] = {
DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0),
DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0),
/* Daughterboard power supply voltages (as reported via SYS_CFG) */
diff --git a/hw/misc/armsse-cpuid.c b/hw/misc/armsse-cpuid.c
index e785a09051..b05bcdcabc 100644
--- a/hw/misc/armsse-cpuid.c
+++ b/hw/misc/armsse-cpuid.c
@@ -92,7 +92,7 @@ static const MemoryRegionOps armsse_cpuid_ops = {
.valid.max_access_size = 4,
};
-static Property armsse_cpuid_props[] = {
+static const Property armsse_cpuid_props[] = {
DEFINE_PROP_UINT32("CPUID", ARMSSECPUID, cpuid, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c
index bc1d66ad80..5cefbadf9a 100644
--- a/hw/misc/aspeed_hace.c
+++ b/hw/misc/aspeed_hace.c
@@ -436,7 +436,7 @@ static void aspeed_hace_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property aspeed_hace_properties[] = {
+static const Property aspeed_hace_properties[] = {
DEFINE_PROP_LINK("dram", AspeedHACEState, dram_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/aspeed_i3c.c b/hw/misc/aspeed_i3c.c
index 371ee7dba8..7f5a389864 100644
--- a/hw/misc/aspeed_i3c.c
+++ b/hw/misc/aspeed_i3c.c
@@ -323,7 +323,7 @@ static void aspeed_i3c_realize(DeviceState *dev, Error **errp)
}
-static Property aspeed_i3c_device_properties[] = {
+static const Property aspeed_i3c_device_properties[] = {
DEFINE_PROP_UINT8("device-id", AspeedI3CDevice, id, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/aspeed_lpc.c b/hw/misc/aspeed_lpc.c
index f2d4ca6f43..bb9066b0f0 100644
--- a/hw/misc/aspeed_lpc.c
+++ b/hw/misc/aspeed_lpc.c
@@ -454,7 +454,7 @@ static const VMStateDescription vmstate_aspeed_lpc = {
}
};
-static Property aspeed_lpc_properties[] = {
+static const Property aspeed_lpc_properties[] = {
DEFINE_PROP_UINT32("hicr7", AspeedLPCState, hicr7, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c
index f5eb2a0e37..b97cf51fa1 100644
--- a/hw/misc/aspeed_sbc.c
+++ b/hw/misc/aspeed_sbc.c
@@ -136,7 +136,7 @@ static const VMStateDescription vmstate_aspeed_sbc = {
}
};
-static Property aspeed_sbc_properties[] = {
+static const Property aspeed_sbc_properties[] = {
DEFINE_PROP_BOOL("emmc-abr", AspeedSBCState, emmc_abr, 0),
DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_settings, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
index 2c919349cf..ac33b8d6cb 100644
--- a/hw/misc/aspeed_scu.c
+++ b/hw/misc/aspeed_scu.c
@@ -602,7 +602,7 @@ static const VMStateDescription vmstate_aspeed_scu = {
}
};
-static Property aspeed_scu_properties[] = {
+static const Property aspeed_scu_properties[] = {
DEFINE_PROP_UINT32("silicon-rev", AspeedSCUState, silicon_rev, 0),
DEFINE_PROP_UINT32("hw-strap1", AspeedSCUState, hw_strap1, 0),
DEFINE_PROP_UINT32("hw-strap2", AspeedSCUState, hw_strap2, 0),
diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
index 4bc9faf691..4980080f74 100644
--- a/hw/misc/aspeed_sdmc.c
+++ b/hw/misc/aspeed_sdmc.c
@@ -294,7 +294,7 @@ static const VMStateDescription vmstate_aspeed_sdmc = {
}
};
-static Property aspeed_sdmc_properties[] = {
+static const Property aspeed_sdmc_properties[] = {
DEFINE_PROP_UINT64("max-ram-size", AspeedSDMCState, max_ram_size, 0),
DEFINE_PROP_BOOL("unlocked", AspeedSDMCState, unlocked, false),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c
index 63e1045abf..1a20cd0bc8 100644
--- a/hw/misc/bcm2835_cprman.c
+++ b/hw/misc/bcm2835_cprman.c
@@ -778,7 +778,7 @@ static const VMStateDescription cprman_vmstate = {
}
};
-static Property cprman_properties[] = {
+static const Property cprman_properties[] = {
DEFINE_PROP_UINT32("xosc-freq-hz", BCM2835CprmanState, xosc_freq, 19200000),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
index 8ca3128f29..09a6f2c6e3 100644
--- a/hw/misc/bcm2835_property.c
+++ b/hw/misc/bcm2835_property.c
@@ -551,7 +551,7 @@ static void bcm2835_property_realize(DeviceState *dev, Error **errp)
bcm2835_property_reset(dev);
}
-static Property bcm2835_property_props[] = {
+static const Property bcm2835_property_props[] = {
DEFINE_PROP_UINT32("board-rev", BCM2835PropertyState, board_rev, 0),
DEFINE_PROP_STRING("command-line", BCM2835PropertyState, command_line),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c
index c5c562fd93..639a8cc3e3 100644
--- a/hw/misc/debugexit.c
+++ b/hw/misc/debugexit.c
@@ -56,7 +56,7 @@ static void debug_exit_realizefn(DeviceState *d, Error **errp)
isa->iobase, &isa->io);
}
-static Property debug_exit_properties[] = {
+static const Property debug_exit_properties[] = {
DEFINE_PROP_UINT32("iobase", ISADebugExitState, iobase, 0x501),
DEFINE_PROP_UINT32("iosize", ISADebugExitState, iosize, 0x02),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/eccmemctl.c b/hw/misc/eccmemctl.c
index 0f68fbe1b6..4fc88bd4e5 100644
--- a/hw/misc/eccmemctl.c
+++ b/hw/misc/eccmemctl.c
@@ -325,7 +325,7 @@ static void ecc_realize(DeviceState *dev, Error **errp)
}
}
-static Property ecc_properties[] = {
+static const Property ecc_properties[] = {
DEFINE_PROP_UINT32("version", ECCState, version, -1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/empty_slot.c b/hw/misc/empty_slot.c
index 37b0ddfb02..79572c5be0 100644
--- a/hw/misc/empty_slot.c
+++ b/hw/misc/empty_slot.c
@@ -79,7 +79,7 @@ static void empty_slot_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
}
-static Property empty_slot_properties[] = {
+static const Property empty_slot_properties[] = {
DEFINE_PROP_UINT64("size", EmptySlot, size, 0),
DEFINE_PROP_STRING("name", EmptySlot, name),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/iotkit-secctl.c b/hw/misc/iotkit-secctl.c
index 6e22f2aad6..abb6a963ca 100644
--- a/hw/misc/iotkit-secctl.c
+++ b/hw/misc/iotkit-secctl.c
@@ -814,7 +814,7 @@ static const VMStateDescription iotkit_secctl_vmstate = {
},
};
-static Property iotkit_secctl_props[] = {
+static const Property iotkit_secctl_props[] = {
DEFINE_PROP_UINT32("sse-version", IoTKitSecCtl, sse_version, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/iotkit-sysctl.c b/hw/misc/iotkit-sysctl.c
index c1b357e6b7..23b49d7dff 100644
--- a/hw/misc/iotkit-sysctl.c
+++ b/hw/misc/iotkit-sysctl.c
@@ -835,7 +835,7 @@ static const VMStateDescription iotkit_sysctl_vmstate = {
}
};
-static Property iotkit_sysctl_props[] = {
+static const Property iotkit_sysctl_props[] = {
DEFINE_PROP_UINT32("sse-version", IoTKitSysCtl, sse_version, 0),
DEFINE_PROP_UINT32("CPUWAIT_RST", IoTKitSysCtl, cpuwait_rst, 0),
DEFINE_PROP_UINT32("INITSVTOR0_RST", IoTKitSysCtl, initsvtor0_rst,
diff --git a/hw/misc/iotkit-sysinfo.c b/hw/misc/iotkit-sysinfo.c
index aaa9305b2e..7d4eea6bfb 100644
--- a/hw/misc/iotkit-sysinfo.c
+++ b/hw/misc/iotkit-sysinfo.c
@@ -131,7 +131,7 @@ static const MemoryRegionOps iotkit_sysinfo_ops = {
.valid.max_access_size = 4,
};
-static Property iotkit_sysinfo_props[] = {
+static const Property iotkit_sysinfo_props[] = {
DEFINE_PROP_UINT32("SYS_VERSION", IoTKitSysInfo, sys_version, 0),
DEFINE_PROP_UINT32("SYS_CONFIG", IoTKitSysInfo, sys_config, 0),
DEFINE_PROP_UINT32("sse-version", IoTKitSysInfo, sse_version, 0),
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 5ce3fc0949..6d735ec29f 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -1022,7 +1022,7 @@ static const VMStateDescription ivshmem_plain_vmsd = {
},
};
-static Property ivshmem_plain_properties[] = {
+static const Property ivshmem_plain_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
DEFINE_PROP_LINK("memdev", IVShmemState, hostmem, TYPE_MEMORY_BACKEND,
HostMemoryBackend *),
@@ -1077,7 +1077,7 @@ static const VMStateDescription ivshmem_doorbell_vmsd = {
},
};
-static Property ivshmem_doorbell_properties[] = {
+static const Property ivshmem_doorbell_properties[] = {
DEFINE_PROP_CHR("chardev", IVShmemState, server_chr),
DEFINE_PROP_UINT32("vectors", IVShmemState, vectors, 1),
DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD,
diff --git a/hw/misc/led.c b/hw/misc/led.c
index 4bb6ce8d29..76efdbc3f1 100644
--- a/hw/misc/led.c
+++ b/hw/misc/led.c
@@ -101,7 +101,7 @@ static void led_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(DEVICE(s), led_set_state_gpio_handler, 1);
}
-static Property led_properties[] = {
+static const Property led_properties[] = {
DEFINE_PROP_STRING("color", LEDState, color),
DEFINE_PROP_STRING("description", LEDState, description),
DEFINE_PROP_BOOL("gpio-active-high", LEDState, gpio_active_high, true),
diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c
index af2b2b1af3..a376a2b8a0 100644
--- a/hw/misc/mac_via.c
+++ b/hw/misc/mac_via.c
@@ -1322,7 +1322,7 @@ static const VMStateDescription vmstate_q800_via1 = {
}
};
-static Property mos6522_q800_via1_properties[] = {
+static const Property mos6522_q800_via1_properties[] = {
DEFINE_PROP_DRIVE("drive", MOS6522Q800VIA1State, blk),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index 1db7ebf3e2..cfc8afd1dc 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -554,7 +554,7 @@ static void cuda_init(Object *obj)
DEVICE(obj), "adb.0");
}
-static Property cuda_properties[] = {
+static const Property cuda_properties[] = {
DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 3f449f91c0..7e3d5aa977 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -405,7 +405,7 @@ static const VMStateDescription vmstate_macio_newworld = {
}
};
-static Property macio_newworld_properties[] = {
+static const Property macio_newworld_properties[] = {
DEFINE_PROP_BOOL("has-pmu", NewWorldMacIOState, has_pmu, false),
DEFINE_PROP_BOOL("has-adb", NewWorldMacIOState, has_adb, false),
DEFINE_PROP_END_OF_LIST()
@@ -422,7 +422,7 @@ static void macio_newworld_class_init(ObjectClass *oc, void *data)
device_class_set_props(dc, macio_newworld_properties);
}
-static Property macio_properties[] = {
+static const Property macio_properties[] = {
DEFINE_PROP_UINT64("frequency", MacIOState, frequency, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
index 4b451e0af3..64bf44f67f 100644
--- a/hw/misc/macio/pmu.c
+++ b/hw/misc/macio/pmu.c
@@ -760,7 +760,7 @@ static void pmu_init(Object *obj)
sysbus_init_mmio(d, &s->mem);
}
-static Property pmu_properties[] = {
+static const Property pmu_properties[] = {
DEFINE_PROP_BOOL("has-adb", PMUState, has_adb, true),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c
index 04256aacdc..80ca224f76 100644
--- a/hw/misc/mips_cmgcr.c
+++ b/hw/misc/mips_cmgcr.c
@@ -211,7 +211,7 @@ static const VMStateDescription vmstate_mips_gcr = {
},
};
-static Property mips_gcr_properties[] = {
+static const Property mips_gcr_properties[] = {
DEFINE_PROP_UINT32("num-vp", MIPSGCRState, num_vps, 1),
DEFINE_PROP_INT32("gcr-rev", MIPSGCRState, gcr_rev, 0x800),
DEFINE_PROP_UINT64("gcr-base", MIPSGCRState, gcr_base, GCR_BASE_ADDR),
diff --git a/hw/misc/mips_cpc.c b/hw/misc/mips_cpc.c
index 2f7fb8167f..86ff0f7ad8 100644
--- a/hw/misc/mips_cpc.c
+++ b/hw/misc/mips_cpc.c
@@ -163,7 +163,7 @@ static const VMStateDescription vmstate_mips_cpc = {
},
};
-static Property mips_cpc_properties[] = {
+static const Property mips_cpc_properties[] = {
DEFINE_PROP_UINT32("num-vp", MIPSCPCState, num_vp, 0x1),
DEFINE_PROP_UINT64("vp-start-running", MIPSCPCState, vp_start_running, 0x1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
index c5214c8b30..d84a7dbf15 100644
--- a/hw/misc/mips_itu.c
+++ b/hw/misc/mips_itu.c
@@ -533,7 +533,7 @@ static void mips_itu_reset(DeviceState *dev)
itc_reset_cells(s);
}
-static Property mips_itu_properties[] = {
+static const Property mips_itu_properties[] = {
DEFINE_PROP_UINT32("num-fifo", MIPSITUState, num_fifo,
ITC_FIFO_NUM_MAX),
DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores,
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 515f62e687..0225a5869b 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -696,7 +696,7 @@ static void mos6522_finalize(Object *obj)
timer_free(s->timers[1].timer);
}
-static Property mos6522_properties[] = {
+static const Property mos6522_properties[] = {
DEFINE_PROP_UINT64("frequency", MOS6522State, frequency, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/misc/mps2-fpgaio.c b/hw/misc/mps2-fpgaio.c
index 20359254ba..2e8d1c721c 100644
--- a/hw/misc/mps2-fpgaio.c
+++ b/hw/misc/mps2-fpgaio.c
@@ -319,7 +319,7 @@ static const VMStateDescription mps2_fpgaio_vmstate = {
},
};
-static Property mps2_fpgaio_properties[] = {
+static const Property mps2_fpgaio_properties[] = {
/* Frequency of the prescale counter */
DEFINE_PROP_UINT32("prescale-clk", MPS2FPGAIO, prescale_clk, 20000000),
/* Number of LEDs controlled by LED0 register */
diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c
index d45ff77bd6..f378b75571 100644
--- a/hw/misc/mps2-scc.c
+++ b/hw/misc/mps2-scc.c
@@ -456,7 +456,7 @@ static const VMStateDescription mps2_scc_vmstate = {
}
};
-static Property mps2_scc_properties[] = {
+static const Property mps2_scc_properties[] = {
/* Values for various read-only ID registers (which are specific
* to the board model or FPGA image)
*/
diff --git a/hw/misc/msf2-sysreg.c b/hw/misc/msf2-sysreg.c
index b8dde198c6..0d7a713c76 100644
--- a/hw/misc/msf2-sysreg.c
+++ b/hw/misc/msf2-sysreg.c
@@ -118,7 +118,7 @@ static const VMStateDescription vmstate_msf2_sysreg = {
}
};
-static Property msf2_sysreg_properties[] = {
+static const Property msf2_sysreg_properties[] = {
/* default divisors in Libero GUI */
DEFINE_PROP_UINT8("apb0divisor", MSF2SysregState, apb0div, 2),
DEFINE_PROP_UINT8("apb1divisor", MSF2SysregState, apb1div, 2),
diff --git a/hw/misc/npcm7xx_gcr.c b/hw/misc/npcm7xx_gcr.c
index c4c4e246d7..17aeaf22cb 100644
--- a/hw/misc/npcm7xx_gcr.c
+++ b/hw/misc/npcm7xx_gcr.c
@@ -229,7 +229,7 @@ static const VMStateDescription vmstate_npcm7xx_gcr = {
},
};
-static Property npcm7xx_gcr_properties[] = {
+static const Property npcm7xx_gcr_properties[] = {
DEFINE_PROP_UINT32("disabled-modules", NPCM7xxGCRState, reset_mdlr, 0),
DEFINE_PROP_UINT32("power-on-straps", NPCM7xxGCRState, reset_pwron, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/nrf51_rng.c b/hw/misc/nrf51_rng.c
index 2d67f3f766..2b550a6bca 100644
--- a/hw/misc/nrf51_rng.c
+++ b/hw/misc/nrf51_rng.c
@@ -219,7 +219,7 @@ static void nrf51_rng_reset(DeviceState *dev)
}
-static Property nrf51_rng_properties[] = {
+static const Property nrf51_rng_properties[] = {
DEFINE_PROP_UINT16("period_unfiltered_us", NRF51RNGState,
period_unfiltered_us, 167),
DEFINE_PROP_UINT16("period_filtered_us", NRF51RNGState,
diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
index 0b5f236a20..7927397a23 100644
--- a/hw/misc/pci-testdev.c
+++ b/hw/misc/pci-testdev.c
@@ -319,7 +319,7 @@ static void qdev_pci_testdev_reset(DeviceState *dev)
pci_testdev_reset(d);
}
-static Property pci_testdev_properties[] = {
+static const Property pci_testdev_properties[] = {
DEFINE_PROP_SIZE("membar", PCITestDevState, membar_size, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c
index 9a923b7869..824a2e4528 100644
--- a/hw/misc/pvpanic-isa.c
+++ b/hw/misc/pvpanic-isa.c
@@ -98,7 +98,7 @@ static void build_pvpanic_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
aml_append(scope, dev);
}
-static Property pvpanic_isa_properties[] = {
+static const Property pvpanic_isa_properties[] = {
DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505),
DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events,
PVPANIC_EVENTS),
diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c
index 106d03ccd6..1c3eafc137 100644
--- a/hw/misc/pvpanic-pci.c
+++ b/hw/misc/pvpanic-pci.c
@@ -53,7 +53,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &ps->mr);
}
-static Property pvpanic_pci_properties[] = {
+static const Property pvpanic_pci_properties[] = {
DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events,
PVPANIC_EVENTS),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/sifive_e_aon.c b/hw/misc/sifive_e_aon.c
index f819fc10e6..c48429b131 100644
--- a/hw/misc/sifive_e_aon.c
+++ b/hw/misc/sifive_e_aon.c
@@ -289,7 +289,7 @@ static void sifive_e_aon_init(Object *obj)
sysbus_init_irq(sbd, &r->wdog_irq);
}
-static Property sifive_e_aon_properties[] = {
+static const Property sifive_e_aon_properties[] = {
DEFINE_PROP_UINT64("wdogclk-frequency", SiFiveEAONState, wdogclk_freq,
SIFIVE_E_LFCLK_DEFAULT_FREQ),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
index 8965f5c22a..32cd8e8dfb 100644
--- a/hw/misc/sifive_u_otp.c
+++ b/hw/misc/sifive_u_otp.c
@@ -194,7 +194,7 @@ static const MemoryRegionOps sifive_u_otp_ops = {
}
};
-static Property sifive_u_otp_properties[] = {
+static const Property sifive_u_otp_properties[] = {
DEFINE_PROP_UINT32("serial", SiFiveUOTPState, serial, 0),
DEFINE_PROP_DRIVE("drive", SiFiveUOTPState, blk),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/stm32l4x5_rcc.c b/hw/misc/stm32l4x5_rcc.c
index 59d428fa66..b61241d195 100644
--- a/hw/misc/stm32l4x5_rcc.c
+++ b/hw/misc/stm32l4x5_rcc.c
@@ -1426,7 +1426,7 @@ static void stm32l4x5_rcc_realize(DeviceState *dev, Error **errp)
clock_update(s->gnd, 0);
}
-static Property stm32l4x5_rcc_properties[] = {
+static const Property stm32l4x5_rcc_properties[] = {
DEFINE_PROP_UINT64("hse_frequency", Stm32l4x5RccState,
hse_frequency, HSE_DEFAULT_FRQ),
DEFINE_PROP_UINT64("sai1_extclk_frequency", Stm32l4x5RccState,
diff --git a/hw/misc/tz-mpc.c b/hw/misc/tz-mpc.c
index 66a46a7b9f..b06eb9f119 100644
--- a/hw/misc/tz-mpc.c
+++ b/hw/misc/tz-mpc.c
@@ -587,7 +587,7 @@ static const VMStateDescription tz_mpc_vmstate = {
}
};
-static Property tz_mpc_properties[] = {
+static const Property tz_mpc_properties[] = {
DEFINE_PROP_LINK("downstream", TZMPC, downstream,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/tz-msc.c b/hw/misc/tz-msc.c
index 82ccaa014a..96413a502d 100644
--- a/hw/misc/tz-msc.c
+++ b/hw/misc/tz-msc.c
@@ -278,7 +278,7 @@ static const VMStateDescription tz_msc_vmstate = {
}
};
-static Property tz_msc_properties[] = {
+static const Property tz_msc_properties[] = {
DEFINE_PROP_LINK("downstream", TZMSC, downstream,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_LINK("idau", TZMSC, idau,
diff --git a/hw/misc/tz-ppc.c b/hw/misc/tz-ppc.c
index 922dcf7f63..1943d8d165 100644
--- a/hw/misc/tz-ppc.c
+++ b/hw/misc/tz-ppc.c
@@ -305,7 +305,7 @@ static const VMStateDescription tz_ppc_vmstate = {
DEFINE_PROP_LINK("port[" #N "]", TZPPC, port[N].downstream, \
TYPE_MEMORY_REGION, MemoryRegion *)
-static Property tz_ppc_properties[] = {
+static const Property tz_ppc_properties[] = {
DEFINE_PROP_UINT32("NONSEC_MASK", TZPPC, nonsec_mask, 0),
DEFINE_PORT(0),
DEFINE_PORT(1),
diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c
index 6cfc5727f0..62e1153627 100644
--- a/hw/misc/unimp.c
+++ b/hw/misc/unimp.c
@@ -70,7 +70,7 @@ static void unimp_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->iomem);
}
-static Property unimp_properties[] = {
+static const Property unimp_properties[] = {
DEFINE_PROP_UINT64("size", UnimplementedDeviceState, size, 0),
DEFINE_PROP_STRING("name", UnimplementedDeviceState, name),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/xlnx-versal-cframe-reg.c b/hw/misc/xlnx-versal-cframe-reg.c
index 3fc838bd54..8281a9baff 100644
--- a/hw/misc/xlnx-versal-cframe-reg.c
+++ b/hw/misc/xlnx-versal-cframe-reg.c
@@ -720,7 +720,7 @@ static const VMStateDescription vmstate_cframe_reg = {
}
};
-static Property cframe_regs_props[] = {
+static const Property cframe_regs_props[] = {
DEFINE_PROP_LINK("cfu-fdro", XlnxVersalCFrameReg, cfg.cfu_fdro,
TYPE_XLNX_CFI_IF, XlnxCfiIf *),
DEFINE_PROP_UINT32("blktype0-frames", XlnxVersalCFrameReg,
@@ -771,7 +771,7 @@ static const VMStateDescription vmstate_cframe_bcast_reg = {
}
};
-static Property cframe_bcast_regs_props[] = {
+static const Property cframe_bcast_regs_props[] = {
DEFINE_PROP_LINK("cframe0", XlnxVersalCFrameBcastReg, cfg.cframe[0],
TYPE_XLNX_CFI_IF, XlnxCfiIf *),
DEFINE_PROP_LINK("cframe1", XlnxVersalCFrameBcastReg, cfg.cframe[1],
diff --git a/hw/misc/xlnx-versal-cfu.c b/hw/misc/xlnx-versal-cfu.c
index 94f85814c8..7cfdabdb8e 100644
--- a/hw/misc/xlnx-versal-cfu.c
+++ b/hw/misc/xlnx-versal-cfu.c
@@ -426,7 +426,7 @@ static void cfu_fdro_cfi_transfer_packet(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt)
}
}
-static Property cfu_props[] = {
+static const Property cfu_props[] = {
DEFINE_PROP_LINK("cframe0", XlnxVersalCFUAPB, cfg.cframe[0],
TYPE_XLNX_CFI_IF, XlnxCfiIf *),
DEFINE_PROP_LINK("cframe1", XlnxVersalCFUAPB, cfg.cframe[1],
@@ -460,7 +460,7 @@ static Property cfu_props[] = {
DEFINE_PROP_END_OF_LIST(),
};
-static Property cfu_sfr_props[] = {
+static const Property cfu_sfr_props[] = {
DEFINE_PROP_LINK("cfu", XlnxVersalCFUSFR, cfg.cfu,
TYPE_XLNX_VERSAL_CFU_APB, XlnxVersalCFUAPB *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/misc/xlnx-versal-xramc.c b/hw/misc/xlnx-versal-xramc.c
index ad839ce7e9..a06b9fbc05 100644
--- a/hw/misc/xlnx-versal-xramc.c
+++ b/hw/misc/xlnx-versal-xramc.c
@@ -218,7 +218,7 @@ static const VMStateDescription vmstate_xram_ctrl = {
}
};
-static Property xram_ctrl_properties[] = {
+static const Property xram_ctrl_properties[] = {
DEFINE_PROP_UINT64("size", XlnxXramCtrl, cfg.size, 1 * MiB),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
index ad814c3a79..ffa14ecb84 100644
--- a/hw/misc/zynq_slcr.c
+++ b/hw/misc/zynq_slcr.c
@@ -623,7 +623,7 @@ static const VMStateDescription vmstate_zynq_slcr = {
}
};
-static Property zynq_slcr_props[] = {
+static const Property zynq_slcr_props[] = {
DEFINE_PROP_UINT8("boot-mode", ZynqSLCRState, boot_mode, 1),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 40/71] hw/misc: Constify all Property
2024-12-13 19:07 ` [PATCH 40/71] hw/misc: Constify all Property Richard Henderson
@ 2024-12-14 10:03 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:03 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Niek Linnenbank, Beniamino Galvani,
Strahinja Jankovic, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Philippe Mathieu-Daudé,
Michael S. Tsirkin, Paolo Bonzini, Mark Cave-Ayland,
Artyom Tarasenko, Ani Sinha, Laurent Vivier, Subbaraya Sundeep,
Tyrone Ting, Hao Wu, Marcel Apfelbaum, Alistair Francis, Bin Meng,
Palmer Dabbelt, Samuel Tardieu, Francisco Iglesias,
Edgar E. Iglesias, open list:ARM cores,
open list:New World (mac99), open list:SiFive Machines
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/misc/a9scu.c | 2 +-
> hw/misc/allwinner-h3-dramc.c | 2 +-
> hw/misc/allwinner-r40-dramc.c | 2 +-
> hw/misc/allwinner-sid.c | 2 +-
> hw/misc/applesmc.c | 2 +-
> hw/misc/arm11scu.c | 2 +-
> hw/misc/arm_l2x0.c | 2 +-
> hw/misc/arm_sysctl.c | 2 +-
> hw/misc/armsse-cpuid.c | 2 +-
> hw/misc/aspeed_hace.c | 2 +-
> hw/misc/aspeed_i3c.c | 2 +-
> hw/misc/aspeed_lpc.c | 2 +-
> hw/misc/aspeed_sbc.c | 2 +-
> hw/misc/aspeed_scu.c | 2 +-
> hw/misc/aspeed_sdmc.c | 2 +-
> hw/misc/bcm2835_cprman.c | 2 +-
> hw/misc/bcm2835_property.c | 2 +-
> hw/misc/debugexit.c | 2 +-
> hw/misc/eccmemctl.c | 2 +-
> hw/misc/empty_slot.c | 2 +-
> hw/misc/iotkit-secctl.c | 2 +-
> hw/misc/iotkit-sysctl.c | 2 +-
> hw/misc/iotkit-sysinfo.c | 2 +-
> hw/misc/ivshmem.c | 4 ++--
> hw/misc/led.c | 2 +-
> hw/misc/mac_via.c | 2 +-
> hw/misc/macio/cuda.c | 2 +-
> hw/misc/macio/macio.c | 4 ++--
> hw/misc/macio/pmu.c | 2 +-
> hw/misc/mips_cmgcr.c | 2 +-
> hw/misc/mips_cpc.c | 2 +-
> hw/misc/mips_itu.c | 2 +-
> hw/misc/mos6522.c | 2 +-
> hw/misc/mps2-fpgaio.c | 2 +-
> hw/misc/mps2-scc.c | 2 +-
> hw/misc/msf2-sysreg.c | 2 +-
> hw/misc/npcm7xx_gcr.c | 2 +-
> hw/misc/nrf51_rng.c | 2 +-
> hw/misc/pci-testdev.c | 2 +-
> hw/misc/pvpanic-isa.c | 2 +-
> hw/misc/pvpanic-pci.c | 2 +-
> hw/misc/sifive_e_aon.c | 2 +-
> hw/misc/sifive_u_otp.c | 2 +-
> hw/misc/stm32l4x5_rcc.c | 2 +-
> hw/misc/tz-mpc.c | 2 +-
> hw/misc/tz-msc.c | 2 +-
> hw/misc/tz-ppc.c | 2 +-
> hw/misc/unimp.c | 2 +-
> hw/misc/xlnx-versal-cframe-reg.c | 4 ++--
> hw/misc/xlnx-versal-cfu.c | 4 ++--
> hw/misc/xlnx-versal-xramc.c | 2 +-
> hw/misc/zynq_slcr.c | 2 +-
> 52 files changed, 56 insertions(+), 56 deletions(-)
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c
> index a40d5072de..e2d73edde8 100644
> --- a/hw/misc/a9scu.c
> +++ b/hw/misc/a9scu.c
> @@ -123,7 +123,7 @@ static const VMStateDescription vmstate_a9_scu = {
> }
> };
>
> -static Property a9_scu_properties[] = {
> +static const Property a9_scu_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", A9SCUState, num_cpu, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c
> index eeab0dc5d2..247bf62c43 100644
> --- a/hw/misc/allwinner-h3-dramc.c
> +++ b/hw/misc/allwinner-h3-dramc.c
> @@ -314,7 +314,7 @@ static void allwinner_h3_dramc_init(Object *obj)
> sysbus_init_mmio(sbd, &s->dramphy_iomem);
> }
>
> -static Property allwinner_h3_dramc_properties[] = {
> +static const Property allwinner_h3_dramc_properties[] = {
> DEFINE_PROP_UINT64("ram-addr", AwH3DramCtlState, ram_addr, 0x0),
> DEFINE_PROP_UINT32("ram-size", AwH3DramCtlState, ram_size, 256 * MiB),
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/misc/allwinner-r40-dramc.c b/hw/misc/allwinner-r40-dramc.c
> index 3ae4890037..a51284ff91 100644
> --- a/hw/misc/allwinner-r40-dramc.c
> +++ b/hw/misc/allwinner-r40-dramc.c
> @@ -464,7 +464,7 @@ static void allwinner_r40_dramc_init(Object *obj)
> sysbus_init_mmio(sbd, &s->dramphy_iomem);
> }
>
> -static Property allwinner_r40_dramc_properties[] = {
> +static const Property allwinner_r40_dramc_properties[] = {
> DEFINE_PROP_UINT64("ram-addr", AwR40DramCtlState, ram_addr, 0x0),
> DEFINE_PROP_UINT32("ram-size", AwR40DramCtlState, ram_size, 256), /* MiB */
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/misc/allwinner-sid.c b/hw/misc/allwinner-sid.c
> index 19ff17d24a..3a09dca111 100644
> --- a/hw/misc/allwinner-sid.c
> +++ b/hw/misc/allwinner-sid.c
> @@ -127,7 +127,7 @@ static void allwinner_sid_init(Object *obj)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property allwinner_sid_properties[] = {
> +static const Property allwinner_sid_properties[] = {
> DEFINE_PROP_UUID_NODEFAULT("identifier", AwSidState, identifier),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
> index 5b766277d6..9d0e273e33 100644
> --- a/hw/misc/applesmc.c
> +++ b/hw/misc/applesmc.c
> @@ -350,7 +350,7 @@ static void applesmc_unrealize(DeviceState *dev)
> }
> }
>
> -static Property applesmc_isa_properties[] = {
> +static const Property applesmc_isa_properties[] = {
> DEFINE_PROP_UINT32(APPLESMC_PROP_IO_BASE, AppleSMCState, iobase,
> APPLESMC_DEFAULT_IOBASE),
> DEFINE_PROP_STRING("osk", AppleSMCState, osk),
> diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c
> index 17c36a0545..37feed9da7 100644
> --- a/hw/misc/arm11scu.c
> +++ b/hw/misc/arm11scu.c
> @@ -75,7 +75,7 @@ static void arm11_scu_init(Object *obj)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property arm11_scu_properties[] = {
> +static const Property arm11_scu_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", ARM11SCUState, num_cpu, 1),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
> index 1902ebd3bc..9c209f13b0 100644
> --- a/hw/misc/arm_l2x0.c
> +++ b/hw/misc/arm_l2x0.c
> @@ -173,7 +173,7 @@ static void l2x0_priv_init(Object *obj)
> sysbus_init_mmio(dev, &s->iomem);
> }
>
> -static Property l2x0_properties[] = {
> +static const Property l2x0_properties[] = {
> DEFINE_PROP_UINT32("cache-type", L2x0State, cache_type, 0x1c100100),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c
> index 9c4dce350a..69e379fa10 100644
> --- a/hw/misc/arm_sysctl.c
> +++ b/hw/misc/arm_sysctl.c
> @@ -623,7 +623,7 @@ static void arm_sysctl_finalize(Object *obj)
> g_free(s->db_clock_reset);
> }
>
> -static Property arm_sysctl_properties[] = {
> +static const Property arm_sysctl_properties[] = {
> DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0),
> DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0),
> /* Daughterboard power supply voltages (as reported via SYS_CFG) */
> diff --git a/hw/misc/armsse-cpuid.c b/hw/misc/armsse-cpuid.c
> index e785a09051..b05bcdcabc 100644
> --- a/hw/misc/armsse-cpuid.c
> +++ b/hw/misc/armsse-cpuid.c
> @@ -92,7 +92,7 @@ static const MemoryRegionOps armsse_cpuid_ops = {
> .valid.max_access_size = 4,
> };
>
> -static Property armsse_cpuid_props[] = {
> +static const Property armsse_cpuid_props[] = {
> DEFINE_PROP_UINT32("CPUID", ARMSSECPUID, cpuid, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c
> index bc1d66ad80..5cefbadf9a 100644
> --- a/hw/misc/aspeed_hace.c
> +++ b/hw/misc/aspeed_hace.c
> @@ -436,7 +436,7 @@ static void aspeed_hace_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property aspeed_hace_properties[] = {
> +static const Property aspeed_hace_properties[] = {
> DEFINE_PROP_LINK("dram", AspeedHACEState, dram_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/aspeed_i3c.c b/hw/misc/aspeed_i3c.c
> index 371ee7dba8..7f5a389864 100644
> --- a/hw/misc/aspeed_i3c.c
> +++ b/hw/misc/aspeed_i3c.c
> @@ -323,7 +323,7 @@ static void aspeed_i3c_realize(DeviceState *dev, Error **errp)
>
> }
>
> -static Property aspeed_i3c_device_properties[] = {
> +static const Property aspeed_i3c_device_properties[] = {
> DEFINE_PROP_UINT8("device-id", AspeedI3CDevice, id, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/aspeed_lpc.c b/hw/misc/aspeed_lpc.c
> index f2d4ca6f43..bb9066b0f0 100644
> --- a/hw/misc/aspeed_lpc.c
> +++ b/hw/misc/aspeed_lpc.c
> @@ -454,7 +454,7 @@ static const VMStateDescription vmstate_aspeed_lpc = {
> }
> };
>
> -static Property aspeed_lpc_properties[] = {
> +static const Property aspeed_lpc_properties[] = {
> DEFINE_PROP_UINT32("hicr7", AspeedLPCState, hicr7, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c
> index f5eb2a0e37..b97cf51fa1 100644
> --- a/hw/misc/aspeed_sbc.c
> +++ b/hw/misc/aspeed_sbc.c
> @@ -136,7 +136,7 @@ static const VMStateDescription vmstate_aspeed_sbc = {
> }
> };
>
> -static Property aspeed_sbc_properties[] = {
> +static const Property aspeed_sbc_properties[] = {
> DEFINE_PROP_BOOL("emmc-abr", AspeedSBCState, emmc_abr, 0),
> DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_settings, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
> index 2c919349cf..ac33b8d6cb 100644
> --- a/hw/misc/aspeed_scu.c
> +++ b/hw/misc/aspeed_scu.c
> @@ -602,7 +602,7 @@ static const VMStateDescription vmstate_aspeed_scu = {
> }
> };
>
> -static Property aspeed_scu_properties[] = {
> +static const Property aspeed_scu_properties[] = {
> DEFINE_PROP_UINT32("silicon-rev", AspeedSCUState, silicon_rev, 0),
> DEFINE_PROP_UINT32("hw-strap1", AspeedSCUState, hw_strap1, 0),
> DEFINE_PROP_UINT32("hw-strap2", AspeedSCUState, hw_strap2, 0),
> diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
> index 4bc9faf691..4980080f74 100644
> --- a/hw/misc/aspeed_sdmc.c
> +++ b/hw/misc/aspeed_sdmc.c
> @@ -294,7 +294,7 @@ static const VMStateDescription vmstate_aspeed_sdmc = {
> }
> };
>
> -static Property aspeed_sdmc_properties[] = {
> +static const Property aspeed_sdmc_properties[] = {
> DEFINE_PROP_UINT64("max-ram-size", AspeedSDMCState, max_ram_size, 0),
> DEFINE_PROP_BOOL("unlocked", AspeedSDMCState, unlocked, false),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c
> index 63e1045abf..1a20cd0bc8 100644
> --- a/hw/misc/bcm2835_cprman.c
> +++ b/hw/misc/bcm2835_cprman.c
> @@ -778,7 +778,7 @@ static const VMStateDescription cprman_vmstate = {
> }
> };
>
> -static Property cprman_properties[] = {
> +static const Property cprman_properties[] = {
> DEFINE_PROP_UINT32("xosc-freq-hz", BCM2835CprmanState, xosc_freq, 19200000),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
> index 8ca3128f29..09a6f2c6e3 100644
> --- a/hw/misc/bcm2835_property.c
> +++ b/hw/misc/bcm2835_property.c
> @@ -551,7 +551,7 @@ static void bcm2835_property_realize(DeviceState *dev, Error **errp)
> bcm2835_property_reset(dev);
> }
>
> -static Property bcm2835_property_props[] = {
> +static const Property bcm2835_property_props[] = {
> DEFINE_PROP_UINT32("board-rev", BCM2835PropertyState, board_rev, 0),
> DEFINE_PROP_STRING("command-line", BCM2835PropertyState, command_line),
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c
> index c5c562fd93..639a8cc3e3 100644
> --- a/hw/misc/debugexit.c
> +++ b/hw/misc/debugexit.c
> @@ -56,7 +56,7 @@ static void debug_exit_realizefn(DeviceState *d, Error **errp)
> isa->iobase, &isa->io);
> }
>
> -static Property debug_exit_properties[] = {
> +static const Property debug_exit_properties[] = {
> DEFINE_PROP_UINT32("iobase", ISADebugExitState, iobase, 0x501),
> DEFINE_PROP_UINT32("iosize", ISADebugExitState, iosize, 0x02),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/eccmemctl.c b/hw/misc/eccmemctl.c
> index 0f68fbe1b6..4fc88bd4e5 100644
> --- a/hw/misc/eccmemctl.c
> +++ b/hw/misc/eccmemctl.c
> @@ -325,7 +325,7 @@ static void ecc_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property ecc_properties[] = {
> +static const Property ecc_properties[] = {
> DEFINE_PROP_UINT32("version", ECCState, version, -1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/empty_slot.c b/hw/misc/empty_slot.c
> index 37b0ddfb02..79572c5be0 100644
> --- a/hw/misc/empty_slot.c
> +++ b/hw/misc/empty_slot.c
> @@ -79,7 +79,7 @@ static void empty_slot_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
> }
>
> -static Property empty_slot_properties[] = {
> +static const Property empty_slot_properties[] = {
> DEFINE_PROP_UINT64("size", EmptySlot, size, 0),
> DEFINE_PROP_STRING("name", EmptySlot, name),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/iotkit-secctl.c b/hw/misc/iotkit-secctl.c
> index 6e22f2aad6..abb6a963ca 100644
> --- a/hw/misc/iotkit-secctl.c
> +++ b/hw/misc/iotkit-secctl.c
> @@ -814,7 +814,7 @@ static const VMStateDescription iotkit_secctl_vmstate = {
> },
> };
>
> -static Property iotkit_secctl_props[] = {
> +static const Property iotkit_secctl_props[] = {
> DEFINE_PROP_UINT32("sse-version", IoTKitSecCtl, sse_version, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/iotkit-sysctl.c b/hw/misc/iotkit-sysctl.c
> index c1b357e6b7..23b49d7dff 100644
> --- a/hw/misc/iotkit-sysctl.c
> +++ b/hw/misc/iotkit-sysctl.c
> @@ -835,7 +835,7 @@ static const VMStateDescription iotkit_sysctl_vmstate = {
> }
> };
>
> -static Property iotkit_sysctl_props[] = {
> +static const Property iotkit_sysctl_props[] = {
> DEFINE_PROP_UINT32("sse-version", IoTKitSysCtl, sse_version, 0),
> DEFINE_PROP_UINT32("CPUWAIT_RST", IoTKitSysCtl, cpuwait_rst, 0),
> DEFINE_PROP_UINT32("INITSVTOR0_RST", IoTKitSysCtl, initsvtor0_rst,
> diff --git a/hw/misc/iotkit-sysinfo.c b/hw/misc/iotkit-sysinfo.c
> index aaa9305b2e..7d4eea6bfb 100644
> --- a/hw/misc/iotkit-sysinfo.c
> +++ b/hw/misc/iotkit-sysinfo.c
> @@ -131,7 +131,7 @@ static const MemoryRegionOps iotkit_sysinfo_ops = {
> .valid.max_access_size = 4,
> };
>
> -static Property iotkit_sysinfo_props[] = {
> +static const Property iotkit_sysinfo_props[] = {
> DEFINE_PROP_UINT32("SYS_VERSION", IoTKitSysInfo, sys_version, 0),
> DEFINE_PROP_UINT32("SYS_CONFIG", IoTKitSysInfo, sys_config, 0),
> DEFINE_PROP_UINT32("sse-version", IoTKitSysInfo, sse_version, 0),
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 5ce3fc0949..6d735ec29f 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -1022,7 +1022,7 @@ static const VMStateDescription ivshmem_plain_vmsd = {
> },
> };
>
> -static Property ivshmem_plain_properties[] = {
> +static const Property ivshmem_plain_properties[] = {
> DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
> DEFINE_PROP_LINK("memdev", IVShmemState, hostmem, TYPE_MEMORY_BACKEND,
> HostMemoryBackend *),
> @@ -1077,7 +1077,7 @@ static const VMStateDescription ivshmem_doorbell_vmsd = {
> },
> };
>
> -static Property ivshmem_doorbell_properties[] = {
> +static const Property ivshmem_doorbell_properties[] = {
> DEFINE_PROP_CHR("chardev", IVShmemState, server_chr),
> DEFINE_PROP_UINT32("vectors", IVShmemState, vectors, 1),
> DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD,
> diff --git a/hw/misc/led.c b/hw/misc/led.c
> index 4bb6ce8d29..76efdbc3f1 100644
> --- a/hw/misc/led.c
> +++ b/hw/misc/led.c
> @@ -101,7 +101,7 @@ static void led_realize(DeviceState *dev, Error **errp)
> qdev_init_gpio_in(DEVICE(s), led_set_state_gpio_handler, 1);
> }
>
> -static Property led_properties[] = {
> +static const Property led_properties[] = {
> DEFINE_PROP_STRING("color", LEDState, color),
> DEFINE_PROP_STRING("description", LEDState, description),
> DEFINE_PROP_BOOL("gpio-active-high", LEDState, gpio_active_high, true),
> diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c
> index af2b2b1af3..a376a2b8a0 100644
> --- a/hw/misc/mac_via.c
> +++ b/hw/misc/mac_via.c
> @@ -1322,7 +1322,7 @@ static const VMStateDescription vmstate_q800_via1 = {
> }
> };
>
> -static Property mos6522_q800_via1_properties[] = {
> +static const Property mos6522_q800_via1_properties[] = {
> DEFINE_PROP_DRIVE("drive", MOS6522Q800VIA1State, blk),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
> index 1db7ebf3e2..cfc8afd1dc 100644
> --- a/hw/misc/macio/cuda.c
> +++ b/hw/misc/macio/cuda.c
> @@ -554,7 +554,7 @@ static void cuda_init(Object *obj)
> DEVICE(obj), "adb.0");
> }
>
> -static Property cuda_properties[] = {
> +static const Property cuda_properties[] = {
> DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
> index 3f449f91c0..7e3d5aa977 100644
> --- a/hw/misc/macio/macio.c
> +++ b/hw/misc/macio/macio.c
> @@ -405,7 +405,7 @@ static const VMStateDescription vmstate_macio_newworld = {
> }
> };
>
> -static Property macio_newworld_properties[] = {
> +static const Property macio_newworld_properties[] = {
> DEFINE_PROP_BOOL("has-pmu", NewWorldMacIOState, has_pmu, false),
> DEFINE_PROP_BOOL("has-adb", NewWorldMacIOState, has_adb, false),
> DEFINE_PROP_END_OF_LIST()
> @@ -422,7 +422,7 @@ static void macio_newworld_class_init(ObjectClass *oc, void *data)
> device_class_set_props(dc, macio_newworld_properties);
> }
>
> -static Property macio_properties[] = {
> +static const Property macio_properties[] = {
> DEFINE_PROP_UINT64("frequency", MacIOState, frequency, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
> index 4b451e0af3..64bf44f67f 100644
> --- a/hw/misc/macio/pmu.c
> +++ b/hw/misc/macio/pmu.c
> @@ -760,7 +760,7 @@ static void pmu_init(Object *obj)
> sysbus_init_mmio(d, &s->mem);
> }
>
> -static Property pmu_properties[] = {
> +static const Property pmu_properties[] = {
> DEFINE_PROP_BOOL("has-adb", PMUState, has_adb, true),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c
> index 04256aacdc..80ca224f76 100644
> --- a/hw/misc/mips_cmgcr.c
> +++ b/hw/misc/mips_cmgcr.c
> @@ -211,7 +211,7 @@ static const VMStateDescription vmstate_mips_gcr = {
> },
> };
>
> -static Property mips_gcr_properties[] = {
> +static const Property mips_gcr_properties[] = {
> DEFINE_PROP_UINT32("num-vp", MIPSGCRState, num_vps, 1),
> DEFINE_PROP_INT32("gcr-rev", MIPSGCRState, gcr_rev, 0x800),
> DEFINE_PROP_UINT64("gcr-base", MIPSGCRState, gcr_base, GCR_BASE_ADDR),
> diff --git a/hw/misc/mips_cpc.c b/hw/misc/mips_cpc.c
> index 2f7fb8167f..86ff0f7ad8 100644
> --- a/hw/misc/mips_cpc.c
> +++ b/hw/misc/mips_cpc.c
> @@ -163,7 +163,7 @@ static const VMStateDescription vmstate_mips_cpc = {
> },
> };
>
> -static Property mips_cpc_properties[] = {
> +static const Property mips_cpc_properties[] = {
> DEFINE_PROP_UINT32("num-vp", MIPSCPCState, num_vp, 0x1),
> DEFINE_PROP_UINT64("vp-start-running", MIPSCPCState, vp_start_running, 0x1),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
> index c5214c8b30..d84a7dbf15 100644
> --- a/hw/misc/mips_itu.c
> +++ b/hw/misc/mips_itu.c
> @@ -533,7 +533,7 @@ static void mips_itu_reset(DeviceState *dev)
> itc_reset_cells(s);
> }
>
> -static Property mips_itu_properties[] = {
> +static const Property mips_itu_properties[] = {
> DEFINE_PROP_UINT32("num-fifo", MIPSITUState, num_fifo,
> ITC_FIFO_NUM_MAX),
> DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores,
> diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
> index 515f62e687..0225a5869b 100644
> --- a/hw/misc/mos6522.c
> +++ b/hw/misc/mos6522.c
> @@ -696,7 +696,7 @@ static void mos6522_finalize(Object *obj)
> timer_free(s->timers[1].timer);
> }
>
> -static Property mos6522_properties[] = {
> +static const Property mos6522_properties[] = {
> DEFINE_PROP_UINT64("frequency", MOS6522State, frequency, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/misc/mps2-fpgaio.c b/hw/misc/mps2-fpgaio.c
> index 20359254ba..2e8d1c721c 100644
> --- a/hw/misc/mps2-fpgaio.c
> +++ b/hw/misc/mps2-fpgaio.c
> @@ -319,7 +319,7 @@ static const VMStateDescription mps2_fpgaio_vmstate = {
> },
> };
>
> -static Property mps2_fpgaio_properties[] = {
> +static const Property mps2_fpgaio_properties[] = {
> /* Frequency of the prescale counter */
> DEFINE_PROP_UINT32("prescale-clk", MPS2FPGAIO, prescale_clk, 20000000),
> /* Number of LEDs controlled by LED0 register */
> diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c
> index d45ff77bd6..f378b75571 100644
> --- a/hw/misc/mps2-scc.c
> +++ b/hw/misc/mps2-scc.c
> @@ -456,7 +456,7 @@ static const VMStateDescription mps2_scc_vmstate = {
> }
> };
>
> -static Property mps2_scc_properties[] = {
> +static const Property mps2_scc_properties[] = {
> /* Values for various read-only ID registers (which are specific
> * to the board model or FPGA image)
> */
> diff --git a/hw/misc/msf2-sysreg.c b/hw/misc/msf2-sysreg.c
> index b8dde198c6..0d7a713c76 100644
> --- a/hw/misc/msf2-sysreg.c
> +++ b/hw/misc/msf2-sysreg.c
> @@ -118,7 +118,7 @@ static const VMStateDescription vmstate_msf2_sysreg = {
> }
> };
>
> -static Property msf2_sysreg_properties[] = {
> +static const Property msf2_sysreg_properties[] = {
> /* default divisors in Libero GUI */
> DEFINE_PROP_UINT8("apb0divisor", MSF2SysregState, apb0div, 2),
> DEFINE_PROP_UINT8("apb1divisor", MSF2SysregState, apb1div, 2),
> diff --git a/hw/misc/npcm7xx_gcr.c b/hw/misc/npcm7xx_gcr.c
> index c4c4e246d7..17aeaf22cb 100644
> --- a/hw/misc/npcm7xx_gcr.c
> +++ b/hw/misc/npcm7xx_gcr.c
> @@ -229,7 +229,7 @@ static const VMStateDescription vmstate_npcm7xx_gcr = {
> },
> };
>
> -static Property npcm7xx_gcr_properties[] = {
> +static const Property npcm7xx_gcr_properties[] = {
> DEFINE_PROP_UINT32("disabled-modules", NPCM7xxGCRState, reset_mdlr, 0),
> DEFINE_PROP_UINT32("power-on-straps", NPCM7xxGCRState, reset_pwron, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/nrf51_rng.c b/hw/misc/nrf51_rng.c
> index 2d67f3f766..2b550a6bca 100644
> --- a/hw/misc/nrf51_rng.c
> +++ b/hw/misc/nrf51_rng.c
> @@ -219,7 +219,7 @@ static void nrf51_rng_reset(DeviceState *dev)
> }
>
>
> -static Property nrf51_rng_properties[] = {
> +static const Property nrf51_rng_properties[] = {
> DEFINE_PROP_UINT16("period_unfiltered_us", NRF51RNGState,
> period_unfiltered_us, 167),
> DEFINE_PROP_UINT16("period_filtered_us", NRF51RNGState,
> diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
> index 0b5f236a20..7927397a23 100644
> --- a/hw/misc/pci-testdev.c
> +++ b/hw/misc/pci-testdev.c
> @@ -319,7 +319,7 @@ static void qdev_pci_testdev_reset(DeviceState *dev)
> pci_testdev_reset(d);
> }
>
> -static Property pci_testdev_properties[] = {
> +static const Property pci_testdev_properties[] = {
> DEFINE_PROP_SIZE("membar", PCITestDevState, membar_size, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c
> index 9a923b7869..824a2e4528 100644
> --- a/hw/misc/pvpanic-isa.c
> +++ b/hw/misc/pvpanic-isa.c
> @@ -98,7 +98,7 @@ static void build_pvpanic_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> aml_append(scope, dev);
> }
>
> -static Property pvpanic_isa_properties[] = {
> +static const Property pvpanic_isa_properties[] = {
> DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505),
> DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events,
> PVPANIC_EVENTS),
> diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c
> index 106d03ccd6..1c3eafc137 100644
> --- a/hw/misc/pvpanic-pci.c
> +++ b/hw/misc/pvpanic-pci.c
> @@ -53,7 +53,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
> pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &ps->mr);
> }
>
> -static Property pvpanic_pci_properties[] = {
> +static const Property pvpanic_pci_properties[] = {
> DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events,
> PVPANIC_EVENTS),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/sifive_e_aon.c b/hw/misc/sifive_e_aon.c
> index f819fc10e6..c48429b131 100644
> --- a/hw/misc/sifive_e_aon.c
> +++ b/hw/misc/sifive_e_aon.c
> @@ -289,7 +289,7 @@ static void sifive_e_aon_init(Object *obj)
> sysbus_init_irq(sbd, &r->wdog_irq);
> }
>
> -static Property sifive_e_aon_properties[] = {
> +static const Property sifive_e_aon_properties[] = {
> DEFINE_PROP_UINT64("wdogclk-frequency", SiFiveEAONState, wdogclk_freq,
> SIFIVE_E_LFCLK_DEFAULT_FREQ),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
> index 8965f5c22a..32cd8e8dfb 100644
> --- a/hw/misc/sifive_u_otp.c
> +++ b/hw/misc/sifive_u_otp.c
> @@ -194,7 +194,7 @@ static const MemoryRegionOps sifive_u_otp_ops = {
> }
> };
>
> -static Property sifive_u_otp_properties[] = {
> +static const Property sifive_u_otp_properties[] = {
> DEFINE_PROP_UINT32("serial", SiFiveUOTPState, serial, 0),
> DEFINE_PROP_DRIVE("drive", SiFiveUOTPState, blk),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/stm32l4x5_rcc.c b/hw/misc/stm32l4x5_rcc.c
> index 59d428fa66..b61241d195 100644
> --- a/hw/misc/stm32l4x5_rcc.c
> +++ b/hw/misc/stm32l4x5_rcc.c
> @@ -1426,7 +1426,7 @@ static void stm32l4x5_rcc_realize(DeviceState *dev, Error **errp)
> clock_update(s->gnd, 0);
> }
>
> -static Property stm32l4x5_rcc_properties[] = {
> +static const Property stm32l4x5_rcc_properties[] = {
> DEFINE_PROP_UINT64("hse_frequency", Stm32l4x5RccState,
> hse_frequency, HSE_DEFAULT_FRQ),
> DEFINE_PROP_UINT64("sai1_extclk_frequency", Stm32l4x5RccState,
> diff --git a/hw/misc/tz-mpc.c b/hw/misc/tz-mpc.c
> index 66a46a7b9f..b06eb9f119 100644
> --- a/hw/misc/tz-mpc.c
> +++ b/hw/misc/tz-mpc.c
> @@ -587,7 +587,7 @@ static const VMStateDescription tz_mpc_vmstate = {
> }
> };
>
> -static Property tz_mpc_properties[] = {
> +static const Property tz_mpc_properties[] = {
> DEFINE_PROP_LINK("downstream", TZMPC, downstream,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/tz-msc.c b/hw/misc/tz-msc.c
> index 82ccaa014a..96413a502d 100644
> --- a/hw/misc/tz-msc.c
> +++ b/hw/misc/tz-msc.c
> @@ -278,7 +278,7 @@ static const VMStateDescription tz_msc_vmstate = {
> }
> };
>
> -static Property tz_msc_properties[] = {
> +static const Property tz_msc_properties[] = {
> DEFINE_PROP_LINK("downstream", TZMSC, downstream,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_LINK("idau", TZMSC, idau,
> diff --git a/hw/misc/tz-ppc.c b/hw/misc/tz-ppc.c
> index 922dcf7f63..1943d8d165 100644
> --- a/hw/misc/tz-ppc.c
> +++ b/hw/misc/tz-ppc.c
> @@ -305,7 +305,7 @@ static const VMStateDescription tz_ppc_vmstate = {
> DEFINE_PROP_LINK("port[" #N "]", TZPPC, port[N].downstream, \
> TYPE_MEMORY_REGION, MemoryRegion *)
>
> -static Property tz_ppc_properties[] = {
> +static const Property tz_ppc_properties[] = {
> DEFINE_PROP_UINT32("NONSEC_MASK", TZPPC, nonsec_mask, 0),
> DEFINE_PORT(0),
> DEFINE_PORT(1),
> diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c
> index 6cfc5727f0..62e1153627 100644
> --- a/hw/misc/unimp.c
> +++ b/hw/misc/unimp.c
> @@ -70,7 +70,7 @@ static void unimp_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->iomem);
> }
>
> -static Property unimp_properties[] = {
> +static const Property unimp_properties[] = {
> DEFINE_PROP_UINT64("size", UnimplementedDeviceState, size, 0),
> DEFINE_PROP_STRING("name", UnimplementedDeviceState, name),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/xlnx-versal-cframe-reg.c b/hw/misc/xlnx-versal-cframe-reg.c
> index 3fc838bd54..8281a9baff 100644
> --- a/hw/misc/xlnx-versal-cframe-reg.c
> +++ b/hw/misc/xlnx-versal-cframe-reg.c
> @@ -720,7 +720,7 @@ static const VMStateDescription vmstate_cframe_reg = {
> }
> };
>
> -static Property cframe_regs_props[] = {
> +static const Property cframe_regs_props[] = {
> DEFINE_PROP_LINK("cfu-fdro", XlnxVersalCFrameReg, cfg.cfu_fdro,
> TYPE_XLNX_CFI_IF, XlnxCfiIf *),
> DEFINE_PROP_UINT32("blktype0-frames", XlnxVersalCFrameReg,
> @@ -771,7 +771,7 @@ static const VMStateDescription vmstate_cframe_bcast_reg = {
> }
> };
>
> -static Property cframe_bcast_regs_props[] = {
> +static const Property cframe_bcast_regs_props[] = {
> DEFINE_PROP_LINK("cframe0", XlnxVersalCFrameBcastReg, cfg.cframe[0],
> TYPE_XLNX_CFI_IF, XlnxCfiIf *),
> DEFINE_PROP_LINK("cframe1", XlnxVersalCFrameBcastReg, cfg.cframe[1],
> diff --git a/hw/misc/xlnx-versal-cfu.c b/hw/misc/xlnx-versal-cfu.c
> index 94f85814c8..7cfdabdb8e 100644
> --- a/hw/misc/xlnx-versal-cfu.c
> +++ b/hw/misc/xlnx-versal-cfu.c
> @@ -426,7 +426,7 @@ static void cfu_fdro_cfi_transfer_packet(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt)
> }
> }
>
> -static Property cfu_props[] = {
> +static const Property cfu_props[] = {
> DEFINE_PROP_LINK("cframe0", XlnxVersalCFUAPB, cfg.cframe[0],
> TYPE_XLNX_CFI_IF, XlnxCfiIf *),
> DEFINE_PROP_LINK("cframe1", XlnxVersalCFUAPB, cfg.cframe[1],
> @@ -460,7 +460,7 @@ static Property cfu_props[] = {
> DEFINE_PROP_END_OF_LIST(),
> };
>
> -static Property cfu_sfr_props[] = {
> +static const Property cfu_sfr_props[] = {
> DEFINE_PROP_LINK("cfu", XlnxVersalCFUSFR, cfg.cfu,
> TYPE_XLNX_VERSAL_CFU_APB, XlnxVersalCFUAPB *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/misc/xlnx-versal-xramc.c b/hw/misc/xlnx-versal-xramc.c
> index ad839ce7e9..a06b9fbc05 100644
> --- a/hw/misc/xlnx-versal-xramc.c
> +++ b/hw/misc/xlnx-versal-xramc.c
> @@ -218,7 +218,7 @@ static const VMStateDescription vmstate_xram_ctrl = {
> }
> };
>
> -static Property xram_ctrl_properties[] = {
> +static const Property xram_ctrl_properties[] = {
> DEFINE_PROP_UINT64("size", XlnxXramCtrl, cfg.size, 1 * MiB),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
> index ad814c3a79..ffa14ecb84 100644
> --- a/hw/misc/zynq_slcr.c
> +++ b/hw/misc/zynq_slcr.c
> @@ -623,7 +623,7 @@ static const VMStateDescription vmstate_zynq_slcr = {
> }
> };
>
> -static Property zynq_slcr_props[] = {
> +static const Property zynq_slcr_props[] = {
> DEFINE_PROP_UINT8("boot-mode", ZynqSLCRState, boot_mode, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 41/71] hw/net: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (43 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 40/71] hw/misc: Constify all Property Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 10:04 ` Cédric Le Goater
2024-12-19 8:25 ` Akihiko Odaki
2024-12-13 19:07 ` [PATCH 42/71] hw/nubus: " Richard Henderson
` (27 subsequent siblings)
72 siblings, 2 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic, Jason Wang,
Edgar E. Iglesias, Alistair Francis, Pavel Pisa,
Francisco Iglesias, Vikram Garhwal, Dmitry Fleytman,
Akihiko Odaki, Stefan Weil, Bernhard Beschow,
Cédric Le Goater, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Sriram Yagnaraman, Helge Deller,
Thomas Huth, Aleksandar Rikalo, Subbaraya Sundeep, Jan Kiszka,
Tyrone Ting, Hao Wu, Max Filippov, Jiri Pirko, Nicholas Piggin,
Daniel Henrique Barboza, Harsh Prateek Bora, Sven Schnelle,
Michael S. Tsirkin, Stefano Stabellini, Anthony PERARD,
Paul Durrant, Rob Herring, open list:Allwinner-a10,
open list:e500, open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/net/allwinner-sun8i-emac.c | 2 +-
hw/net/allwinner_emac.c | 2 +-
hw/net/cadence_gem.c | 2 +-
hw/net/can/xlnx-versal-canfd.c | 2 +-
hw/net/can/xlnx-zynqmp-can.c | 2 +-
hw/net/dp8393x.c | 2 +-
hw/net/e1000.c | 2 +-
hw/net/e1000e.c | 2 +-
hw/net/eepro100.c | 2 +-
hw/net/fsl_etsec/etsec.c | 2 +-
hw/net/ftgmac100.c | 4 ++--
hw/net/igb.c | 2 +-
hw/net/imx_fec.c | 2 +-
hw/net/lan9118.c | 2 +-
hw/net/lance.c | 2 +-
hw/net/lasi_i82596.c | 2 +-
hw/net/mcf_fec.c | 2 +-
hw/net/mipsnet.c | 2 +-
hw/net/msf2-emac.c | 2 +-
hw/net/mv88w8618_eth.c | 2 +-
hw/net/ne2000-isa.c | 2 +-
hw/net/ne2000-pci.c | 2 +-
hw/net/npcm7xx_emc.c | 2 +-
hw/net/npcm_gmac.c | 2 +-
hw/net/opencores_eth.c | 2 +-
hw/net/pcnet-pci.c | 2 +-
hw/net/rocker/rocker.c | 2 +-
hw/net/rtl8139.c | 2 +-
hw/net/smc91c111.c | 2 +-
hw/net/spapr_llan.c | 2 +-
hw/net/stellaris_enet.c | 2 +-
hw/net/sungem.c | 2 +-
hw/net/sunhme.c | 2 +-
hw/net/tulip.c | 2 +-
hw/net/virtio-net.c | 2 +-
hw/net/vmxnet3.c | 2 +-
hw/net/xen_nic.c | 2 +-
hw/net/xgmac.c | 2 +-
hw/net/xilinx_axienet.c | 2 +-
hw/net/xilinx_ethlite.c | 2 +-
40 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c
index cdae74f503..3f03060bf5 100644
--- a/hw/net/allwinner-sun8i-emac.c
+++ b/hw/net/allwinner-sun8i-emac.c
@@ -829,7 +829,7 @@ static void allwinner_sun8i_emac_realize(DeviceState *dev, Error **errp)
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
}
-static Property allwinner_sun8i_emac_properties[] = {
+static const Property allwinner_sun8i_emac_properties[] = {
DEFINE_NIC_PROPERTIES(AwSun8iEmacState, conf),
DEFINE_PROP_UINT8("phy-addr", AwSun8iEmacState, mii_phy_addr, 0),
DEFINE_PROP_LINK("dma-memory", AwSun8iEmacState, dma_mr,
diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
index c104c2588e..39c10426cf 100644
--- a/hw/net/allwinner_emac.c
+++ b/hw/net/allwinner_emac.c
@@ -462,7 +462,7 @@ static void aw_emac_realize(DeviceState *dev, Error **errp)
fifo8_create(&s->tx_fifo[1], TX_FIFO_SIZE);
}
-static Property aw_emac_properties[] = {
+static const Property aw_emac_properties[] = {
DEFINE_NIC_PROPERTIES(AwEmacState, conf),
DEFINE_PROP_UINT8("phy-addr", AwEmacState, phy_addr, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index 526739887c..3fce01315f 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -1784,7 +1784,7 @@ static const VMStateDescription vmstate_cadence_gem = {
}
};
-static Property gem_properties[] = {
+static const Property gem_properties[] = {
DEFINE_NIC_PROPERTIES(CadenceGEMState, conf),
DEFINE_PROP_UINT32("revision", CadenceGEMState, revision,
GEM_MODID_VALUE),
diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c
index e148bd7b46..97fa46c4b3 100644
--- a/hw/net/can/xlnx-versal-canfd.c
+++ b/hw/net/can/xlnx-versal-canfd.c
@@ -2042,7 +2042,7 @@ static const VMStateDescription vmstate_canfd = {
}
};
-static Property canfd_core_properties[] = {
+static const Property canfd_core_properties[] = {
DEFINE_PROP_UINT8("rx-fifo0", XlnxVersalCANFDState, cfg.rx0_fifo, 0x40),
DEFINE_PROP_UINT8("rx-fifo1", XlnxVersalCANFDState, cfg.rx1_fifo, 0x40),
DEFINE_PROP_UINT8("tx-fifo", XlnxVersalCANFDState, cfg.tx_fifo, 0x20),
diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
index 58f1432bb3..61c104c18b 100644
--- a/hw/net/can/xlnx-zynqmp-can.c
+++ b/hw/net/can/xlnx-zynqmp-can.c
@@ -1169,7 +1169,7 @@ static const VMStateDescription vmstate_can = {
}
};
-static Property xlnx_zynqmp_can_properties[] = {
+static const Property xlnx_zynqmp_can_properties[] = {
DEFINE_PROP_UINT32("ext_clk_freq", XlnxZynqMPCANState, cfg.ext_clk_freq,
CAN_DEFAULT_CLOCK),
DEFINE_PROP_LINK("canbus", XlnxZynqMPCANState, canbus, TYPE_CAN_BUS,
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index c0977308ba..e3ca11991b 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -931,7 +931,7 @@ static const VMStateDescription vmstate_dp8393x = {
}
};
-static Property dp8393x_properties[] = {
+static const Property dp8393x_properties[] = {
DEFINE_NIC_PROPERTIES(dp8393xState, conf),
DEFINE_PROP_LINK("dma_mr", dp8393xState, dma_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index ab72236d18..ef0af31751 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1677,7 +1677,7 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Error **errp)
e1000_flush_queue_timer, d);
}
-static Property e1000_properties[] = {
+static const Property e1000_properties[] = {
DEFINE_NIC_PROPERTIES(E1000State, conf),
DEFINE_PROP_BIT("extra_mac_registers", E1000State,
compat_flags, E1000_FLAG_MAC_BIT, true),
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 843892ce09..e2b7576f67 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -661,7 +661,7 @@ static PropertyInfo e1000e_prop_disable_vnet,
e1000e_prop_subsys_ven,
e1000e_prop_subsys;
-static Property e1000e_properties[] = {
+static const Property e1000e_properties[] = {
DEFINE_NIC_PROPERTIES(E1000EState, conf),
DEFINE_PROP_SIGNED("disable_vnet_hdr", E1000EState, disable_vnet, false,
e1000e_prop_disable_vnet, bool),
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index 20b22d8e49..b8cb8d5cf1 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -2058,7 +2058,7 @@ static E100PCIDeviceInfo *eepro100_get_class(EEPRO100State *s)
return eepro100_get_class_by_name(object_get_typename(OBJECT(s)));
}
-static Property e100_properties[] = {
+static const Property e100_properties[] = {
DEFINE_NIC_PROPERTIES(EEPRO100State, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index d8076e7be4..764be2c6a2 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -414,7 +414,7 @@ static void etsec_instance_init(Object *obj)
sysbus_init_irq(sbd, &etsec->err_irq);
}
-static Property etsec_properties[] = {
+static const Property etsec_properties[] = {
DEFINE_NIC_PROPERTIES(eTSEC, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c
index 478356ee3e..4adc7fb10c 100644
--- a/hw/net/ftgmac100.c
+++ b/hw/net/ftgmac100.c
@@ -1254,7 +1254,7 @@ static const VMStateDescription vmstate_ftgmac100 = {
}
};
-static Property ftgmac100_properties[] = {
+static const Property ftgmac100_properties[] = {
DEFINE_PROP_BOOL("aspeed", FTGMAC100State, aspeed, false),
DEFINE_NIC_PROPERTIES(FTGMAC100State, conf),
DEFINE_PROP_BOOL("dma64", FTGMAC100State, dma64, false),
@@ -1415,7 +1415,7 @@ static const VMStateDescription vmstate_aspeed_mii = {
}
};
-static Property aspeed_mii_properties[] = {
+static const Property aspeed_mii_properties[] = {
DEFINE_PROP_LINK("nic", AspeedMiiState, nic, TYPE_FTGMAC100,
FTGMAC100State *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/net/igb.c b/hw/net/igb.c
index b92bba402e..ad0f748d82 100644
--- a/hw/net/igb.c
+++ b/hw/net/igb.c
@@ -591,7 +591,7 @@ static const VMStateDescription igb_vmstate = {
}
};
-static Property igb_properties[] = {
+static const Property igb_properties[] = {
DEFINE_NIC_PROPERTIES(IGBState, conf),
DEFINE_PROP_BOOL("x-pcie-flr-init", IGBState, has_flr, true),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index 4ee6f74206..9b64968477 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -1222,7 +1222,7 @@ static void imx_eth_realize(DeviceState *dev, Error **errp)
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
}
-static Property imx_eth_properties[] = {
+static const Property imx_eth_properties[] = {
DEFINE_NIC_PROPERTIES(IMXFECState, conf),
DEFINE_PROP_UINT32("tx-ring-num", IMXFECState, tx_ring_num, 1),
DEFINE_PROP_UINT32("phy-num", IMXFECState, phy_num, 0),
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 99e87b7178..237e9b97d5 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -1304,7 +1304,7 @@ static void lan9118_realize(DeviceState *dev, Error **errp)
ptimer_transaction_commit(s->timer);
}
-static Property lan9118_properties[] = {
+static const Property lan9118_properties[] = {
DEFINE_NIC_PROPERTIES(lan9118_state, conf),
DEFINE_PROP_UINT32("mode_16bit", lan9118_state, mode_16bit, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/net/lance.c b/hw/net/lance.c
index 269615b452..9ed9c94cff 100644
--- a/hw/net/lance.c
+++ b/hw/net/lance.c
@@ -137,7 +137,7 @@ static void lance_instance_init(Object *obj)
DEVICE(obj));
}
-static Property lance_properties[] = {
+static const Property lance_properties[] = {
DEFINE_PROP_LINK("dma", SysBusPCNetState, state.dma_opaque,
TYPE_DEVICE, DeviceState *),
DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf),
diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c
index 183fab8712..248e3841db 100644
--- a/hw/net/lasi_i82596.c
+++ b/hw/net/lasi_i82596.c
@@ -158,7 +158,7 @@ static void lasi_82596_instance_init(Object *obj)
DEVICE(obj));
}
-static Property lasi_82596_properties[] = {
+static const Property lasi_82596_properties[] = {
DEFINE_NIC_PROPERTIES(SysBusI82596State, state.conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index 037cd2028e..55bad4c069 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -660,7 +660,7 @@ static void mcf_fec_instance_init(Object *obj)
}
}
-static Property mcf_fec_properties[] = {
+static const Property mcf_fec_properties[] = {
DEFINE_NIC_PROPERTIES(mcf_fec_state, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
index 31bbd6fb89..c9ef1beb7b 100644
--- a/hw/net/mipsnet.c
+++ b/hw/net/mipsnet.c
@@ -266,7 +266,7 @@ static void mipsnet_sysbus_reset(DeviceState *dev)
mipsnet_reset(s);
}
-static Property mipsnet_properties[] = {
+static const Property mipsnet_properties[] = {
DEFINE_NIC_PROPERTIES(MIPSnetState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c
index d28fc6c570..8d9015f962 100644
--- a/hw/net/msf2-emac.c
+++ b/hw/net/msf2-emac.c
@@ -546,7 +546,7 @@ static void msf2_emac_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
}
-static Property msf2_emac_properties[] = {
+static const Property msf2_emac_properties[] = {
DEFINE_PROP_LINK("ahb-bus", MSF2EmacState, dma_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_NIC_PROPERTIES(MSF2EmacState, conf),
diff --git a/hw/net/mv88w8618_eth.c b/hw/net/mv88w8618_eth.c
index 96c65f4d46..ccb11512db 100644
--- a/hw/net/mv88w8618_eth.c
+++ b/hw/net/mv88w8618_eth.c
@@ -371,7 +371,7 @@ static const VMStateDescription mv88w8618_eth_vmsd = {
}
};
-static Property mv88w8618_eth_properties[] = {
+static const Property mv88w8618_eth_properties[] = {
DEFINE_NIC_PROPERTIES(mv88w8618_eth_state, conf),
DEFINE_PROP_LINK("dma-memory", mv88w8618_eth_state, dma_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
index 26980e087e..1cd070d419 100644
--- a/hw/net/ne2000-isa.c
+++ b/hw/net/ne2000-isa.c
@@ -79,7 +79,7 @@ static void isa_ne2000_realizefn(DeviceState *dev, Error **errp)
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->c.macaddr.a);
}
-static Property ne2000_isa_properties[] = {
+static const Property ne2000_isa_properties[] = {
DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300),
DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9),
DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c),
diff --git a/hw/net/ne2000-pci.c b/hw/net/ne2000-pci.c
index 74773069c6..12fa579d22 100644
--- a/hw/net/ne2000-pci.c
+++ b/hw/net/ne2000-pci.c
@@ -96,7 +96,7 @@ static void ne2000_instance_init(Object *obj)
&pci_dev->qdev);
}
-static Property ne2000_properties[] = {
+static const Property ne2000_properties[] = {
DEFINE_NIC_PROPERTIES(PCINE2000State, ne2000.c),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/npcm7xx_emc.c b/hw/net/npcm7xx_emc.c
index 7307a13400..f06e908d04 100644
--- a/hw/net/npcm7xx_emc.c
+++ b/hw/net/npcm7xx_emc.c
@@ -845,7 +845,7 @@ static const VMStateDescription vmstate_npcm7xx_emc = {
},
};
-static Property npcm7xx_emc_properties[] = {
+static const Property npcm7xx_emc_properties[] = {
DEFINE_NIC_PROPERTIES(NPCM7xxEMCState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c
index 685905f9e2..1db29307d7 100644
--- a/hw/net/npcm_gmac.c
+++ b/hw/net/npcm_gmac.c
@@ -912,7 +912,7 @@ static const VMStateDescription vmstate_npcm_gmac = {
},
};
-static Property npcm_gmac_properties[] = {
+static const Property npcm_gmac_properties[] = {
DEFINE_NIC_PROPERTIES(NPCMGMACState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c
index 2c0ebda100..003b452bc9 100644
--- a/hw/net/opencores_eth.c
+++ b/hw/net/opencores_eth.c
@@ -743,7 +743,7 @@ static void qdev_open_eth_reset(DeviceState *dev)
open_eth_reset(d);
}
-static Property open_eth_properties[] = {
+static const Property open_eth_properties[] = {
DEFINE_NIC_PROPERTIES(OpenEthState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index 6190b76916..83ba8cd949 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -252,7 +252,7 @@ static void pcnet_instance_init(Object *obj)
DEVICE(obj));
}
-static Property pcnet_properties[] = {
+static const Property pcnet_properties[] = {
DEFINE_NIC_PROPERTIES(PCIPCNetState, state.conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index 5e74acc969..efc20396aa 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -1459,7 +1459,7 @@ static void rocker_reset(DeviceState *dev)
DPRINTF("Reset done\n");
}
-static Property rocker_properties[] = {
+static const Property rocker_properties[] = {
DEFINE_PROP_STRING("name", Rocker, name),
DEFINE_PROP_STRING("world", Rocker, world_name),
DEFINE_PROP_MACADDR("fp_start_macaddr", Rocker,
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index bc56075c0d..064a73b6b4 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3410,7 +3410,7 @@ static void rtl8139_instance_init(Object *obj)
DEVICE(obj));
}
-static Property rtl8139_properties[] = {
+static const Property rtl8139_properties[] = {
DEFINE_NIC_PROPERTIES(RTL8139State, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index 180ba5c791..a853c30fa2 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -788,7 +788,7 @@ static void smc91c111_realize(DeviceState *dev, Error **errp)
/* ??? Save/restore. */
}
-static Property smc91c111_properties[] = {
+static const Property smc91c111_properties[] = {
DEFINE_NIC_PROPERTIES(smc91c111_state, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 8af33d91b6..d381c041db 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -786,7 +786,7 @@ static target_ulong h_change_logical_lan_mac(PowerPCCPU *cpu,
return H_SUCCESS;
}
-static Property spapr_vlan_properties[] = {
+static const Property spapr_vlan_properties[] = {
DEFINE_SPAPR_PROPERTIES(SpaprVioVlan, sdev),
DEFINE_NIC_PROPERTIES(SpaprVioVlan, nicconf),
DEFINE_PROP_BIT("use-rx-buffer-pools", SpaprVioVlan,
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index 9ebff296c4..4af1afa733 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -497,7 +497,7 @@ static void stellaris_enet_realize(DeviceState *dev, Error **errp)
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
}
-static Property stellaris_enet_properties[] = {
+static const Property stellaris_enet_properties[] = {
DEFINE_NIC_PROPERTIES(stellaris_enet_state, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/sungem.c b/hw/net/sungem.c
index 67087e9842..bcc7a18382 100644
--- a/hw/net/sungem.c
+++ b/hw/net/sungem.c
@@ -1420,7 +1420,7 @@ static void sungem_instance_init(Object *obj)
DEVICE(obj));
}
-static Property sungem_properties[] = {
+static const Property sungem_properties[] = {
DEFINE_NIC_PROPERTIES(SunGEMState, conf),
/* Phy address should be 0 for most Apple machines except
* for K2 in which case it's 1. Will be set by a machine
diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c
index 0e6c655a5b..86f472fcbe 100644
--- a/hw/net/sunhme.c
+++ b/hw/net/sunhme.c
@@ -177,7 +177,7 @@ struct SunHMEState {
uint16_t miiregs[HME_MII_REGS_SIZE];
};
-static Property sunhme_properties[] = {
+static const Property sunhme_properties[] = {
DEFINE_NIC_PROPERTIES(SunHMEState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 9df3e17162..f35b58a88c 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -1007,7 +1007,7 @@ static void tulip_instance_init(Object *obj)
&pci_dev->qdev);
}
-static Property tulip_properties[] = {
+static const Property tulip_properties[] = {
DEFINE_NIC_PROPERTIES(TULIPState, c),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 6e8c51a2db..4fd1f9acca 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3985,7 +3985,7 @@ static const VMStateDescription vmstate_virtio_net = {
.dev_unplug_pending = dev_unplug_pending,
};
-static Property virtio_net_properties[] = {
+static const Property virtio_net_properties[] = {
DEFINE_PROP_BIT64("csum", VirtIONet, host_features,
VIRTIO_NET_F_CSUM, true),
DEFINE_PROP_BIT64("guest_csum", VirtIONet, host_features,
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 8aa8c46228..f69547cad5 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2471,7 +2471,7 @@ static const VMStateDescription vmstate_vmxnet3 = {
}
};
-static Property vmxnet3_properties[] = {
+static const Property vmxnet3_properties[] = {
DEFINE_NIC_PROPERTIES(VMXNET3State, conf),
DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags,
VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false),
diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c
index 89487b49ba..5a5259150a 100644
--- a/hw/net/xen_nic.c
+++ b/hw/net/xen_nic.c
@@ -555,7 +555,7 @@ static void xen_netdev_unrealize(XenDevice *xendev)
/* ------------------------------------------------------------- */
-static Property xen_netdev_properties[] = {
+static const Property xen_netdev_properties[] = {
DEFINE_NIC_PROPERTIES(XenNetDev, conf),
DEFINE_PROP_INT32("idx", XenNetDev, dev, -1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c
index ffe3fc8dbe..6e0f96f485 100644
--- a/hw/net/xgmac.c
+++ b/hw/net/xgmac.c
@@ -414,7 +414,7 @@ static void xgmac_enet_realize(DeviceState *dev, Error **errp)
s->conf.macaddr.a[0];
}
-static Property xgmac_properties[] = {
+static const Property xgmac_properties[] = {
DEFINE_NIC_PROPERTIES(XgmacState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index faf27947b0..9d0c618e2f 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -996,7 +996,7 @@ static void xilinx_enet_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property xilinx_enet_properties[] = {
+static const Property xilinx_enet_properties[] = {
DEFINE_PROP_UINT32("phyaddr", XilinxAXIEnet, c_phyaddr, 7),
DEFINE_PROP_UINT32("rxmem", XilinxAXIEnet, c_rxmem, 0x1000),
DEFINE_PROP_UINT32("txmem", XilinxAXIEnet, c_txmem, 0x1000),
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
index bd81290808..9413731d20 100644
--- a/hw/net/xilinx_ethlite.c
+++ b/hw/net/xilinx_ethlite.c
@@ -251,7 +251,7 @@ static void xilinx_ethlite_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
}
-static Property xilinx_ethlite_properties[] = {
+static const Property xilinx_ethlite_properties[] = {
DEFINE_PROP_UINT32("tx-ping-pong", struct xlx_ethlite, c_tx_pingpong, 1),
DEFINE_PROP_UINT32("rx-ping-pong", struct xlx_ethlite, c_rx_pingpong, 1),
DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 41/71] hw/net: Constify all Property
2024-12-13 19:07 ` [PATCH 41/71] hw/net: " Richard Henderson
@ 2024-12-14 10:04 ` Cédric Le Goater
2024-12-19 8:25 ` Akihiko Odaki
1 sibling, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:04 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic, Jason Wang,
Edgar E. Iglesias, Alistair Francis, Pavel Pisa,
Francisco Iglesias, Vikram Garhwal, Dmitry Fleytman,
Akihiko Odaki, Stefan Weil, Bernhard Beschow, Steven Lee,
Troy Lee, Jamin Lin, Andrew Jeffery, Joel Stanley,
Sriram Yagnaraman, Helge Deller, Thomas Huth, Aleksandar Rikalo,
Subbaraya Sundeep, Jan Kiszka, Tyrone Ting, Hao Wu, Max Filippov,
Jiri Pirko, Nicholas Piggin, Daniel Henrique Barboza,
Harsh Prateek Bora, Sven Schnelle, Michael S. Tsirkin,
Stefano Stabellini, Anthony PERARD, Paul Durrant, Rob Herring,
open list:Allwinner-a10, open list:e500, open list:X86 Xen CPUs
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/net/allwinner-sun8i-emac.c | 2 +-
> hw/net/allwinner_emac.c | 2 +-
> hw/net/cadence_gem.c | 2 +-
> hw/net/can/xlnx-versal-canfd.c | 2 +-
> hw/net/can/xlnx-zynqmp-can.c | 2 +-
> hw/net/dp8393x.c | 2 +-
> hw/net/e1000.c | 2 +-
> hw/net/e1000e.c | 2 +-
> hw/net/eepro100.c | 2 +-
> hw/net/fsl_etsec/etsec.c | 2 +-
> hw/net/ftgmac100.c | 4 ++--
> hw/net/igb.c | 2 +-
> hw/net/imx_fec.c | 2 +-
> hw/net/lan9118.c | 2 +-
> hw/net/lance.c | 2 +-
> hw/net/lasi_i82596.c | 2 +-
> hw/net/mcf_fec.c | 2 +-
> hw/net/mipsnet.c | 2 +-
> hw/net/msf2-emac.c | 2 +-
> hw/net/mv88w8618_eth.c | 2 +-
> hw/net/ne2000-isa.c | 2 +-
> hw/net/ne2000-pci.c | 2 +-
> hw/net/npcm7xx_emc.c | 2 +-
> hw/net/npcm_gmac.c | 2 +-
> hw/net/opencores_eth.c | 2 +-
> hw/net/pcnet-pci.c | 2 +-
> hw/net/rocker/rocker.c | 2 +-
> hw/net/rtl8139.c | 2 +-
> hw/net/smc91c111.c | 2 +-
> hw/net/spapr_llan.c | 2 +-
> hw/net/stellaris_enet.c | 2 +-
> hw/net/sungem.c | 2 +-
> hw/net/sunhme.c | 2 +-
> hw/net/tulip.c | 2 +-
> hw/net/virtio-net.c | 2 +-
> hw/net/vmxnet3.c | 2 +-
> hw/net/xen_nic.c | 2 +-
> hw/net/xgmac.c | 2 +-
> hw/net/xilinx_axienet.c | 2 +-
> hw/net/xilinx_ethlite.c | 2 +-
> 40 files changed, 41 insertions(+), 41 deletions(-)
For the ftgmac100,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c
> index cdae74f503..3f03060bf5 100644
> --- a/hw/net/allwinner-sun8i-emac.c
> +++ b/hw/net/allwinner-sun8i-emac.c
> @@ -829,7 +829,7 @@ static void allwinner_sun8i_emac_realize(DeviceState *dev, Error **errp)
> qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
> }
>
> -static Property allwinner_sun8i_emac_properties[] = {
> +static const Property allwinner_sun8i_emac_properties[] = {
> DEFINE_NIC_PROPERTIES(AwSun8iEmacState, conf),
> DEFINE_PROP_UINT8("phy-addr", AwSun8iEmacState, mii_phy_addr, 0),
> DEFINE_PROP_LINK("dma-memory", AwSun8iEmacState, dma_mr,
> diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
> index c104c2588e..39c10426cf 100644
> --- a/hw/net/allwinner_emac.c
> +++ b/hw/net/allwinner_emac.c
> @@ -462,7 +462,7 @@ static void aw_emac_realize(DeviceState *dev, Error **errp)
> fifo8_create(&s->tx_fifo[1], TX_FIFO_SIZE);
> }
>
> -static Property aw_emac_properties[] = {
> +static const Property aw_emac_properties[] = {
> DEFINE_NIC_PROPERTIES(AwEmacState, conf),
> DEFINE_PROP_UINT8("phy-addr", AwEmacState, phy_addr, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
> index 526739887c..3fce01315f 100644
> --- a/hw/net/cadence_gem.c
> +++ b/hw/net/cadence_gem.c
> @@ -1784,7 +1784,7 @@ static const VMStateDescription vmstate_cadence_gem = {
> }
> };
>
> -static Property gem_properties[] = {
> +static const Property gem_properties[] = {
> DEFINE_NIC_PROPERTIES(CadenceGEMState, conf),
> DEFINE_PROP_UINT32("revision", CadenceGEMState, revision,
> GEM_MODID_VALUE),
> diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c
> index e148bd7b46..97fa46c4b3 100644
> --- a/hw/net/can/xlnx-versal-canfd.c
> +++ b/hw/net/can/xlnx-versal-canfd.c
> @@ -2042,7 +2042,7 @@ static const VMStateDescription vmstate_canfd = {
> }
> };
>
> -static Property canfd_core_properties[] = {
> +static const Property canfd_core_properties[] = {
> DEFINE_PROP_UINT8("rx-fifo0", XlnxVersalCANFDState, cfg.rx0_fifo, 0x40),
> DEFINE_PROP_UINT8("rx-fifo1", XlnxVersalCANFDState, cfg.rx1_fifo, 0x40),
> DEFINE_PROP_UINT8("tx-fifo", XlnxVersalCANFDState, cfg.tx_fifo, 0x20),
> diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
> index 58f1432bb3..61c104c18b 100644
> --- a/hw/net/can/xlnx-zynqmp-can.c
> +++ b/hw/net/can/xlnx-zynqmp-can.c
> @@ -1169,7 +1169,7 @@ static const VMStateDescription vmstate_can = {
> }
> };
>
> -static Property xlnx_zynqmp_can_properties[] = {
> +static const Property xlnx_zynqmp_can_properties[] = {
> DEFINE_PROP_UINT32("ext_clk_freq", XlnxZynqMPCANState, cfg.ext_clk_freq,
> CAN_DEFAULT_CLOCK),
> DEFINE_PROP_LINK("canbus", XlnxZynqMPCANState, canbus, TYPE_CAN_BUS,
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index c0977308ba..e3ca11991b 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -931,7 +931,7 @@ static const VMStateDescription vmstate_dp8393x = {
> }
> };
>
> -static Property dp8393x_properties[] = {
> +static const Property dp8393x_properties[] = {
> DEFINE_NIC_PROPERTIES(dp8393xState, conf),
> DEFINE_PROP_LINK("dma_mr", dp8393xState, dma_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> diff --git a/hw/net/e1000.c b/hw/net/e1000.c
> index ab72236d18..ef0af31751 100644
> --- a/hw/net/e1000.c
> +++ b/hw/net/e1000.c
> @@ -1677,7 +1677,7 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Error **errp)
> e1000_flush_queue_timer, d);
> }
>
> -static Property e1000_properties[] = {
> +static const Property e1000_properties[] = {
> DEFINE_NIC_PROPERTIES(E1000State, conf),
> DEFINE_PROP_BIT("extra_mac_registers", E1000State,
> compat_flags, E1000_FLAG_MAC_BIT, true),
> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
> index 843892ce09..e2b7576f67 100644
> --- a/hw/net/e1000e.c
> +++ b/hw/net/e1000e.c
> @@ -661,7 +661,7 @@ static PropertyInfo e1000e_prop_disable_vnet,
> e1000e_prop_subsys_ven,
> e1000e_prop_subsys;
>
> -static Property e1000e_properties[] = {
> +static const Property e1000e_properties[] = {
> DEFINE_NIC_PROPERTIES(E1000EState, conf),
> DEFINE_PROP_SIGNED("disable_vnet_hdr", E1000EState, disable_vnet, false,
> e1000e_prop_disable_vnet, bool),
> diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
> index 20b22d8e49..b8cb8d5cf1 100644
> --- a/hw/net/eepro100.c
> +++ b/hw/net/eepro100.c
> @@ -2058,7 +2058,7 @@ static E100PCIDeviceInfo *eepro100_get_class(EEPRO100State *s)
> return eepro100_get_class_by_name(object_get_typename(OBJECT(s)));
> }
>
> -static Property e100_properties[] = {
> +static const Property e100_properties[] = {
> DEFINE_NIC_PROPERTIES(EEPRO100State, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
> index d8076e7be4..764be2c6a2 100644
> --- a/hw/net/fsl_etsec/etsec.c
> +++ b/hw/net/fsl_etsec/etsec.c
> @@ -414,7 +414,7 @@ static void etsec_instance_init(Object *obj)
> sysbus_init_irq(sbd, &etsec->err_irq);
> }
>
> -static Property etsec_properties[] = {
> +static const Property etsec_properties[] = {
> DEFINE_NIC_PROPERTIES(eTSEC, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c
> index 478356ee3e..4adc7fb10c 100644
> --- a/hw/net/ftgmac100.c
> +++ b/hw/net/ftgmac100.c
> @@ -1254,7 +1254,7 @@ static const VMStateDescription vmstate_ftgmac100 = {
> }
> };
>
> -static Property ftgmac100_properties[] = {
> +static const Property ftgmac100_properties[] = {
> DEFINE_PROP_BOOL("aspeed", FTGMAC100State, aspeed, false),
> DEFINE_NIC_PROPERTIES(FTGMAC100State, conf),
> DEFINE_PROP_BOOL("dma64", FTGMAC100State, dma64, false),
> @@ -1415,7 +1415,7 @@ static const VMStateDescription vmstate_aspeed_mii = {
> }
> };
>
> -static Property aspeed_mii_properties[] = {
> +static const Property aspeed_mii_properties[] = {
> DEFINE_PROP_LINK("nic", AspeedMiiState, nic, TYPE_FTGMAC100,
> FTGMAC100State *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/net/igb.c b/hw/net/igb.c
> index b92bba402e..ad0f748d82 100644
> --- a/hw/net/igb.c
> +++ b/hw/net/igb.c
> @@ -591,7 +591,7 @@ static const VMStateDescription igb_vmstate = {
> }
> };
>
> -static Property igb_properties[] = {
> +static const Property igb_properties[] = {
> DEFINE_NIC_PROPERTIES(IGBState, conf),
> DEFINE_PROP_BOOL("x-pcie-flr-init", IGBState, has_flr, true),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
> index 4ee6f74206..9b64968477 100644
> --- a/hw/net/imx_fec.c
> +++ b/hw/net/imx_fec.c
> @@ -1222,7 +1222,7 @@ static void imx_eth_realize(DeviceState *dev, Error **errp)
> qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
> }
>
> -static Property imx_eth_properties[] = {
> +static const Property imx_eth_properties[] = {
> DEFINE_NIC_PROPERTIES(IMXFECState, conf),
> DEFINE_PROP_UINT32("tx-ring-num", IMXFECState, tx_ring_num, 1),
> DEFINE_PROP_UINT32("phy-num", IMXFECState, phy_num, 0),
> diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
> index 99e87b7178..237e9b97d5 100644
> --- a/hw/net/lan9118.c
> +++ b/hw/net/lan9118.c
> @@ -1304,7 +1304,7 @@ static void lan9118_realize(DeviceState *dev, Error **errp)
> ptimer_transaction_commit(s->timer);
> }
>
> -static Property lan9118_properties[] = {
> +static const Property lan9118_properties[] = {
> DEFINE_NIC_PROPERTIES(lan9118_state, conf),
> DEFINE_PROP_UINT32("mode_16bit", lan9118_state, mode_16bit, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/net/lance.c b/hw/net/lance.c
> index 269615b452..9ed9c94cff 100644
> --- a/hw/net/lance.c
> +++ b/hw/net/lance.c
> @@ -137,7 +137,7 @@ static void lance_instance_init(Object *obj)
> DEVICE(obj));
> }
>
> -static Property lance_properties[] = {
> +static const Property lance_properties[] = {
> DEFINE_PROP_LINK("dma", SysBusPCNetState, state.dma_opaque,
> TYPE_DEVICE, DeviceState *),
> DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf),
> diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c
> index 183fab8712..248e3841db 100644
> --- a/hw/net/lasi_i82596.c
> +++ b/hw/net/lasi_i82596.c
> @@ -158,7 +158,7 @@ static void lasi_82596_instance_init(Object *obj)
> DEVICE(obj));
> }
>
> -static Property lasi_82596_properties[] = {
> +static const Property lasi_82596_properties[] = {
> DEFINE_NIC_PROPERTIES(SysBusI82596State, state.conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
> index 037cd2028e..55bad4c069 100644
> --- a/hw/net/mcf_fec.c
> +++ b/hw/net/mcf_fec.c
> @@ -660,7 +660,7 @@ static void mcf_fec_instance_init(Object *obj)
> }
> }
>
> -static Property mcf_fec_properties[] = {
> +static const Property mcf_fec_properties[] = {
> DEFINE_NIC_PROPERTIES(mcf_fec_state, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
> index 31bbd6fb89..c9ef1beb7b 100644
> --- a/hw/net/mipsnet.c
> +++ b/hw/net/mipsnet.c
> @@ -266,7 +266,7 @@ static void mipsnet_sysbus_reset(DeviceState *dev)
> mipsnet_reset(s);
> }
>
> -static Property mipsnet_properties[] = {
> +static const Property mipsnet_properties[] = {
> DEFINE_NIC_PROPERTIES(MIPSnetState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c
> index d28fc6c570..8d9015f962 100644
> --- a/hw/net/msf2-emac.c
> +++ b/hw/net/msf2-emac.c
> @@ -546,7 +546,7 @@ static void msf2_emac_init(Object *obj)
> sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
> }
>
> -static Property msf2_emac_properties[] = {
> +static const Property msf2_emac_properties[] = {
> DEFINE_PROP_LINK("ahb-bus", MSF2EmacState, dma_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_NIC_PROPERTIES(MSF2EmacState, conf),
> diff --git a/hw/net/mv88w8618_eth.c b/hw/net/mv88w8618_eth.c
> index 96c65f4d46..ccb11512db 100644
> --- a/hw/net/mv88w8618_eth.c
> +++ b/hw/net/mv88w8618_eth.c
> @@ -371,7 +371,7 @@ static const VMStateDescription mv88w8618_eth_vmsd = {
> }
> };
>
> -static Property mv88w8618_eth_properties[] = {
> +static const Property mv88w8618_eth_properties[] = {
> DEFINE_NIC_PROPERTIES(mv88w8618_eth_state, conf),
> DEFINE_PROP_LINK("dma-memory", mv88w8618_eth_state, dma_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
> index 26980e087e..1cd070d419 100644
> --- a/hw/net/ne2000-isa.c
> +++ b/hw/net/ne2000-isa.c
> @@ -79,7 +79,7 @@ static void isa_ne2000_realizefn(DeviceState *dev, Error **errp)
> qemu_format_nic_info_str(qemu_get_queue(s->nic), s->c.macaddr.a);
> }
>
> -static Property ne2000_isa_properties[] = {
> +static const Property ne2000_isa_properties[] = {
> DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300),
> DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9),
> DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c),
> diff --git a/hw/net/ne2000-pci.c b/hw/net/ne2000-pci.c
> index 74773069c6..12fa579d22 100644
> --- a/hw/net/ne2000-pci.c
> +++ b/hw/net/ne2000-pci.c
> @@ -96,7 +96,7 @@ static void ne2000_instance_init(Object *obj)
> &pci_dev->qdev);
> }
>
> -static Property ne2000_properties[] = {
> +static const Property ne2000_properties[] = {
> DEFINE_NIC_PROPERTIES(PCINE2000State, ne2000.c),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/npcm7xx_emc.c b/hw/net/npcm7xx_emc.c
> index 7307a13400..f06e908d04 100644
> --- a/hw/net/npcm7xx_emc.c
> +++ b/hw/net/npcm7xx_emc.c
> @@ -845,7 +845,7 @@ static const VMStateDescription vmstate_npcm7xx_emc = {
> },
> };
>
> -static Property npcm7xx_emc_properties[] = {
> +static const Property npcm7xx_emc_properties[] = {
> DEFINE_NIC_PROPERTIES(NPCM7xxEMCState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c
> index 685905f9e2..1db29307d7 100644
> --- a/hw/net/npcm_gmac.c
> +++ b/hw/net/npcm_gmac.c
> @@ -912,7 +912,7 @@ static const VMStateDescription vmstate_npcm_gmac = {
> },
> };
>
> -static Property npcm_gmac_properties[] = {
> +static const Property npcm_gmac_properties[] = {
> DEFINE_NIC_PROPERTIES(NPCMGMACState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c
> index 2c0ebda100..003b452bc9 100644
> --- a/hw/net/opencores_eth.c
> +++ b/hw/net/opencores_eth.c
> @@ -743,7 +743,7 @@ static void qdev_open_eth_reset(DeviceState *dev)
> open_eth_reset(d);
> }
>
> -static Property open_eth_properties[] = {
> +static const Property open_eth_properties[] = {
> DEFINE_NIC_PROPERTIES(OpenEthState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
> index 6190b76916..83ba8cd949 100644
> --- a/hw/net/pcnet-pci.c
> +++ b/hw/net/pcnet-pci.c
> @@ -252,7 +252,7 @@ static void pcnet_instance_init(Object *obj)
> DEVICE(obj));
> }
>
> -static Property pcnet_properties[] = {
> +static const Property pcnet_properties[] = {
> DEFINE_NIC_PROPERTIES(PCIPCNetState, state.conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
> index 5e74acc969..efc20396aa 100644
> --- a/hw/net/rocker/rocker.c
> +++ b/hw/net/rocker/rocker.c
> @@ -1459,7 +1459,7 @@ static void rocker_reset(DeviceState *dev)
> DPRINTF("Reset done\n");
> }
>
> -static Property rocker_properties[] = {
> +static const Property rocker_properties[] = {
> DEFINE_PROP_STRING("name", Rocker, name),
> DEFINE_PROP_STRING("world", Rocker, world_name),
> DEFINE_PROP_MACADDR("fp_start_macaddr", Rocker,
> diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
> index bc56075c0d..064a73b6b4 100644
> --- a/hw/net/rtl8139.c
> +++ b/hw/net/rtl8139.c
> @@ -3410,7 +3410,7 @@ static void rtl8139_instance_init(Object *obj)
> DEVICE(obj));
> }
>
> -static Property rtl8139_properties[] = {
> +static const Property rtl8139_properties[] = {
> DEFINE_NIC_PROPERTIES(RTL8139State, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
> index 180ba5c791..a853c30fa2 100644
> --- a/hw/net/smc91c111.c
> +++ b/hw/net/smc91c111.c
> @@ -788,7 +788,7 @@ static void smc91c111_realize(DeviceState *dev, Error **errp)
> /* ??? Save/restore. */
> }
>
> -static Property smc91c111_properties[] = {
> +static const Property smc91c111_properties[] = {
> DEFINE_NIC_PROPERTIES(smc91c111_state, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
> index 8af33d91b6..d381c041db 100644
> --- a/hw/net/spapr_llan.c
> +++ b/hw/net/spapr_llan.c
> @@ -786,7 +786,7 @@ static target_ulong h_change_logical_lan_mac(PowerPCCPU *cpu,
> return H_SUCCESS;
> }
>
> -static Property spapr_vlan_properties[] = {
> +static const Property spapr_vlan_properties[] = {
> DEFINE_SPAPR_PROPERTIES(SpaprVioVlan, sdev),
> DEFINE_NIC_PROPERTIES(SpaprVioVlan, nicconf),
> DEFINE_PROP_BIT("use-rx-buffer-pools", SpaprVioVlan,
> diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
> index 9ebff296c4..4af1afa733 100644
> --- a/hw/net/stellaris_enet.c
> +++ b/hw/net/stellaris_enet.c
> @@ -497,7 +497,7 @@ static void stellaris_enet_realize(DeviceState *dev, Error **errp)
> qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
> }
>
> -static Property stellaris_enet_properties[] = {
> +static const Property stellaris_enet_properties[] = {
> DEFINE_NIC_PROPERTIES(stellaris_enet_state, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/sungem.c b/hw/net/sungem.c
> index 67087e9842..bcc7a18382 100644
> --- a/hw/net/sungem.c
> +++ b/hw/net/sungem.c
> @@ -1420,7 +1420,7 @@ static void sungem_instance_init(Object *obj)
> DEVICE(obj));
> }
>
> -static Property sungem_properties[] = {
> +static const Property sungem_properties[] = {
> DEFINE_NIC_PROPERTIES(SunGEMState, conf),
> /* Phy address should be 0 for most Apple machines except
> * for K2 in which case it's 1. Will be set by a machine
> diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c
> index 0e6c655a5b..86f472fcbe 100644
> --- a/hw/net/sunhme.c
> +++ b/hw/net/sunhme.c
> @@ -177,7 +177,7 @@ struct SunHMEState {
> uint16_t miiregs[HME_MII_REGS_SIZE];
> };
>
> -static Property sunhme_properties[] = {
> +static const Property sunhme_properties[] = {
> DEFINE_NIC_PROPERTIES(SunHMEState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/tulip.c b/hw/net/tulip.c
> index 9df3e17162..f35b58a88c 100644
> --- a/hw/net/tulip.c
> +++ b/hw/net/tulip.c
> @@ -1007,7 +1007,7 @@ static void tulip_instance_init(Object *obj)
> &pci_dev->qdev);
> }
>
> -static Property tulip_properties[] = {
> +static const Property tulip_properties[] = {
> DEFINE_NIC_PROPERTIES(TULIPState, c),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 6e8c51a2db..4fd1f9acca 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -3985,7 +3985,7 @@ static const VMStateDescription vmstate_virtio_net = {
> .dev_unplug_pending = dev_unplug_pending,
> };
>
> -static Property virtio_net_properties[] = {
> +static const Property virtio_net_properties[] = {
> DEFINE_PROP_BIT64("csum", VirtIONet, host_features,
> VIRTIO_NET_F_CSUM, true),
> DEFINE_PROP_BIT64("guest_csum", VirtIONet, host_features,
> diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> index 8aa8c46228..f69547cad5 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -2471,7 +2471,7 @@ static const VMStateDescription vmstate_vmxnet3 = {
> }
> };
>
> -static Property vmxnet3_properties[] = {
> +static const Property vmxnet3_properties[] = {
> DEFINE_NIC_PROPERTIES(VMXNET3State, conf),
> DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags,
> VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false),
> diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c
> index 89487b49ba..5a5259150a 100644
> --- a/hw/net/xen_nic.c
> +++ b/hw/net/xen_nic.c
> @@ -555,7 +555,7 @@ static void xen_netdev_unrealize(XenDevice *xendev)
>
> /* ------------------------------------------------------------- */
>
> -static Property xen_netdev_properties[] = {
> +static const Property xen_netdev_properties[] = {
> DEFINE_NIC_PROPERTIES(XenNetDev, conf),
> DEFINE_PROP_INT32("idx", XenNetDev, dev, -1),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c
> index ffe3fc8dbe..6e0f96f485 100644
> --- a/hw/net/xgmac.c
> +++ b/hw/net/xgmac.c
> @@ -414,7 +414,7 @@ static void xgmac_enet_realize(DeviceState *dev, Error **errp)
> s->conf.macaddr.a[0];
> }
>
> -static Property xgmac_properties[] = {
> +static const Property xgmac_properties[] = {
> DEFINE_NIC_PROPERTIES(XgmacState, conf),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
> index faf27947b0..9d0c618e2f 100644
> --- a/hw/net/xilinx_axienet.c
> +++ b/hw/net/xilinx_axienet.c
> @@ -996,7 +996,7 @@ static void xilinx_enet_init(Object *obj)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property xilinx_enet_properties[] = {
> +static const Property xilinx_enet_properties[] = {
> DEFINE_PROP_UINT32("phyaddr", XilinxAXIEnet, c_phyaddr, 7),
> DEFINE_PROP_UINT32("rxmem", XilinxAXIEnet, c_rxmem, 0x1000),
> DEFINE_PROP_UINT32("txmem", XilinxAXIEnet, c_txmem, 0x1000),
> diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
> index bd81290808..9413731d20 100644
> --- a/hw/net/xilinx_ethlite.c
> +++ b/hw/net/xilinx_ethlite.c
> @@ -251,7 +251,7 @@ static void xilinx_ethlite_init(Object *obj)
> sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
> }
>
> -static Property xilinx_ethlite_properties[] = {
> +static const Property xilinx_ethlite_properties[] = {
> DEFINE_PROP_UINT32("tx-ping-pong", struct xlx_ethlite, c_tx_pingpong, 1),
> DEFINE_PROP_UINT32("rx-ping-pong", struct xlx_ethlite, c_rx_pingpong, 1),
> DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf),
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 41/71] hw/net: Constify all Property
2024-12-13 19:07 ` [PATCH 41/71] hw/net: " Richard Henderson
2024-12-14 10:04 ` Cédric Le Goater
@ 2024-12-19 8:25 ` Akihiko Odaki
1 sibling, 0 replies; 124+ messages in thread
From: Akihiko Odaki @ 2024-12-19 8:25 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic, Jason Wang,
Edgar E. Iglesias, Alistair Francis, Pavel Pisa,
Francisco Iglesias, Vikram Garhwal, Dmitry Fleytman, Stefan Weil,
Bernhard Beschow, Cédric Le Goater, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley, Sriram Yagnaraman,
Helge Deller, Thomas Huth, Aleksandar Rikalo, Subbaraya Sundeep,
Jan Kiszka, Tyrone Ting, Hao Wu, Max Filippov, Jiri Pirko,
Nicholas Piggin, Daniel Henrique Barboza, Harsh Prateek Bora,
Sven Schnelle, Michael S. Tsirkin, Stefano Stabellini,
Anthony PERARD, Paul Durrant, Rob Herring,
open list:Allwinner-a10, open list:e500, open list:X86 Xen CPUs
On 2024/12/14 4:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 42/71] hw/nubus: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (44 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 41/71] hw/net: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 43/71] hw/nvme: " Richard Henderson
` (26 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/nubus/nubus-bridge.c | 2 +-
hw/nubus/nubus-device.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/nubus/nubus-bridge.c b/hw/nubus/nubus-bridge.c
index a42c86080f..83893e5a46 100644
--- a/hw/nubus/nubus-bridge.c
+++ b/hw/nubus/nubus-bridge.c
@@ -23,7 +23,7 @@ static void nubus_bridge_init(Object *obj)
qdev_init_gpio_out(DEVICE(s), bus->irqs, NUBUS_IRQS);
}
-static Property nubus_bridge_properties[] = {
+static const Property nubus_bridge_properties[] = {
DEFINE_PROP_UINT16("slot-available-mask", NubusBridge,
bus.slot_available_mask, 0xffff),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/nubus/nubus-device.c b/hw/nubus/nubus-device.c
index 26fbcf29a2..7cafc13427 100644
--- a/hw/nubus/nubus-device.c
+++ b/hw/nubus/nubus-device.c
@@ -107,7 +107,7 @@ static void nubus_device_realize(DeviceState *dev, Error **errp)
}
}
-static Property nubus_device_properties[] = {
+static const Property nubus_device_properties[] = {
DEFINE_PROP_INT32("slot", NubusDevice, slot, -1),
DEFINE_PROP_STRING("romfile", NubusDevice, romfile),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 43/71] hw/nvme: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (45 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 42/71] hw/nubus: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 44/71] hw/nvram: " Richard Henderson
` (25 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Keith Busch, Klaus Jensen, Jesper Devantier, open list:nvme
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/nvme/ctrl.c | 2 +-
hw/nvme/ns.c | 2 +-
hw/nvme/subsys.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index ec75419566..33a3062466 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -8927,7 +8927,7 @@ static void nvme_exit(PCIDevice *pci_dev)
memory_region_del_subregion(&n->bar0, &n->iomem);
}
-static Property nvme_props[] = {
+static const Property nvme_props[] = {
DEFINE_BLOCK_PROPERTIES(NvmeCtrl, namespace.blkconf),
DEFINE_PROP_LINK("pmrdev", NvmeCtrl, pmr.dev, TYPE_MEMORY_BACKEND,
HostMemoryBackend *),
diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
index 526e15aa80..192b80f18d 100644
--- a/hw/nvme/ns.c
+++ b/hw/nvme/ns.c
@@ -799,7 +799,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
nvme_attach_ns(n, ns);
}
-static Property nvme_ns_props[] = {
+static const Property nvme_ns_props[] = {
DEFINE_BLOCK_PROPERTIES(NvmeNamespace, blkconf),
DEFINE_PROP_BOOL("detached", NvmeNamespace, params.detached, false),
DEFINE_PROP_BOOL("shared", NvmeNamespace, params.shared, true),
diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c
index 77deaf2c2c..3171c3888c 100644
--- a/hw/nvme/subsys.c
+++ b/hw/nvme/subsys.c
@@ -216,7 +216,7 @@ static void nvme_subsys_realize(DeviceState *dev, Error **errp)
nvme_subsys_setup(subsys, errp);
}
-static Property nvme_subsystem_props[] = {
+static const Property nvme_subsystem_props[] = {
DEFINE_PROP_STRING("nqn", NvmeSubsystem, params.nqn),
DEFINE_PROP_BOOL("fdp", NvmeSubsystem, params.fdp.enabled, false),
DEFINE_PROP_SIZE("fdp.runs", NvmeSubsystem, params.fdp.runs,
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 44/71] hw/nvram: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (46 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 43/71] hw/nvme: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 45/71] hw/pci-bridge: " Richard Henderson
` (24 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo,
Philippe Mathieu-Daudé, Gerd Hoffmann, Mark Cave-Ayland,
Joel Stanley, Peter Maydell, Nicholas Piggin,
Daniel Henrique Barboza, Harsh Prateek Bora, Alistair Francis,
Edgar E. Iglesias, open list:New World (mac99), open list:NRF51
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/nvram/ds1225y.c | 2 +-
hw/nvram/eeprom_at24c.c | 2 +-
hw/nvram/fw_cfg.c | 6 +++---
hw/nvram/mac_nvram.c | 2 +-
hw/nvram/nrf51_nvm.c | 2 +-
hw/nvram/spapr_nvram.c | 2 +-
hw/nvram/xlnx-bbram.c | 2 +-
hw/nvram/xlnx-efuse.c | 2 +-
hw/nvram/xlnx-versal-efuse-cache.c | 2 +-
hw/nvram/xlnx-versal-efuse-ctrl.c | 2 +-
hw/nvram/xlnx-zynqmp-efuse.c | 2 +-
11 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index 6d510dcc68..19bf8d2091 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -142,7 +142,7 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
nvram_post_load(s, 0);
}
-static Property nvram_sysbus_properties[] = {
+static const Property nvram_sysbus_properties[] = {
DEFINE_PROP_UINT32("size", SysBusNvRamState, nvram.chip_size, 0x2000),
DEFINE_PROP_STRING("filename", SysBusNvRamState, nvram.filename),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index ec748e58e7..669920b2b9 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -234,7 +234,7 @@ void at24c_eeprom_reset(DeviceState *state)
ee->haveaddr = 0;
}
-static Property at24c_eeprom_props[] = {
+static const Property at24c_eeprom_props[] = {
DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 0),
DEFINE_PROP_UINT8("address-size", EEPROMState, asize, 0),
DEFINE_PROP_BOOL("writable", EEPROMState, writable, true),
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index b644577734..fe73a2c1ef 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -1103,7 +1103,7 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data)
qemu_register_reset(fw_cfg_machine_reset, s);
}
-static Property fw_cfg_properties[] = {
+static const Property fw_cfg_properties[] = {
DEFINE_PROP_BOOL("acpi-mr-restore", FWCfgState, acpi_mr_restore, true),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1294,7 +1294,7 @@ static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
s->entry_order = g_new0(int, fw_cfg_max_entry(s));
}
-static Property fw_cfg_io_properties[] = {
+static const Property fw_cfg_io_properties[] = {
DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled,
true),
DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
@@ -1343,7 +1343,7 @@ static const TypeInfo fw_cfg_io_info = {
};
-static Property fw_cfg_mem_properties[] = {
+static const Property fw_cfg_mem_properties[] = {
DEFINE_PROP_UINT32("data_width", FWCfgMemState, data_width, -1),
DEFINE_PROP_BOOL("dma_enabled", FWCfgMemState, parent_obj.dma_enabled,
true),
diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c
index e47e52a677..d62ad719c8 100644
--- a/hw/nvram/mac_nvram.c
+++ b/hw/nvram/mac_nvram.c
@@ -134,7 +134,7 @@ static void macio_nvram_unrealizefn(DeviceState *dev)
g_free(s->data);
}
-static Property macio_nvram_properties[] = {
+static const Property macio_nvram_properties[] = {
DEFINE_PROP_UINT32("size", MacIONVRAMState, size, 0),
DEFINE_PROP_UINT32("it_shift", MacIONVRAMState, it_shift, 0),
DEFINE_PROP_DRIVE("drive", MacIONVRAMState, blk),
diff --git a/hw/nvram/nrf51_nvm.c b/hw/nvram/nrf51_nvm.c
index b1f81752a3..236049462b 100644
--- a/hw/nvram/nrf51_nvm.c
+++ b/hw/nvram/nrf51_nvm.c
@@ -354,7 +354,7 @@ static void nrf51_nvm_reset(DeviceState *dev)
memset(s->uicr_content, 0xFF, sizeof(s->uicr_content));
}
-static Property nrf51_nvm_properties[] = {
+static const Property nrf51_nvm_properties[] = {
DEFINE_PROP_UINT32("flash-size", NRF51NVMState, flash_size, 0x40000),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index bfd8aa367e..2251ff2f4c 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -252,7 +252,7 @@ static const VMStateDescription vmstate_spapr_nvram = {
},
};
-static Property spapr_nvram_properties[] = {
+static const Property spapr_nvram_properties[] = {
DEFINE_SPAPR_PROPERTIES(SpaprNvram, sdev),
DEFINE_PROP_DRIVE("drive", SpaprNvram, blk),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c
index 1bc58e90ad..4fa528f048 100644
--- a/hw/nvram/xlnx-bbram.c
+++ b/hw/nvram/xlnx-bbram.c
@@ -520,7 +520,7 @@ static const VMStateDescription vmstate_bbram_ctrl = {
}
};
-static Property bbram_ctrl_props[] = {
+static const Property bbram_ctrl_props[] = {
DEFINE_PROP("drive", XlnxBBRam, blk, bbram_prop_drive, BlockBackend *),
DEFINE_PROP_UINT32("crc-zpads", XlnxBBRam, crc_zpads, 1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c
index f7b849f7de..5dae9e8e9a 100644
--- a/hw/nvram/xlnx-efuse.c
+++ b/hw/nvram/xlnx-efuse.c
@@ -265,7 +265,7 @@ static const PropertyInfo efuse_prop_drive = {
.release = efuse_prop_release_drive,
};
-static Property efuse_properties[] = {
+static const Property efuse_properties[] = {
DEFINE_PROP("drive", XlnxEFuse, blk, efuse_prop_drive, BlockBackend *),
DEFINE_PROP_UINT8("efuse-nr", XlnxEFuse, efuse_nr, 3),
DEFINE_PROP_UINT32("efuse-size", XlnxEFuse, efuse_size, 64 * 32),
diff --git a/hw/nvram/xlnx-versal-efuse-cache.c b/hw/nvram/xlnx-versal-efuse-cache.c
index eaec64d785..1aea27afd3 100644
--- a/hw/nvram/xlnx-versal-efuse-cache.c
+++ b/hw/nvram/xlnx-versal-efuse-cache.c
@@ -83,7 +83,7 @@ static void efuse_cache_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property efuse_cache_props[] = {
+static const Property efuse_cache_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxVersalEFuseCache, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),
diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse-ctrl.c
index 8252a5cabe..599aa126fb 100644
--- a/hw/nvram/xlnx-versal-efuse-ctrl.c
+++ b/hw/nvram/xlnx-versal-efuse-ctrl.c
@@ -743,7 +743,7 @@ static const VMStateDescription vmstate_efuse_ctrl = {
}
};
-static Property efuse_ctrl_props[] = {
+static const Property efuse_ctrl_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxVersalEFuseCtrl, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),
diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c
index 4e2d1b9d1e..af53187905 100644
--- a/hw/nvram/xlnx-zynqmp-efuse.c
+++ b/hw/nvram/xlnx-zynqmp-efuse.c
@@ -833,7 +833,7 @@ static const VMStateDescription vmstate_efuse = {
}
};
-static Property zynqmp_efuse_props[] = {
+static const Property zynqmp_efuse_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxZynqMPEFuse, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 45/71] hw/pci-bridge: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (47 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 44/71] hw/nvram: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 46/71] hw/pci-host/astro: Remove empty Property list Richard Henderson
` (23 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael S. Tsirkin, Marcel Apfelbaum
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/pci-bridge/cxl_downstream.c | 2 +-
hw/pci-bridge/cxl_root_port.c | 2 +-
hw/pci-bridge/cxl_upstream.c | 2 +-
hw/pci-bridge/gen_pcie_root_port.c | 2 +-
hw/pci-bridge/pci_bridge_dev.c | 2 +-
hw/pci-bridge/pci_expander_bridge.c | 4 ++--
hw/pci-bridge/pcie_pci_bridge.c | 2 +-
hw/pci-bridge/pcie_root_port.c | 2 +-
hw/pci-bridge/xio3130_downstream.c | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/pci-bridge/cxl_downstream.c b/hw/pci-bridge/cxl_downstream.c
index c347ac06f3..cfe50e60e9 100644
--- a/hw/pci-bridge/cxl_downstream.c
+++ b/hw/pci-bridge/cxl_downstream.c
@@ -212,7 +212,7 @@ static void cxl_dsp_exitfn(PCIDevice *d)
pci_bridge_exitfn(d);
}
-static Property cxl_dsp_props[] = {
+static const Property cxl_dsp_props[] = {
DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot,
speed, PCIE_LINK_SPEED_64),
DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_port.c
index 5e2156d7ba..5824ba3c75 100644
--- a/hw/pci-bridge/cxl_root_port.c
+++ b/hw/pci-bridge/cxl_root_port.c
@@ -199,7 +199,7 @@ static void cxl_rp_reset_hold(Object *obj, ResetType type)
latch_registers(crp);
}
-static Property gen_rp_props[] = {
+static const Property gen_rp_props[] = {
DEFINE_PROP_UINT32("bus-reserve", CXLRootPort, res_reserve.bus, -1),
DEFINE_PROP_SIZE("io-reserve", CXLRootPort, res_reserve.io, -1),
DEFINE_PROP_SIZE("mem-reserve", CXLRootPort, res_reserve.mem_non_pref, -1),
diff --git a/hw/pci-bridge/cxl_upstream.c b/hw/pci-bridge/cxl_upstream.c
index 55f8b0053f..ef94aa3654 100644
--- a/hw/pci-bridge/cxl_upstream.c
+++ b/hw/pci-bridge/cxl_upstream.c
@@ -362,7 +362,7 @@ static void cxl_usp_exitfn(PCIDevice *d)
pci_bridge_exitfn(d);
}
-static Property cxl_upstream_props[] = {
+static const Property cxl_upstream_props[] = {
DEFINE_PROP_UINT64("sn", CXLUpstreamPort, sn, UI64_NULL),
DEFINE_PROP_STRING("cdat", CXLUpstreamPort, cxl_cstate.cdat.filename),
DEFINE_PROP_PCIE_LINK_SPEED("x-speed", CXLUpstreamPort,
diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
index 784507c826..c319ca8263 100644
--- a/hw/pci-bridge/gen_pcie_root_port.c
+++ b/hw/pci-bridge/gen_pcie_root_port.c
@@ -128,7 +128,7 @@ static const VMStateDescription vmstate_rp_dev = {
}
};
-static Property gen_rp_props[] = {
+static const Property gen_rp_props[] = {
DEFINE_PROP_BOOL("x-migrate-msix", GenPCIERootPort,
migrate_msix, true),
DEFINE_PROP_UINT32("bus-reserve", GenPCIERootPort,
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 8e7f926621..35a37e056a 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -168,7 +168,7 @@ static void qdev_pci_bridge_dev_reset(DeviceState *qdev)
}
}
-static Property pci_bridge_dev_properties[] = {
+static const Property pci_bridge_dev_properties[] = {
/* Note: 0 is not a legal chassis number. */
DEFINE_PROP_UINT8(PCI_BRIDGE_DEV_PROP_CHASSIS_NR, PCIBridgeDev, chassis_nr,
0),
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
index 07d411cff5..01997c1ab3 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -420,7 +420,7 @@ static void pxb_dev_exitfn(PCIDevice *pci_dev)
pxb_dev_list = g_list_remove(pxb_dev_list, pxb);
}
-static Property pxb_dev_properties[] = {
+static const Property pxb_dev_properties[] = {
/* Note: 0 is not a legal PXB bus number. */
DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
@@ -507,7 +507,7 @@ static void pxb_cxl_dev_realize(PCIDevice *dev, Error **errp)
pxb_cxl_dev_reset(DEVICE(dev));
}
-static Property pxb_cxl_dev_properties[] = {
+static const Property pxb_cxl_dev_properties[] = {
DEFINE_PROP_BOOL("hdm_for_passthrough", PXBCXLDev, hdm_for_passthrough, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c
index 6e8d7d9478..8834ff3dbf 100644
--- a/hw/pci-bridge/pcie_pci_bridge.c
+++ b/hw/pci-bridge/pcie_pci_bridge.c
@@ -124,7 +124,7 @@ static void pcie_pci_bridge_write_config(PCIDevice *d,
shpc_cap_write_config(d, address, val, len);
}
-static Property pcie_pci_bridge_dev_properties[] = {
+static const Property pcie_pci_bridge_dev_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("msi", PCIEPCIBridge, msi, ON_OFF_AUTO_AUTO),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c
index 09a34786bc..a7f87a1bc4 100644
--- a/hw/pci-bridge/pcie_root_port.c
+++ b/hw/pci-bridge/pcie_root_port.c
@@ -148,7 +148,7 @@ static void rp_exit(PCIDevice *d)
pci_bridge_exitfn(d);
}
-static Property rp_props[] = {
+static const Property rp_props[] = {
DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
QEMU_PCIE_SLTCAP_PCP_BITNR, true),
DEFINE_PROP_BOOL("disable-acs", PCIESlot, disable_acs, false),
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index 473e2dd950..92e5fb72ec 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -134,7 +134,7 @@ static void xio3130_downstream_exitfn(PCIDevice *d)
pci_bridge_exitfn(d);
}
-static Property xio3130_downstream_props[] = {
+static const Property xio3130_downstream_props[] = {
DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
QEMU_PCIE_SLTCAP_PCP_BITNR, true),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 46/71] hw/pci-host/astro: Remove empty Property list
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (48 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 45/71] hw/pci-bridge: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 47/71] hw/pci-host: Constify all Property Richard Henderson
` (22 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Helge Deller
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/pci-host/astro.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 379095b356..62e9c8acbf 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -461,10 +461,6 @@ static void elroy_pcihost_init(Object *obj)
qdev_init_gpio_in(DEVICE(obj), elroy_set_irq, ELROY_IRQS);
}
-static Property elroy_pcihost_properties[] = {
- DEFINE_PROP_END_OF_LIST(),
-};
-
static const VMStateDescription vmstate_elroy = {
.name = "Elroy",
.version_id = 1,
@@ -490,7 +486,6 @@ static void elroy_pcihost_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
device_class_set_legacy_reset(dc, elroy_reset);
- device_class_set_props(dc, elroy_pcihost_properties);
dc->vmsd = &vmstate_elroy;
dc->user_creatable = false;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 47/71] hw/pci-host: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (49 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 46/71] hw/pci-host/astro: Remove empty Property list Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 48/71] hw/pci: " Richard Henderson
` (21 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Helge Deller, Mark Cave-Ayland, Philippe Mathieu-Daudé,
Aurelien Jarno, Michael S. Tsirkin, Marcel Apfelbaum,
BALATON Zoltan, Nicholas Piggin, Frédéric Barrat,
Bernhard Beschow, Hervé Poussineau, Peter Maydell,
Paul Burton, Aleksandar Rikalo, open list:Old World (g3beige),
open list:Versatile PB
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/pci-host/dino.c | 2 +-
hw/pci-host/gpex.c | 2 +-
hw/pci-host/grackle.c | 2 +-
hw/pci-host/gt64120.c | 2 +-
hw/pci-host/i440fx.c | 2 +-
hw/pci-host/mv64361.c | 2 +-
hw/pci-host/pnv_phb.c | 4 ++--
hw/pci-host/pnv_phb3.c | 2 +-
hw/pci-host/pnv_phb4.c | 2 +-
hw/pci-host/pnv_phb4_pec.c | 2 +-
hw/pci-host/ppce500.c | 2 +-
hw/pci-host/q35.c | 4 ++--
hw/pci-host/raven.c | 2 +-
hw/pci-host/sabre.c | 2 +-
hw/pci-host/uninorth.c | 2 +-
hw/pci-host/versatile.c | 2 +-
hw/pci-host/xilinx-pcie.c | 2 +-
17 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/hw/pci-host/dino.c b/hw/pci-host/dino.c
index 283fc0dc57..ead9893f21 100644
--- a/hw/pci-host/dino.c
+++ b/hw/pci-host/dino.c
@@ -492,7 +492,7 @@ static void dino_pcihost_init(Object *obj)
qdev_init_gpio_in(DEVICE(obj), dino_set_irq, DINO_IRQS);
}
-static Property dino_pcihost_properties[] = {
+static const Property dino_pcihost_properties[] = {
DEFINE_PROP_LINK("memory-as", DinoState, memory_as, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c
index e9cf455bf5..8a955ca130 100644
--- a/hw/pci-host/gpex.c
+++ b/hw/pci-host/gpex.c
@@ -147,7 +147,7 @@ static const char *gpex_host_root_bus_path(PCIHostState *host_bridge,
return "0000:00";
}
-static Property gpex_host_properties[] = {
+static const Property gpex_host_properties[] = {
/*
* Permit CPU accesses to unmapped areas of the PIO and MMIO windows
* (discarding writes and returning -1 for reads) rather than aborting.
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 8e589ff2c9..d64de73774 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -129,7 +129,7 @@ static char *grackle_ofw_unit_address(const SysBusDevice *dev)
return g_strdup_printf("%x", s->ofw_addr);
}
-static Property grackle_properties[] = {
+static const Property grackle_properties[] = {
DEFINE_PROP_UINT32("ofw-addr", GrackleState, ofw_addr, -1),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/pci-host/gt64120.c b/hw/pci-host/gt64120.c
index 14fc803d27..3c73ebe83f 100644
--- a/hw/pci-host/gt64120.c
+++ b/hw/pci-host/gt64120.c
@@ -1274,7 +1274,7 @@ static const TypeInfo gt64120_pci_info = {
},
};
-static Property gt64120_properties[] = {
+static const Property gt64120_properties[] = {
DEFINE_PROP_BOOL("cpu-little-endian", GT64120State,
cpu_little_endian, false),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 4f0a0438d7..40780fbc52 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -353,7 +353,7 @@ static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
return "0000:00";
}
-static Property i440fx_props[] = {
+static const Property i440fx_props[] = {
DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
pci_hole64_size, I440FX_PCI_HOST_HOLE64_SIZE_DEFAULT),
DEFINE_PROP_SIZE(PCI_HOST_BELOW_4G_MEM_SIZE, I440FXState,
diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c
index 421c287eb0..2518d5abe6 100644
--- a/hw/pci-host/mv64361.c
+++ b/hw/pci-host/mv64361.c
@@ -98,7 +98,7 @@ static void mv64361_pcihost_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out(dev, s->irq, ARRAY_SIZE(s->irq));
}
-static Property mv64361_pcihost_props[] = {
+static const Property mv64361_pcihost_props[] = {
DEFINE_PROP_UINT8("index", MV64361PCIState, index, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-host/pnv_phb.c
index d4c118d443..888f0786a0 100644
--- a/hw/pci-host/pnv_phb.c
+++ b/hw/pci-host/pnv_phb.c
@@ -183,7 +183,7 @@ static const char *pnv_phb_root_bus_path(PCIHostState *host_bridge,
return phb->bus_path;
}
-static Property pnv_phb_properties[] = {
+static const Property pnv_phb_properties[] = {
DEFINE_PROP_UINT32("index", PnvPHB, phb_id, 0),
DEFINE_PROP_UINT32("chip-id", PnvPHB, chip_id, 0),
DEFINE_PROP_UINT32("version", PnvPHB, version, 0),
@@ -302,7 +302,7 @@ static void pnv_phb_root_port_realize(DeviceState *dev, Error **errp)
pci_config_set_interrupt_pin(pci->config, 0);
}
-static Property pnv_phb_root_port_properties[] = {
+static const Property pnv_phb_root_port_properties[] = {
DEFINE_PROP_UINT32("version", PnvPHBRootPort, version, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c
index 2a74dbe45f..529b33b5a2 100644
--- a/hw/pci-host/pnv_phb3.c
+++ b/hw/pci-host/pnv_phb3.c
@@ -1090,7 +1090,7 @@ void pnv_phb3_update_regions(PnvPHB3 *phb)
pnv_phb3_check_all_m64s(phb);
}
-static Property pnv_phb3_properties[] = {
+static const Property pnv_phb3_properties[] = {
DEFINE_PROP_UINT32("index", PnvPHB3, phb_id, 0),
DEFINE_PROP_UINT32("chip-id", PnvPHB3, chip_id, 0),
DEFINE_PROP_LINK("chip", PnvPHB3, chip, TYPE_PNV_CHIP, PnvChip *),
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index 99991008c1..482fe25803 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -1688,7 +1688,7 @@ static void pnv_phb4_xive_notify(XiveNotifier *xf, uint32_t srcno,
}
}
-static Property pnv_phb4_properties[] = {
+static const Property pnv_phb4_properties[] = {
DEFINE_PROP_UINT32("index", PnvPHB4, phb_id, 0),
DEFINE_PROP_UINT32("chip-id", PnvPHB4, chip_id, 0),
DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC,
diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c
index ce8e228f98..f8975403d3 100644
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -283,7 +283,7 @@ static int pnv_pec_dt_xscom(PnvXScomInterface *dev, void *fdt,
return 0;
}
-static Property pnv_pec_properties[] = {
+static const Property pnv_pec_properties[] = {
DEFINE_PROP_UINT32("index", PnvPhb4PecState, index, 0),
DEFINE_PROP_UINT32("chip-id", PnvPhb4PecState, chip_id, 0),
DEFINE_PROP_LINK("chip", PnvPhb4PecState, chip, TYPE_PNV_CHIP,
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
index b70631045a..54071fc125 100644
--- a/hw/pci-host/ppce500.c
+++ b/hw/pci-host/ppce500.c
@@ -507,7 +507,7 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
dc->user_creatable = false;
}
-static Property pcihost_properties[] = {
+static const Property pcihost_properties[] = {
DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11),
DEFINE_PROP_UINT32("first_pin_irq", PPCE500PCIState, first_pin_irq, 0x1),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index f3e713318e..af0b77ea1e 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -170,7 +170,7 @@ static void q35_host_get_pci_hole64_end(Object *obj, Visitor *v,
* properties need to be initialized manually by
* q35_host_initfn() after the object_initialize() call.
*/
-static Property q35_host_props[] = {
+static const Property q35_host_props[] = {
DEFINE_PROP_UINT64(PCIE_HOST_MCFG_BASE, Q35PCIHost, parent_obj.base_addr,
MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
@@ -662,7 +662,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
OBJECT(&mch->smram));
}
-static Property mch_props[] = {
+static const Property mch_props[] = {
DEFINE_PROP_UINT16("extended-tseg-mbytes", MCHPCIState, ext_tseg_mbytes,
16),
DEFINE_PROP_BOOL("smbase-smram", MCHPCIState, has_smram_at_smbase, true),
diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c
index a7dfddd69e..b0a4a669f5 100644
--- a/hw/pci-host/raven.c
+++ b/hw/pci-host/raven.c
@@ -422,7 +422,7 @@ static const TypeInfo raven_info = {
},
};
-static Property raven_pcihost_properties[] = {
+static const Property raven_pcihost_properties[] = {
DEFINE_PROP_UINT32("elf-machine", PREPPCIState, pci_dev.elf_machine,
EM_NONE),
DEFINE_PROP_STRING("bios-name", PREPPCIState, pci_dev.bios_name),
diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c
index 1707feb951..623afed644 100644
--- a/hw/pci-host/sabre.c
+++ b/hw/pci-host/sabre.c
@@ -492,7 +492,7 @@ static char *sabre_ofw_unit_address(const SysBusDevice *dev)
(uint32_t)(s->special_base & 0xffffffff));
}
-static Property sabre_properties[] = {
+static const Property sabre_properties[] = {
DEFINE_PROP_UINT64("special-base", SabreState, special_base, 0),
DEFINE_PROP_UINT64("mem-base", SabreState, mem_base, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index e4c1abd871..bd670cfa9d 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -423,7 +423,7 @@ static const TypeInfo unin_internal_pci_host_info = {
},
};
-static Property pci_unin_main_pci_host_props[] = {
+static const Property pci_unin_main_pci_host_props[] = {
DEFINE_PROP_UINT32("ofw-addr", UNINHostState, ofw_addr, -1),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index d257acee17..5d59640691 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -498,7 +498,7 @@ static const TypeInfo versatile_pci_host_info = {
},
};
-static Property pci_vpb_properties[] = {
+static const Property pci_vpb_properties[] = {
DEFINE_PROP_UINT8("broken-irq-mapping", PCIVPBState, irq_mapping_prop,
PCI_VPB_IRQMAP_ASSUME_OK),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c
index 24f691ea82..848403970b 100644
--- a/hw/pci-host/xilinx-pcie.c
+++ b/hw/pci-host/xilinx-pcie.c
@@ -156,7 +156,7 @@ static void xilinx_pcie_host_init(Object *obj)
qdev_prop_set_bit(DEVICE(root), "multifunction", false);
}
-static Property xilinx_pcie_host_props[] = {
+static const Property xilinx_pcie_host_props[] = {
DEFINE_PROP_UINT32("bus_nr", XilinxPCIEHost, bus_nr, 0),
DEFINE_PROP_SIZE("cfg_base", XilinxPCIEHost, cfg_base, 0),
DEFINE_PROP_SIZE("cfg_size", XilinxPCIEHost, cfg_size, 32 * MiB),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 48/71] hw/pci: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (50 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 47/71] hw/pci-host: Constify all Property Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 49/71] hw/ppc: " Richard Henderson
` (20 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael S. Tsirkin, Marcel Apfelbaum
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/pci/pci.c | 2 +-
hw/pci/pci_bridge.c | 2 +-
hw/pci/pci_host.c | 2 +-
hw/pci/pcie_port.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 1416ae202c..c38b674211 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -80,7 +80,7 @@ static const PropertyInfo prop_pci_busnr = {
.get = prop_pci_busnr_get,
};
-static Property pci_props[] = {
+static const Property pci_props[] = {
DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
DEFINE_PROP_STRING("romfile", PCIDevice, romfile),
DEFINE_PROP_UINT32("romsize", PCIDevice, romsize, UINT32_MAX),
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 2c7bb1a525..dd4fd3674f 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -477,7 +477,7 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
return 0;
}
-static Property pci_bridge_properties[] = {
+static const Property pci_bridge_properties[] = {
DEFINE_PROP_BOOL("x-pci-express-writeable-slt-bug", PCIBridge,
pcie_writeable_slt_bug, false),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c
index dfe6fe6184..321e7be709 100644
--- a/hw/pci/pci_host.c
+++ b/hw/pci/pci_host.c
@@ -240,7 +240,7 @@ const VMStateDescription vmstate_pcihost = {
}
};
-static Property pci_host_properties_common[] = {
+static const Property pci_host_properties_common[] = {
DEFINE_PROP_BOOL("x-config-reg-migration-enabled", PCIHostState,
mig_enabled, true),
DEFINE_PROP_BOOL(PCI_HOST_BYPASS_IOMMU, PCIHostState, bypass_iommu, false),
diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c
index 9f978ba164..bac2822e98 100644
--- a/hw/pci/pcie_port.c
+++ b/hw/pci/pcie_port.c
@@ -111,7 +111,7 @@ void pcie_chassis_del_slot(PCIESlot *s)
QLIST_REMOVE(s, next);
}
-static Property pcie_port_props[] = {
+static const Property pcie_port_props[] = {
DEFINE_PROP_UINT8("port", PCIEPort, port, 0),
DEFINE_PROP_UINT16("aer_log_max", PCIEPort,
parent_obj.parent_obj.exp.aer_log.log_max,
@@ -204,7 +204,7 @@ static const TypeInfo pcie_port_type_info = {
.class_init = pcie_port_class_init,
};
-static Property pcie_slot_props[] = {
+static const Property pcie_slot_props[] = {
DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0),
DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0),
DEFINE_PROP_BOOL("hotplug", PCIESlot, hotplug, true),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 49/71] hw/ppc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (51 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 48/71] hw/pci: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 50/71] hw/remote: " Richard Henderson
` (19 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Nicholas Piggin, Frédéric Barrat, BALATON Zoltan,
Hervé Poussineau, Daniel Henrique Barboza,
Harsh Prateek Bora, open list:PowerNV Non-Virt...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ppc/pnv.c | 2 +-
hw/ppc/pnv_adu.c | 2 +-
hw/ppc/pnv_chiptod.c | 2 +-
hw/ppc/pnv_core.c | 4 ++--
hw/ppc/pnv_homer.c | 2 +-
hw/ppc/pnv_i2c.c | 2 +-
hw/ppc/pnv_lpc.c | 2 +-
hw/ppc/pnv_pnor.c | 2 +-
hw/ppc/pnv_psi.c | 2 +-
hw/ppc/ppc405_uc.c | 2 +-
hw/ppc/ppc440_uc.c | 2 +-
hw/ppc/ppc4xx_devs.c | 4 ++--
hw/ppc/ppc4xx_sdram.c | 4 ++--
hw/ppc/prep_systemio.c | 2 +-
hw/ppc/rs6000_mc.c | 2 +-
hw/ppc/spapr_cpu_core.c | 2 +-
hw/ppc/spapr_nvdimm.c | 2 +-
hw/ppc/spapr_pci.c | 2 +-
hw/ppc/spapr_rng.c | 2 +-
hw/ppc/spapr_tpm_proxy.c | 2 +-
20 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index f0f0d7567d..b90a052ce0 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2422,7 +2422,7 @@ static void pnv_chip_realize(DeviceState *dev, Error **errp)
}
}
-static Property pnv_chip_properties[] = {
+static const Property pnv_chip_properties[] = {
DEFINE_PROP_UINT32("chip-id", PnvChip, chip_id, 0),
DEFINE_PROP_UINT64("ram-start", PnvChip, ram_start, 0),
DEFINE_PROP_UINT64("ram-size", PnvChip, ram_size, 0),
diff --git a/hw/ppc/pnv_adu.c b/hw/ppc/pnv_adu.c
index f636dedf79..646736f7e9 100644
--- a/hw/ppc/pnv_adu.c
+++ b/hw/ppc/pnv_adu.c
@@ -185,7 +185,7 @@ static void pnv_adu_realize(DeviceState *dev, Error **errp)
PNV9_XSCOM_ADU_SIZE);
}
-static Property pnv_adu_properties[] = {
+static const Property pnv_adu_properties[] = {
DEFINE_PROP_LINK("lpc", PnvADU, lpc, TYPE_PNV_LPC, PnvLpcController *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_chiptod.c b/hw/ppc/pnv_chiptod.c
index 1e41fe557a..840ef23128 100644
--- a/hw/ppc/pnv_chiptod.c
+++ b/hw/ppc/pnv_chiptod.c
@@ -450,7 +450,7 @@ static int pnv_chiptod_power9_dt_xscom(PnvXScomInterface *dev, void *fdt,
return pnv_chiptod_dt_xscom(dev, fdt, xscom_offset, compat, sizeof(compat));
}
-static Property pnv_chiptod_properties[] = {
+static const Property pnv_chiptod_properties[] = {
DEFINE_PROP_BOOL("primary", PnvChipTOD, primary, false),
DEFINE_PROP_BOOL("secondary", PnvChipTOD, secondary, false),
DEFINE_PROP_LINK("chip", PnvChipTOD , chip, TYPE_PNV_CHIP, PnvChip *),
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index e6b02294b1..22864c92f3 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -435,7 +435,7 @@ static void pnv_core_unrealize(DeviceState *dev)
g_free(pc->threads);
}
-static Property pnv_core_properties[] = {
+static const Property pnv_core_properties[] = {
DEFINE_PROP_UINT32("hwid", PnvCore, hwid, 0),
DEFINE_PROP_UINT64("hrmor", PnvCore, hrmor, 0),
DEFINE_PROP_BOOL("big-core", PnvCore, big_core, false),
@@ -693,7 +693,7 @@ static void pnv_quad_power10_realize(DeviceState *dev, Error **errp)
pqc->xscom_qme_size);
}
-static Property pnv_quad_properties[] = {
+static const Property pnv_quad_properties[] = {
DEFINE_PROP_UINT32("quad-id", PnvQuad, quad_id, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c
index f9a203d11d..b1f83e2cf2 100644
--- a/hw/ppc/pnv_homer.c
+++ b/hw/ppc/pnv_homer.c
@@ -412,7 +412,7 @@ static void pnv_homer_realize(DeviceState *dev, Error **errp)
hmrc->homer_size);
}
-static Property pnv_homer_properties[] = {
+static const Property pnv_homer_properties[] = {
DEFINE_PROP_LINK("chip", PnvHomer, chip, TYPE_PNV_CHIP, PnvChip *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c
index eec5047ce8..4bd61abeed 100644
--- a/hw/ppc/pnv_i2c.c
+++ b/hw/ppc/pnv_i2c.c
@@ -543,7 +543,7 @@ static void pnv_i2c_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out(DEVICE(dev), &i2c->psi_irq, 1);
}
-static Property pnv_i2c_properties[] = {
+static const Property pnv_i2c_properties[] = {
DEFINE_PROP_LINK("chip", PnvI2C, chip, TYPE_PNV_CHIP, PnvChip *),
DEFINE_PROP_UINT32("engine", PnvI2C, engine, 1),
DEFINE_PROP_UINT32("num-busses", PnvI2C, num_busses, 1),
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index 8c203d2059..4d47167163 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -828,7 +828,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out_named(dev, &lpc->psi_irq_lpchc, "LPCHC", 1);
}
-static Property pnv_lpc_properties[] = {
+static const Property pnv_lpc_properties[] = {
DEFINE_PROP_BOOL("psi-serirq", PnvLpcController, psi_has_serirq, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c
index 6280408299..eed6d32650 100644
--- a/hw/ppc/pnv_pnor.c
+++ b/hw/ppc/pnv_pnor.c
@@ -112,7 +112,7 @@ static void pnv_pnor_realize(DeviceState *dev, Error **errp)
TYPE_PNV_PNOR, s->size);
}
-static Property pnv_pnor_properties[] = {
+static const Property pnv_pnor_properties[] = {
DEFINE_PROP_INT64("size", PnvPnor, size, 128 * MiB),
DEFINE_PROP_DRIVE("drive", PnvPnor, blk),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 37c56882b8..e7d6ceee99 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -552,7 +552,7 @@ static int pnv_psi_dt_xscom(PnvXScomInterface *dev, void *fdt, int xscom_offset)
return 0;
}
-static Property pnv_psi_properties[] = {
+static const Property pnv_psi_properties[] = {
DEFINE_PROP_UINT64("bar", PnvPsi, bar, 0),
DEFINE_PROP_UINT64("fsp-bar", PnvPsi, fsp_bar, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c
index 58cbd0507a..801f97811f 100644
--- a/hw/ppc/ppc405_uc.c
+++ b/hw/ppc/ppc405_uc.c
@@ -965,7 +965,7 @@ static void ppc405_cpc_realize(DeviceState *dev, Error **errp)
&dcr_read_epcpc, &dcr_write_epcpc);
}
-static Property ppc405_cpc_properties[] = {
+static const Property ppc405_cpc_properties[] = {
DEFINE_PROP_UINT32("sys-clk", Ppc405CpcState, sysclk, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index 1312aa2080..05a5ef6f77 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -1020,7 +1020,7 @@ static void ppc460ex_pcie_realize(DeviceState *dev, Error **errp)
ppc460ex_pcie_register_dcrs(s);
}
-static Property ppc460ex_pcie_props[] = {
+static const Property ppc460ex_pcie_props[] = {
DEFINE_PROP_INT32("busnum", PPC460EXPCIEState, num, -1),
DEFINE_PROP_INT32("dcrn-base", PPC460EXPCIEState, dcrn_base, -1),
DEFINE_PROP_LINK("cpu", PPC460EXPCIEState, cpu, TYPE_POWERPC_CPU,
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index db8f6b9497..530a392f2a 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -231,7 +231,7 @@ static void ppc4xx_mal_finalize(Object *obj)
g_free(mal->txctpr);
}
-static Property ppc4xx_mal_properties[] = {
+static const Property ppc4xx_mal_properties[] = {
DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0),
DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0),
DEFINE_PROP_END_OF_LIST(),
@@ -539,7 +539,7 @@ bool ppc4xx_dcr_realize(Ppc4xxDcrDeviceState *dev, PowerPCCPU *cpu,
return sysbus_realize(SYS_BUS_DEVICE(dev), errp);
}
-static Property ppc4xx_dcr_properties[] = {
+static const Property ppc4xx_dcr_properties[] = {
DEFINE_PROP_LINK("cpu", Ppc4xxDcrDeviceState, cpu, TYPE_POWERPC_CPU,
PowerPCCPU *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c
index 2ee21f1ca7..6cfb07a11f 100644
--- a/hw/ppc/ppc4xx_sdram.c
+++ b/hw/ppc/ppc4xx_sdram.c
@@ -425,7 +425,7 @@ static void ppc4xx_sdram_ddr_realize(DeviceState *dev, Error **errp)
s, &sdram_ddr_dcr_read, &sdram_ddr_dcr_write);
}
-static Property ppc4xx_sdram_ddr_props[] = {
+static const Property ppc4xx_sdram_ddr_props[] = {
DEFINE_PROP_LINK("dram", Ppc4xxSdramDdrState, dram_mr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdrState, nbanks, 4),
@@ -710,7 +710,7 @@ static void ppc4xx_sdram_ddr2_realize(DeviceState *dev, Error **errp)
s, &sdram_ddr2_dcr_read, &sdram_ddr2_dcr_write);
}
-static Property ppc4xx_sdram_ddr2_props[] = {
+static const Property ppc4xx_sdram_ddr2_props[] = {
DEFINE_PROP_LINK("dram", Ppc4xxSdramDdr2State, dram_mr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdr2State, nbanks, 4),
diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c
index 4d3a251ed8..ca475c69f4 100644
--- a/hw/ppc/prep_systemio.c
+++ b/hw/ppc/prep_systemio.c
@@ -285,7 +285,7 @@ static const VMStateDescription vmstate_prep_systemio = {
},
};
-static Property prep_systemio_properties[] = {
+static const Property prep_systemio_properties[] = {
DEFINE_PROP_UINT8("ibm-planar-id", PrepSystemIoState, ibm_planar_id, 0),
DEFINE_PROP_UINT8("equipment", PrepSystemIoState, equipment, 0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c
index 07b0b664d9..bee9bc62d4 100644
--- a/hw/ppc/rs6000_mc.c
+++ b/hw/ppc/rs6000_mc.c
@@ -207,7 +207,7 @@ static const VMStateDescription vmstate_rs6000mc = {
},
};
-static Property rs6000mc_properties[] = {
+static const Property rs6000mc_properties[] = {
DEFINE_PROP_UINT32("ram-size", RS6000MCState, ram_size, 0),
DEFINE_PROP_BOOL("auto-configure", RS6000MCState, autoconfigure, true),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 135f86a622..88d743a3c3 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -361,7 +361,7 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error **errp)
}
}
-static Property spapr_cpu_core_properties[] = {
+static const Property spapr_cpu_core_properties[] = {
DEFINE_PROP_INT32("node-id", SpaprCpuCore, node_id, CPU_UNSET_NUMA_NODE_ID),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index 7d2dfe5e3d..2ef6f29f3d 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -884,7 +884,7 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm)
vmstate_unregister(NULL, &vmstate_spapr_nvdimm_states, dimm);
}
-static Property spapr_nvdimm_properties[] = {
+static const Property spapr_nvdimm_properties[] = {
#ifdef CONFIG_LIBPMEM
DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, false),
#endif
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 7e24084673..3edff528ca 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2033,7 +2033,7 @@ static void spapr_phb_reset(DeviceState *qdev)
g_hash_table_remove_all(sphb->msi);
}
-static Property spapr_phb_properties[] = {
+static const Property spapr_phb_properties[] = {
DEFINE_PROP_UINT32("index", SpaprPhbState, index, -1),
DEFINE_PROP_UINT64("mem_win_size", SpaprPhbState, mem_win_size,
SPAPR_PCI_MEM32_WIN_SIZE),
diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c
index c2fda7ad20..51c3a54d45 100644
--- a/hw/ppc/spapr_rng.c
+++ b/hw/ppc/spapr_rng.c
@@ -130,7 +130,7 @@ static void spapr_rng_realize(DeviceState *dev, Error **errp)
}
}
-static Property spapr_rng_properties[] = {
+static const Property spapr_rng_properties[] = {
DEFINE_PROP_BOOL("use-kvm", SpaprRngState, use_kvm, false),
DEFINE_PROP_LINK("rng", SpaprRngState, backend, TYPE_RNG_BACKEND,
RngBackend *),
diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c
index e10af35a18..37521b88cb 100644
--- a/hw/ppc/spapr_tpm_proxy.c
+++ b/hw/ppc/spapr_tpm_proxy.c
@@ -145,7 +145,7 @@ static void spapr_tpm_proxy_unrealize(DeviceState *d)
qemu_unregister_reset(spapr_tpm_proxy_reset, tpm_proxy);
}
-static Property spapr_tpm_proxy_properties[] = {
+static const Property spapr_tpm_proxy_properties[] = {
DEFINE_PROP_STRING("host-path", SpaprTpmProxy, host_path),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 50/71] hw/remote: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (52 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 49/71] hw/ppc: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 14:24 ` Jag Raman
2024-12-13 19:07 ` [PATCH 51/71] hw/riscv: " Richard Henderson
` (18 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Elena Ufimtseva, Jagannathan Raman
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/remote/proxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c
index 302a0a4d4d..6f84fdd3fa 100644
--- a/hw/remote/proxy.c
+++ b/hw/remote/proxy.c
@@ -191,7 +191,7 @@ static void pci_proxy_write_config(PCIDevice *d, uint32_t addr, uint32_t val,
config_op_send(PCI_PROXY_DEV(d), addr, &val, len, MPQEMU_CMD_PCI_CFGWRITE);
}
-static Property proxy_properties[] = {
+static const Property proxy_properties[] = {
DEFINE_PROP_STRING("fd", PCIProxyDev, fd),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 50/71] hw/remote: Constify all Property
2024-12-13 19:07 ` [PATCH 50/71] hw/remote: " Richard Henderson
@ 2024-12-14 14:24 ` Jag Raman
0 siblings, 0 replies; 124+ messages in thread
From: Jag Raman @ 2024-12-14 14:24 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel@nongnu.org, Elena Ufimtseva
> On Dec 13, 2024, at 2:14 PM, Richard Henderson <richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
> ---
> hw/remote/proxy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c
> index 302a0a4d4d..6f84fdd3fa 100644
> --- a/hw/remote/proxy.c
> +++ b/hw/remote/proxy.c
> @@ -191,7 +191,7 @@ static void pci_proxy_write_config(PCIDevice *d, uint32_t addr, uint32_t val,
> config_op_send(PCI_PROXY_DEV(d), addr, &val, len, MPQEMU_CMD_PCI_CFGWRITE);
> }
>
> -static Property proxy_properties[] = {
> +static const Property proxy_properties[] = {
> DEFINE_PROP_STRING("fd", PCIProxyDev, fd),
> DEFINE_PROP_END_OF_LIST(),
> };
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 51/71] hw/riscv: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (53 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 50/71] hw/remote: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 20:38 ` Daniel Henrique Barboza
2024-12-13 19:07 ` [PATCH 52/71] hw/rtc: " Richard Henderson
` (17 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Alistair Francis, Palmer Dabbelt, Bin Meng, Weiwei Li,
Daniel Henrique Barboza, Liu Zhiwei, open list:OpenTitan
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/riscv/opentitan.c | 2 +-
hw/riscv/riscv-iommu-pci.c | 2 +-
hw/riscv/riscv-iommu.c | 2 +-
hw/riscv/riscv_hart.c | 2 +-
hw/riscv/sifive_u.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index e2830e9dc2..8ce85ea9f7 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -306,7 +306,7 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_soc, Error **errp)
memmap[IBEX_DEV_IBEX_CFG].base, memmap[IBEX_DEV_IBEX_CFG].size);
}
-static Property lowrisc_ibex_soc_props[] = {
+static const Property lowrisc_ibex_soc_props[] = {
DEFINE_PROP_UINT32("resetvec", LowRISCIbexSoCState, resetvec, 0x20000400),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c
index a42242532d..a695314bbe 100644
--- a/hw/riscv/riscv-iommu-pci.c
+++ b/hw/riscv/riscv-iommu-pci.c
@@ -157,7 +157,7 @@ static void riscv_iommu_pci_init(Object *obj)
iommu->icvec_avail_vectors = RISCV_IOMMU_PCI_ICVEC_VECTORS;
}
-static Property riscv_iommu_pci_properties[] = {
+static const Property riscv_iommu_pci_properties[] = {
DEFINE_PROP_UINT16("vendor-id", RISCVIOMMUStatePci, vendor_id,
PCI_VENDOR_ID_REDHAT),
DEFINE_PROP_UINT16("device-id", RISCVIOMMUStatePci, device_id,
diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c
index bbc95425b3..07fed36986 100644
--- a/hw/riscv/riscv-iommu.c
+++ b/hw/riscv/riscv-iommu.c
@@ -2235,7 +2235,7 @@ static void riscv_iommu_unrealize(DeviceState *dev)
g_hash_table_unref(s->ctx_cache);
}
-static Property riscv_iommu_properties[] = {
+static const Property riscv_iommu_properties[] = {
DEFINE_PROP_UINT32("version", RISCVIOMMUState, version,
RISCV_IOMMU_SPEC_DOT_VER),
DEFINE_PROP_UINT32("bus", RISCVIOMMUState, bus, 0x0),
diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c
index 613ea2aaa0..0df454772f 100644
--- a/hw/riscv/riscv_hart.c
+++ b/hw/riscv/riscv_hart.c
@@ -27,7 +27,7 @@
#include "hw/qdev-properties.h"
#include "hw/riscv/riscv_hart.h"
-static Property riscv_harts_props[] = {
+static const Property riscv_harts_props[] = {
DEFINE_PROP_UINT32("num-harts", RISCVHartArrayState, num_harts, 1),
DEFINE_PROP_UINT32("hartid-base", RISCVHartArrayState, hartid_base, 0),
DEFINE_PROP_STRING("cpu-type", RISCVHartArrayState, cpu_type),
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index c5e74126b1..124ffd4842 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -936,7 +936,7 @@ static void sifive_u_soc_realize(DeviceState *dev, Error **errp)
qdev_get_gpio_in(DEVICE(s->plic), SIFIVE_U_QSPI2_IRQ));
}
-static Property sifive_u_soc_props[] = {
+static const Property sifive_u_soc_props[] = {
DEFINE_PROP_UINT32("serial", SiFiveUSoCState, serial, OTP_SERIAL),
DEFINE_PROP_STRING("cpu-type", SiFiveUSoCState, cpu_type),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 51/71] hw/riscv: Constify all Property
2024-12-13 19:07 ` [PATCH 51/71] hw/riscv: " Richard Henderson
@ 2024-12-13 20:38 ` Daniel Henrique Barboza
0 siblings, 0 replies; 124+ messages in thread
From: Daniel Henrique Barboza @ 2024-12-13 20:38 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Alistair Francis, Palmer Dabbelt, Bin Meng, Weiwei Li, Liu Zhiwei,
open list:OpenTitan
On 12/13/24 4:07 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> hw/riscv/opentitan.c | 2 +-
> hw/riscv/riscv-iommu-pci.c | 2 +-
> hw/riscv/riscv-iommu.c | 2 +-
> hw/riscv/riscv_hart.c | 2 +-
> hw/riscv/sifive_u.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
> index e2830e9dc2..8ce85ea9f7 100644
> --- a/hw/riscv/opentitan.c
> +++ b/hw/riscv/opentitan.c
> @@ -306,7 +306,7 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_soc, Error **errp)
> memmap[IBEX_DEV_IBEX_CFG].base, memmap[IBEX_DEV_IBEX_CFG].size);
> }
>
> -static Property lowrisc_ibex_soc_props[] = {
> +static const Property lowrisc_ibex_soc_props[] = {
> DEFINE_PROP_UINT32("resetvec", LowRISCIbexSoCState, resetvec, 0x20000400),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c
> index a42242532d..a695314bbe 100644
> --- a/hw/riscv/riscv-iommu-pci.c
> +++ b/hw/riscv/riscv-iommu-pci.c
> @@ -157,7 +157,7 @@ static void riscv_iommu_pci_init(Object *obj)
> iommu->icvec_avail_vectors = RISCV_IOMMU_PCI_ICVEC_VECTORS;
> }
>
> -static Property riscv_iommu_pci_properties[] = {
> +static const Property riscv_iommu_pci_properties[] = {
> DEFINE_PROP_UINT16("vendor-id", RISCVIOMMUStatePci, vendor_id,
> PCI_VENDOR_ID_REDHAT),
> DEFINE_PROP_UINT16("device-id", RISCVIOMMUStatePci, device_id,
> diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c
> index bbc95425b3..07fed36986 100644
> --- a/hw/riscv/riscv-iommu.c
> +++ b/hw/riscv/riscv-iommu.c
> @@ -2235,7 +2235,7 @@ static void riscv_iommu_unrealize(DeviceState *dev)
> g_hash_table_unref(s->ctx_cache);
> }
>
> -static Property riscv_iommu_properties[] = {
> +static const Property riscv_iommu_properties[] = {
> DEFINE_PROP_UINT32("version", RISCVIOMMUState, version,
> RISCV_IOMMU_SPEC_DOT_VER),
> DEFINE_PROP_UINT32("bus", RISCVIOMMUState, bus, 0x0),
> diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c
> index 613ea2aaa0..0df454772f 100644
> --- a/hw/riscv/riscv_hart.c
> +++ b/hw/riscv/riscv_hart.c
> @@ -27,7 +27,7 @@
> #include "hw/qdev-properties.h"
> #include "hw/riscv/riscv_hart.h"
>
> -static Property riscv_harts_props[] = {
> +static const Property riscv_harts_props[] = {
> DEFINE_PROP_UINT32("num-harts", RISCVHartArrayState, num_harts, 1),
> DEFINE_PROP_UINT32("hartid-base", RISCVHartArrayState, hartid_base, 0),
> DEFINE_PROP_STRING("cpu-type", RISCVHartArrayState, cpu_type),
> diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
> index c5e74126b1..124ffd4842 100644
> --- a/hw/riscv/sifive_u.c
> +++ b/hw/riscv/sifive_u.c
> @@ -936,7 +936,7 @@ static void sifive_u_soc_realize(DeviceState *dev, Error **errp)
> qdev_get_gpio_in(DEVICE(s->plic), SIFIVE_U_QSPI2_IRQ));
> }
>
> -static Property sifive_u_soc_props[] = {
> +static const Property sifive_u_soc_props[] = {
> DEFINE_PROP_UINT32("serial", SiFiveUSoCState, serial, OTP_SERIAL),
> DEFINE_PROP_STRING("cpu-type", SiFiveUSoCState, cpu_type),
> DEFINE_PROP_END_OF_LIST()
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 52/71] hw/rtc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (54 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 51/71] hw/riscv: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 53/71] hw/rx: " Richard Henderson
` (16 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic, Anup Patel,
Alistair Francis, Hervé Poussineau, Michael S. Tsirkin,
Paolo Bonzini, open list:Allwinner-a10, open list:Goldfish RTC,
open list:PReP
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/rtc/allwinner-rtc.c | 2 +-
hw/rtc/goldfish_rtc.c | 2 +-
hw/rtc/m48t59-isa.c | 2 +-
hw/rtc/m48t59.c | 2 +-
hw/rtc/mc146818rtc.c | 2 +-
hw/rtc/pl031.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/rtc/allwinner-rtc.c b/hw/rtc/allwinner-rtc.c
index 1057d6a57f..838db72136 100644
--- a/hw/rtc/allwinner-rtc.c
+++ b/hw/rtc/allwinner-rtc.c
@@ -311,7 +311,7 @@ static const VMStateDescription allwinner_rtc_vmstate = {
}
};
-static Property allwinner_rtc_properties[] = {
+static const Property allwinner_rtc_properties[] = {
DEFINE_PROP_INT32("base-year", AwRtcState, base_year, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
index a6dfbf89f3..389f192efa 100644
--- a/hw/rtc/goldfish_rtc.c
+++ b/hw/rtc/goldfish_rtc.c
@@ -286,7 +286,7 @@ static void goldfish_rtc_realize(DeviceState *d, Error **errp)
s->timer = timer_new_ns(rtc_clock, goldfish_rtc_interrupt, s);
}
-static Property goldfish_rtc_properties[] = {
+static const Property goldfish_rtc_properties[] = {
DEFINE_PROP_BOOL("big-endian", GoldfishRTCState, big_endian,
false),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c
index b642b82680..51f80d27ef 100644
--- a/hw/rtc/m48t59-isa.c
+++ b/hw/rtc/m48t59-isa.c
@@ -77,7 +77,7 @@ static void m48txx_isa_toggle_lock(Nvram *obj, int lock)
m48t59_toggle_lock(&d->state, lock);
}
-static Property m48t59_isa_properties[] = {
+static const Property m48t59_isa_properties[] = {
DEFINE_PROP_INT32("base-year", M48txxISAState, state.base_year, 0),
DEFINE_PROP_UINT32("iobase", M48txxISAState, io_base, 0x74),
DEFINE_PROP_UINT8("irq", M48txxISAState, isairq, 8),
diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
index 90299ea56f..5a2c7b4abd 100644
--- a/hw/rtc/m48t59.c
+++ b/hw/rtc/m48t59.c
@@ -618,7 +618,7 @@ static void m48txx_sysbus_toggle_lock(Nvram *obj, int lock)
m48t59_toggle_lock(&d->state, lock);
}
-static Property m48t59_sysbus_properties[] = {
+static const Property m48t59_sysbus_properties[] = {
DEFINE_PROP_INT32("base-year", M48txxSysBusState, state.base_year, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 8ccee9a385..973ed9914d 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -960,7 +960,7 @@ MC146818RtcState *mc146818_rtc_init(ISABus *bus, int base_year,
return s;
}
-static Property mc146818rtc_properties[] = {
+static const Property mc146818rtc_properties[] = {
DEFINE_PROP_INT32("base_year", MC146818RtcState, base_year, 1980),
DEFINE_PROP_UINT16("iobase", MC146818RtcState, io_base, RTC_ISA_BASE),
DEFINE_PROP_UINT8("irq", MC146818RtcState, isairq, RTC_ISA_IRQ),
diff --git a/hw/rtc/pl031.c b/hw/rtc/pl031.c
index 563bb4b446..1dc8e6e00f 100644
--- a/hw/rtc/pl031.c
+++ b/hw/rtc/pl031.c
@@ -319,7 +319,7 @@ static const VMStateDescription vmstate_pl031 = {
}
};
-static Property pl031_properties[] = {
+static const Property pl031_properties[] = {
/*
* True to correctly migrate the tick offset of the RTC. False to
* obtain backward migration compatibility with older QEMU versions,
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 53/71] hw/rx: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (55 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 52/71] hw/rtc: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 54/71] hw/s390x: " Richard Henderson
` (15 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Yoshinori Sato
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/rx/rx62n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index 560f53a58a..dfa27bc94e 100644
--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -257,7 +257,7 @@ static void rx62n_realize(DeviceState *dev, Error **errp)
register_sci(s, 0);
}
-static Property rx62n_properties[] = {
+static const Property rx62n_properties[] = {
DEFINE_PROP_LINK("main-bus", RX62NState, sysmem, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_BOOL("load-kernel", RX62NState, kernel, false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 54/71] hw/s390x: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (56 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 53/71] hw/rx: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-20 20:41 ` Eric Farman
2024-12-13 19:07 ` [PATCH 55/71] hw/scsi: " Richard Henderson
` (14 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Halil Pasic, Christian Borntraeger, David Hildenbrand,
Ilya Leoshkevich, Eric Farman, Thomas Huth, Matthew Rosato,
Cornelia Huck, Michael S. Tsirkin, Stefano Garzarella,
open list:S390 3270 device
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/s390x/3270-ccw.c | 2 +-
hw/s390x/ccw-device.c | 2 +-
hw/s390x/css-bridge.c | 2 +-
hw/s390x/ipl.c | 2 +-
hw/s390x/s390-pci-bus.c | 2 +-
hw/s390x/s390-skeys.c | 2 +-
hw/s390x/s390-stattrib.c | 2 +-
hw/s390x/vhost-scsi-ccw.c | 2 +-
hw/s390x/vhost-user-fs-ccw.c | 2 +-
hw/s390x/vhost-vsock-ccw.c | 2 +-
hw/s390x/virtio-ccw-9p.c | 2 +-
hw/s390x/virtio-ccw-balloon.c | 2 +-
hw/s390x/virtio-ccw-blk.c | 2 +-
hw/s390x/virtio-ccw-crypto.c | 2 +-
hw/s390x/virtio-ccw-gpu.c | 2 +-
hw/s390x/virtio-ccw-input.c | 2 +-
hw/s390x/virtio-ccw-net.c | 2 +-
hw/s390x/virtio-ccw-rng.c | 2 +-
hw/s390x/virtio-ccw-scsi.c | 2 +-
hw/s390x/virtio-ccw-serial.c | 2 +-
20 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c
index 69e6783ade..f48a14ca2c 100644
--- a/hw/s390x/3270-ccw.c
+++ b/hw/s390x/3270-ccw.c
@@ -150,7 +150,7 @@ out_err:
g_free(sch);
}
-static Property emulated_ccw_3270_properties[] = {
+static const Property emulated_ccw_3270_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
index 30f2fb486f..0d10c3ed55 100644
--- a/hw/s390x/ccw-device.c
+++ b/hw/s390x/ccw-device.c
@@ -81,7 +81,7 @@ const PropertyInfo ccw_loadparm = {
.set = ccw_device_set_loadparm,
};
-static Property ccw_device_properties[] = {
+static const Property ccw_device_properties[] = {
DEFINE_PROP_CSS_DEV_ID("devno", CcwDevice, devno),
DEFINE_PROP_CSS_DEV_ID_RO("dev_id", CcwDevice, dev_id),
DEFINE_PROP_CSS_DEV_ID_RO("subch_id", CcwDevice, subch_id),
diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
index 8657ff7bf4..860a04a7da 100644
--- a/hw/s390x/css-bridge.c
+++ b/hw/s390x/css-bridge.c
@@ -120,7 +120,7 @@ VirtualCssBus *virtual_css_bus_init(void)
/***************** Virtual-css Bus Bridge Device ********************/
-static Property virtual_css_bridge_properties[] = {
+static const Property virtual_css_bridge_properties[] = {
DEFINE_PROP_BOOL("css_dev_path", VirtualCssBridge, css_dev_path,
true),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 30734661ad..88a97f0085 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -291,7 +291,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
qemu_register_reset(resettable_cold_reset_fn, dev);
}
-static Property s390_ipl_properties[] = {
+static const Property s390_ipl_properties[] = {
DEFINE_PROP_STRING("kernel", S390IPLState, kernel),
DEFINE_PROP_STRING("initrd", S390IPLState, initrd),
DEFINE_PROP_STRING("cmdline", S390IPLState, cmdline),
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 40b2567aa7..22e6be67af 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -1481,7 +1481,7 @@ static const PropertyInfo s390_pci_fid_propinfo = {
#define DEFINE_PROP_S390_PCI_FID(_n, _s, _f) \
DEFINE_PROP(_n, _s, _f, s390_pci_fid_propinfo, uint32_t)
-static Property s390_pci_device_properties[] = {
+static const Property s390_pci_device_properties[] = {
DEFINE_PROP_UINT16("uid", S390PCIBusDevice, uid, UID_UNDEFINED),
DEFINE_PROP_S390_PCI_FID("fid", S390PCIBusDevice, fid),
DEFINE_PROP_STRING("target", S390PCIBusDevice, target),
diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c
index bf22d6863e..6d0a47ed73 100644
--- a/hw/s390x/s390-skeys.c
+++ b/hw/s390x/s390-skeys.c
@@ -475,7 +475,7 @@ static void s390_skeys_realize(DeviceState *dev, Error **errp)
}
}
-static Property s390_skeys_props[] = {
+static const Property s390_skeys_props[] = {
DEFINE_PROP_BOOL("migration-enabled", S390SKeysState, migration_enabled, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index c4259b5327..6c69c01e1f 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -360,7 +360,7 @@ static void s390_stattrib_realize(DeviceState *dev, Error **errp)
&savevm_s390_stattrib_handlers, dev);
}
-static Property s390_stattrib_props[] = {
+static const Property s390_stattrib_props[] = {
DEFINE_PROP_BOOL("migration-enabled", S390StAttribState, migration_enabled, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/s390x/vhost-scsi-ccw.c b/hw/s390x/vhost-scsi-ccw.c
index 40dc14bbc7..0be0f8a82c 100644
--- a/hw/s390x/vhost-scsi-ccw.c
+++ b/hw/s390x/vhost-scsi-ccw.c
@@ -41,7 +41,7 @@ static void vhost_ccw_scsi_instance_init(Object *obj)
TYPE_VHOST_SCSI);
}
-static Property vhost_ccw_scsi_properties[] = {
+static const Property vhost_ccw_scsi_properties[] = {
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
VIRTIO_CCW_MAX_REV),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/s390x/vhost-user-fs-ccw.c b/hw/s390x/vhost-user-fs-ccw.c
index 6c6f269293..934378aaec 100644
--- a/hw/s390x/vhost-user-fs-ccw.c
+++ b/hw/s390x/vhost-user-fs-ccw.c
@@ -23,7 +23,7 @@ typedef struct VHostUserFSCcw {
OBJECT_CHECK(VHostUserFSCcw, (obj), TYPE_VHOST_USER_FS_CCW)
-static Property vhost_user_fs_ccw_properties[] = {
+static const Property vhost_user_fs_ccw_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c
index 07845a9a00..3ba4008b4b 100644
--- a/hw/s390x/vhost-vsock-ccw.c
+++ b/hw/s390x/vhost-vsock-ccw.c
@@ -22,7 +22,7 @@ struct VHostVSockCCWState {
VHostVSock vdev;
};
-static Property vhost_vsock_ccw_properties[] = {
+static const Property vhost_vsock_ccw_properties[] = {
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
VIRTIO_CCW_MAX_REV),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/s390x/virtio-ccw-9p.c b/hw/s390x/virtio-ccw-9p.c
index 6f931f5994..c10b084d40 100644
--- a/hw/s390x/virtio-ccw-9p.c
+++ b/hw/s390x/virtio-ccw-9p.c
@@ -41,7 +41,7 @@ static void virtio_ccw_9p_instance_init(Object *obj)
TYPE_VIRTIO_9P);
}
-static Property virtio_ccw_9p_properties[] = {
+static const Property virtio_ccw_9p_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-balloon.c b/hw/s390x/virtio-ccw-balloon.c
index 44287b9bbe..bbbed494b3 100644
--- a/hw/s390x/virtio-ccw-balloon.c
+++ b/hw/s390x/virtio-ccw-balloon.c
@@ -46,7 +46,7 @@ static void virtio_ccw_balloon_instance_init(Object *obj)
"guest-stats-polling-interval");
}
-static Property virtio_ccw_balloon_properties[] = {
+static const Property virtio_ccw_balloon_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-blk.c b/hw/s390x/virtio-ccw-blk.c
index 2364432c6e..3182851234 100644
--- a/hw/s390x/virtio-ccw-blk.c
+++ b/hw/s390x/virtio-ccw-blk.c
@@ -43,7 +43,7 @@ static void virtio_ccw_blk_instance_init(Object *obj)
"bootindex");
}
-static Property virtio_ccw_blk_properties[] = {
+static const Property virtio_ccw_blk_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-crypto.c b/hw/s390x/virtio-ccw-crypto.c
index 0fa2f89443..b4cd7605c9 100644
--- a/hw/s390x/virtio-ccw-crypto.c
+++ b/hw/s390x/virtio-ccw-crypto.c
@@ -44,7 +44,7 @@ static void virtio_ccw_crypto_instance_init(Object *obj)
TYPE_VIRTIO_CRYPTO);
}
-static Property virtio_ccw_crypto_properties[] = {
+static const Property virtio_ccw_crypto_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c
index 0642c5281d..c44dc2d355 100644
--- a/hw/s390x/virtio-ccw-gpu.c
+++ b/hw/s390x/virtio-ccw-gpu.c
@@ -42,7 +42,7 @@ static void virtio_ccw_gpu_instance_init(Object *obj)
TYPE_VIRTIO_GPU);
}
-static Property virtio_ccw_gpu_properties[] = {
+static const Property virtio_ccw_gpu_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-input.c b/hw/s390x/virtio-ccw-input.c
index 61a07ba38d..040a9e04a9 100644
--- a/hw/s390x/virtio-ccw-input.c
+++ b/hw/s390x/virtio-ccw-input.c
@@ -43,7 +43,7 @@ static void virtio_ccw_input_realize(VirtioCcwDevice *ccw_dev, Error **errp)
qdev_realize(vdev, BUS(&ccw_dev->bus), errp);
}
-static Property virtio_ccw_input_properties[] = {
+static const Property virtio_ccw_input_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-net.c b/hw/s390x/virtio-ccw-net.c
index a4a3f65c7e..c41d347034 100644
--- a/hw/s390x/virtio-ccw-net.c
+++ b/hw/s390x/virtio-ccw-net.c
@@ -46,7 +46,7 @@ static void virtio_ccw_net_instance_init(Object *obj)
"bootindex");
}
-static Property virtio_ccw_net_properties[] = {
+static const Property virtio_ccw_net_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-rng.c b/hw/s390x/virtio-ccw-rng.c
index a3fffb5138..c9a15c4eb6 100644
--- a/hw/s390x/virtio-ccw-rng.c
+++ b/hw/s390x/virtio-ccw-rng.c
@@ -43,7 +43,7 @@ static void virtio_ccw_rng_instance_init(Object *obj)
TYPE_VIRTIO_RNG);
}
-static Property virtio_ccw_rng_properties[] = {
+static const Property virtio_ccw_rng_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-scsi.c b/hw/s390x/virtio-ccw-scsi.c
index d003f89f43..bec9a73518 100644
--- a/hw/s390x/virtio-ccw-scsi.c
+++ b/hw/s390x/virtio-ccw-scsi.c
@@ -53,7 +53,7 @@ static void virtio_ccw_scsi_instance_init(Object *obj)
TYPE_VIRTIO_SCSI);
}
-static Property virtio_ccw_scsi_properties[] = {
+static const Property virtio_ccw_scsi_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
diff --git a/hw/s390x/virtio-ccw-serial.c b/hw/s390x/virtio-ccw-serial.c
index 8f8d2302f8..037d4f9db1 100644
--- a/hw/s390x/virtio-ccw-serial.c
+++ b/hw/s390x/virtio-ccw-serial.c
@@ -53,7 +53,7 @@ static void virtio_ccw_serial_instance_init(Object *obj)
TYPE_VIRTIO_SERIAL);
}
-static Property virtio_ccw_serial_properties[] = {
+static const Property virtio_ccw_serial_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 54/71] hw/s390x: Constify all Property
2024-12-13 19:07 ` [PATCH 54/71] hw/s390x: " Richard Henderson
@ 2024-12-20 20:41 ` Eric Farman
0 siblings, 0 replies; 124+ messages in thread
From: Eric Farman @ 2024-12-20 20:41 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Halil Pasic, Christian Borntraeger, David Hildenbrand,
Ilya Leoshkevich, Thomas Huth, Matthew Rosato, Cornelia Huck,
Michael S. Tsirkin, Stefano Garzarella,
open list:S390 3270 device
On Fri, 2024-12-13 at 13:07 -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/s390x/3270-ccw.c | 2 +-
> hw/s390x/ccw-device.c | 2 +-
> hw/s390x/css-bridge.c | 2 +-
> hw/s390x/ipl.c | 2 +-
> hw/s390x/s390-pci-bus.c | 2 +-
> hw/s390x/s390-skeys.c | 2 +-
> hw/s390x/s390-stattrib.c | 2 +-
> hw/s390x/vhost-scsi-ccw.c | 2 +-
> hw/s390x/vhost-user-fs-ccw.c | 2 +-
> hw/s390x/vhost-vsock-ccw.c | 2 +-
> hw/s390x/virtio-ccw-9p.c | 2 +-
> hw/s390x/virtio-ccw-balloon.c | 2 +-
> hw/s390x/virtio-ccw-blk.c | 2 +-
> hw/s390x/virtio-ccw-crypto.c | 2 +-
> hw/s390x/virtio-ccw-gpu.c | 2 +-
> hw/s390x/virtio-ccw-input.c | 2 +-
> hw/s390x/virtio-ccw-net.c | 2 +-
> hw/s390x/virtio-ccw-rng.c | 2 +-
> hw/s390x/virtio-ccw-scsi.c | 2 +-
> hw/s390x/virtio-ccw-serial.c | 2 +-
> 20 files changed, 20 insertions(+), 20 deletions(-)
Reviewed-by: Eric Farman <farman@linux.ibm.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 55/71] hw/scsi: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (57 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 54/71] hw/s390x: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 56/71] hw/sd: " Richard Henderson
` (13 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Fam Zheng, Hannes Reinecke, Nicholas Piggin,
Daniel Henrique Barboza, Harsh Prateek Bora, Michael S. Tsirkin,
Stefano Garzarella, Raphael Norwitz, Dmitry Fleytman,
open list:megasas, open list:sPAPR (pseries)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/scsi/megasas.c | 6 +++---
hw/scsi/mptsas.c | 2 +-
hw/scsi/scsi-bus.c | 2 +-
hw/scsi/scsi-disk.c | 6 +++---
hw/scsi/scsi-generic.c | 2 +-
hw/scsi/spapr_vscsi.c | 2 +-
hw/scsi/vhost-scsi.c | 2 +-
hw/scsi/vhost-user-scsi.c | 2 +-
hw/scsi/virtio-scsi.c | 2 +-
hw/scsi/vmw_pvscsi.c | 2 +-
10 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index df58aeb995..8323cd18e3 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2448,7 +2448,7 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
scsi_bus_init(&s->bus, sizeof(s->bus), DEVICE(dev), &megasas_scsi_info);
}
-static Property megasas_properties_gen1[] = {
+static const Property megasas_properties_gen1[] = {
DEFINE_PROP_UINT32("max_sge", MegasasState, fw_sge,
MEGASAS_DEFAULT_SGE),
DEFINE_PROP_UINT32("max_cmds", MegasasState, fw_cmds,
@@ -2462,7 +2462,7 @@ static Property megasas_properties_gen1[] = {
DEFINE_PROP_END_OF_LIST(),
};
-static Property megasas_properties_gen2[] = {
+static const Property megasas_properties_gen2[] = {
DEFINE_PROP_UINT32("max_sge", MegasasState, fw_sge,
MEGASAS_DEFAULT_SGE),
DEFINE_PROP_UINT32("max_cmds", MegasasState, fw_cmds,
@@ -2487,7 +2487,7 @@ typedef struct MegasasInfo {
int mmio_bar;
int osts;
const VMStateDescription *vmsd;
- Property *props;
+ const Property *props;
InterfaceInfo *interfaces;
} MegasasInfo;
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index c6bc3479e9..a06113d908 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -1410,7 +1410,7 @@ static const VMStateDescription vmstate_mptsas = {
}
};
-static Property mptsas_properties[] = {
+static const Property mptsas_properties[] = {
DEFINE_PROP_UINT64("sas_address", MPTSASState, sas_addr, 0),
/* TODO: test MSI support under Windows */
DEFINE_PROP_ON_OFF_AUTO("msi", MPTSASState, msi, ON_OFF_AUTO_AUTO),
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 53eff5dd3d..2f1678d51e 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -1943,7 +1943,7 @@ const VMStateDescription vmstate_scsi_device = {
}
};
-static Property scsi_props[] = {
+static const Property scsi_props[] = {
DEFINE_PROP_UINT32("channel", SCSIDevice, channel, 0),
DEFINE_PROP_UINT32("scsi-id", SCSIDevice, id, -1),
DEFINE_PROP_UINT32("lun", SCSIDevice, lun, -1),
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 7f13b0588f..a47b80907f 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -3207,7 +3207,7 @@ static const TypeInfo scsi_disk_base_info = {
DEFINE_PROP_BOOL("migrate-emulated-scsi-request", SCSIDiskState, migrate_emulated_scsi_request, true)
-static Property scsi_hd_properties[] = {
+static const Property scsi_hd_properties[] = {
DEFINE_SCSI_DISK_PROPERTIES(),
DEFINE_PROP_BIT("removable", SCSIDiskState, features,
SCSI_DISK_F_REMOVABLE, false),
@@ -3267,7 +3267,7 @@ static const TypeInfo scsi_hd_info = {
.class_init = scsi_hd_class_initfn,
};
-static Property scsi_cd_properties[] = {
+static const Property scsi_cd_properties[] = {
DEFINE_SCSI_DISK_PROPERTIES(),
DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0),
DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0),
@@ -3310,7 +3310,7 @@ static const TypeInfo scsi_cd_info = {
};
#ifdef __linux__
-static Property scsi_block_properties[] = {
+static const Property scsi_block_properties[] = {
DEFINE_BLOCK_ERROR_PROPERTIES(SCSIDiskState, qdev.conf),
DEFINE_PROP_DRIVE("drive", SCSIDiskState, qdev.conf.blk),
DEFINE_PROP_BOOL("share-rw", SCSIDiskState, qdev.conf.share_rw, false),
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 76f04a5ee8..d7ae7549d0 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -772,7 +772,7 @@ static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun,
return scsi_req_alloc(&scsi_generic_req_ops, d, tag, lun, hba_private);
}
-static Property scsi_generic_properties[] = {
+static const Property scsi_generic_properties[] = {
DEFINE_PROP_DRIVE("drive", SCSIDevice, conf.blk),
DEFINE_PROP_BOOL("share-rw", SCSIDevice, conf.share_rw, false),
DEFINE_PROP_UINT32("io_timeout", SCSIDevice, io_timeout,
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index c75a6c8807..7c55e4d40f 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1250,7 +1250,7 @@ static int spapr_vscsi_devnode(SpaprVioDevice *dev, void *fdt, int node_off)
return 0;
}
-static Property spapr_vscsi_properties[] = {
+static const Property spapr_vscsi_properties[] = {
DEFINE_SPAPR_PROPERTIES(VSCSIState, vdev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 22d16dc26b..effb8dab1f 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -343,7 +343,7 @@ static struct vhost_dev *vhost_scsi_get_vhost(VirtIODevice *vdev)
return &vsc->dev;
}
-static Property vhost_scsi_properties[] = {
+static const Property vhost_scsi_properties[] = {
DEFINE_PROP_STRING("vhostfd", VirtIOSCSICommon, conf.vhostfd),
DEFINE_PROP_STRING("wwpn", VirtIOSCSICommon, conf.wwpn),
DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 55e4be5b34..d5265c57bc 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -341,7 +341,7 @@ static void vhost_user_scsi_unrealize(DeviceState *dev)
virtio_scsi_common_unrealize(dev);
}
-static Property vhost_user_scsi_properties[] = {
+static const Property vhost_user_scsi_properties[] = {
DEFINE_PROP_CHR("chardev", VirtIOSCSICommon, conf.chardev),
DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues,
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 6637cfeaf5..c0a4f1a620 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -1285,7 +1285,7 @@ static void virtio_scsi_device_unrealize(DeviceState *dev)
qemu_mutex_destroy(&s->tmf_bh_lock);
}
-static Property virtio_scsi_properties[] = {
+static const Property virtio_scsi_properties[] = {
DEFINE_PROP_UINT32("num_queues", VirtIOSCSI, parent_obj.conf.num_queues,
VIRTIO_SCSI_AUTO_NUM_QUEUES),
DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSI,
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index 57761b5594..46cec531cc 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1296,7 +1296,7 @@ static const VMStateDescription vmstate_pvscsi = {
}
};
-static Property pvscsi_properties[] = {
+static const Property pvscsi_properties[] = {
DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1),
DEFINE_PROP_BIT("x-old-pci-configuration", PVSCSIState, compat_flags,
PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 56/71] hw/sd: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (58 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 55/71] hw/scsi: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 10:04 ` Cédric Le Goater
2024-12-13 19:07 ` [PATCH 57/71] hw/sparc: " Richard Henderson
` (12 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic,
Cédric Le Goater, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Philippe Mathieu-Daudé,
Bin Meng, open list:Allwinner-a10, open list:SD (Secure Card)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/sd/allwinner-sdhost.c | 2 +-
hw/sd/aspeed_sdhci.c | 2 +-
hw/sd/sd.c | 6 +++---
hw/sd/sdhci-pci.c | 2 +-
hw/sd/sdhci.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/sd/allwinner-sdhost.c b/hw/sd/allwinner-sdhost.c
index bcfb4c1322..be39ec2e71 100644
--- a/hw/sd/allwinner-sdhost.c
+++ b/hw/sd/allwinner-sdhost.c
@@ -808,7 +808,7 @@ static const VMStateDescription vmstate_allwinner_sdhost = {
}
};
-static Property allwinner_sdhost_properties[] = {
+static const Property allwinner_sdhost_properties[] = {
DEFINE_PROP_LINK("dma-memory", AwSdHostState, dma_mr,
TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c
index f82b05397e..99703f1842 100644
--- a/hw/sd/aspeed_sdhci.c
+++ b/hw/sd/aspeed_sdhci.c
@@ -204,7 +204,7 @@ static const VMStateDescription vmstate_aspeed_sdhci = {
},
};
-static Property aspeed_sdhci_properties[] = {
+static const Property aspeed_sdhci_properties[] = {
DEFINE_PROP_UINT8("num-slots", AspeedSDHCIState, num_slots, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index f9bd03f3fd..b994ef581e 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2798,18 +2798,18 @@ static void emmc_realize(DeviceState *dev, Error **errp)
sd_realize(dev, errp);
}
-static Property sdmmc_common_properties[] = {
+static const Property sdmmc_common_properties[] = {
DEFINE_PROP_DRIVE("drive", SDState, blk),
DEFINE_PROP_END_OF_LIST()
};
-static Property sd_properties[] = {
+static const Property sd_properties[] = {
DEFINE_PROP_UINT8("spec_version", SDState,
spec_version, SD_PHY_SPECv3_01_VERS),
DEFINE_PROP_END_OF_LIST()
};
-static Property emmc_properties[] = {
+static const Property emmc_properties[] = {
DEFINE_PROP_UINT64("boot-partition-size", SDState, boot_part_size, 0),
DEFINE_PROP_UINT8("boot-config", SDState, boot_config, 0x0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c
index 9b7bee8b3f..83892a7a15 100644
--- a/hw/sd/sdhci-pci.c
+++ b/hw/sd/sdhci-pci.c
@@ -22,7 +22,7 @@
#include "hw/sd/sdhci.h"
#include "sdhci-internal.h"
-static Property sdhci_pci_properties[] = {
+static const Property sdhci_pci_properties[] = {
DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 37875c02c3..e697ee05b3 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1544,7 +1544,7 @@ void sdhci_common_class_init(ObjectClass *klass, void *data)
/* --- qdev SysBus --- */
-static Property sdhci_sysbus_properties[] = {
+static const Property sdhci_sysbus_properties[] = {
DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
DEFINE_PROP_BOOL("pending-insert-quirk", SDHCIState, pending_insert_quirk,
false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 56/71] hw/sd: Constify all Property
2024-12-13 19:07 ` [PATCH 56/71] hw/sd: " Richard Henderson
@ 2024-12-14 10:04 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:04 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Beniamino Galvani, Peter Maydell, Strahinja Jankovic, Steven Lee,
Troy Lee, Jamin Lin, Andrew Jeffery, Joel Stanley,
Philippe Mathieu-Daudé, Bin Meng, open list:Allwinner-a10,
open list:SD (Secure Card)
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/sd/allwinner-sdhost.c | 2 +-
> hw/sd/aspeed_sdhci.c | 2 +-
> hw/sd/sd.c | 6 +++---
> hw/sd/sdhci-pci.c | 2 +-
> hw/sd/sdhci.c | 2 +-
> 5 files changed, 7 insertions(+), 7 deletions(-)
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/sd/allwinner-sdhost.c b/hw/sd/allwinner-sdhost.c
> index bcfb4c1322..be39ec2e71 100644
> --- a/hw/sd/allwinner-sdhost.c
> +++ b/hw/sd/allwinner-sdhost.c
> @@ -808,7 +808,7 @@ static const VMStateDescription vmstate_allwinner_sdhost = {
> }
> };
>
> -static Property allwinner_sdhost_properties[] = {
> +static const Property allwinner_sdhost_properties[] = {
> DEFINE_PROP_LINK("dma-memory", AwSdHostState, dma_mr,
> TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c
> index f82b05397e..99703f1842 100644
> --- a/hw/sd/aspeed_sdhci.c
> +++ b/hw/sd/aspeed_sdhci.c
> @@ -204,7 +204,7 @@ static const VMStateDescription vmstate_aspeed_sdhci = {
> },
> };
>
> -static Property aspeed_sdhci_properties[] = {
> +static const Property aspeed_sdhci_properties[] = {
> DEFINE_PROP_UINT8("num-slots", AspeedSDHCIState, num_slots, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index f9bd03f3fd..b994ef581e 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -2798,18 +2798,18 @@ static void emmc_realize(DeviceState *dev, Error **errp)
> sd_realize(dev, errp);
> }
>
> -static Property sdmmc_common_properties[] = {
> +static const Property sdmmc_common_properties[] = {
> DEFINE_PROP_DRIVE("drive", SDState, blk),
> DEFINE_PROP_END_OF_LIST()
> };
>
> -static Property sd_properties[] = {
> +static const Property sd_properties[] = {
> DEFINE_PROP_UINT8("spec_version", SDState,
> spec_version, SD_PHY_SPECv3_01_VERS),
> DEFINE_PROP_END_OF_LIST()
> };
>
> -static Property emmc_properties[] = {
> +static const Property emmc_properties[] = {
> DEFINE_PROP_UINT64("boot-partition-size", SDState, boot_part_size, 0),
> DEFINE_PROP_UINT8("boot-config", SDState, boot_config, 0x0),
> DEFINE_PROP_END_OF_LIST()
> diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c
> index 9b7bee8b3f..83892a7a15 100644
> --- a/hw/sd/sdhci-pci.c
> +++ b/hw/sd/sdhci-pci.c
> @@ -22,7 +22,7 @@
> #include "hw/sd/sdhci.h"
> #include "sdhci-internal.h"
>
> -static Property sdhci_pci_properties[] = {
> +static const Property sdhci_pci_properties[] = {
> DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> index 37875c02c3..e697ee05b3 100644
> --- a/hw/sd/sdhci.c
> +++ b/hw/sd/sdhci.c
> @@ -1544,7 +1544,7 @@ void sdhci_common_class_init(ObjectClass *klass, void *data)
>
> /* --- qdev SysBus --- */
>
> -static Property sdhci_sysbus_properties[] = {
> +static const Property sdhci_sysbus_properties[] = {
> DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
> DEFINE_PROP_BOOL("pending-insert-quirk", SDHCIState, pending_insert_quirk,
> false),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 57/71] hw/sparc: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (59 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 56/71] hw/sd: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 58/71] hw/sparc64: " Richard Henderson
` (11 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Mark Cave-Ayland, Artyom Tarasenko
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/sparc/sun4m.c | 2 +-
hw/sparc/sun4m_iommu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index d52e6a7213..b8cce271a7 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -732,7 +732,7 @@ static void prom_realize(DeviceState *ds, Error **errp)
sysbus_init_mmio(dev, &s->prom);
}
-static Property prom_properties[] = {
+static const Property prom_properties[] = {
{/* end of property list */},
};
diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c
index 6f765e97e4..3d6fcdf576 100644
--- a/hw/sparc/sun4m_iommu.c
+++ b/hw/sparc/sun4m_iommu.c
@@ -368,7 +368,7 @@ static void iommu_init(Object *obj)
sysbus_init_mmio(dev, &s->iomem);
}
-static Property iommu_properties[] = {
+static const Property iommu_properties[] = {
DEFINE_PROP_UINT32("version", IOMMUState, version, 0),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 58/71] hw/sparc64: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (60 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 57/71] hw/sparc: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:07 ` [PATCH 59/71] hw/ssi: " Richard Henderson
` (10 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Mark Cave-Ayland, Artyom Tarasenko
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/sparc64/sun4u.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 541c7f74fa..050cb1d1cd 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -374,7 +374,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1);
}
-static Property ebus_properties[] = {
+static const Property ebus_properties[] = {
DEFINE_PROP_UINT64("console-serial-base", EbusState,
console_serial_base, 0),
DEFINE_PROP_END_OF_LIST(),
@@ -471,7 +471,7 @@ static void prom_realize(DeviceState *ds, Error **errp)
sysbus_init_mmio(dev, &s->prom);
}
-static Property prom_properties[] = {
+static const Property prom_properties[] = {
{/* end of property list */},
};
@@ -532,7 +532,7 @@ static void ram_init(hwaddr addr, ram_addr_t RAM_size)
sysbus_mmio_map(s, 0, addr);
}
-static Property ram_properties[] = {
+static const Property ram_properties[] = {
DEFINE_PROP_UINT64("size", RamDevice, size, 0),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 59/71] hw/ssi: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (61 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 58/71] hw/sparc64: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 10:05 ` Cédric Le Goater
2024-12-13 19:07 ` [PATCH 60/71] hw/timer: " Richard Henderson
` (9 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Cédric Le Goater, Peter Maydell, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley, Alistair Francis,
Tyrone Ting, Hao Wu, Nicholas Piggin, Frédéric Barrat,
Bin Meng, Palmer Dabbelt, Edgar E. Iglesias, Francisco Iglesias,
open list:ASPEED BMCs, open list:OpenTitan,
open list:PowerNV Non-Virt...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ssi/aspeed_smc.c | 4 ++--
hw/ssi/ibex_spi_host.c | 2 +-
hw/ssi/npcm7xx_fiu.c | 2 +-
hw/ssi/pnv_spi.c | 2 +-
hw/ssi/sifive_spi.c | 2 +-
hw/ssi/ssi.c | 2 +-
hw/ssi/xilinx_spi.c | 2 +-
hw/ssi/xilinx_spips.c | 4 ++--
hw/ssi/xlnx-versal-ospi.c | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 033cbbb59b..bbdd4e4786 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -1287,7 +1287,7 @@ static const VMStateDescription vmstate_aspeed_smc = {
}
};
-static Property aspeed_smc_properties[] = {
+static const Property aspeed_smc_properties[] = {
DEFINE_PROP_BOOL("inject-failure", AspeedSMCState, inject_failure, false),
DEFINE_PROP_UINT64("dram-base", AspeedSMCState, dram_base, 0),
DEFINE_PROP_LINK("dram", AspeedSMCState, dram_mr,
@@ -1336,7 +1336,7 @@ static void aspeed_smc_flash_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
}
-static Property aspeed_smc_flash_properties[] = {
+static const Property aspeed_smc_flash_properties[] = {
DEFINE_PROP_UINT8("cs", AspeedSMCFlash, cs, 0),
DEFINE_PROP_LINK("controller", AspeedSMCFlash, controller, TYPE_ASPEED_SMC,
AspeedSMCState *),
diff --git a/hw/ssi/ibex_spi_host.c b/hw/ssi/ibex_spi_host.c
index 9e07432f7c..60a0b17b62 100644
--- a/hw/ssi/ibex_spi_host.c
+++ b/hw/ssi/ibex_spi_host.c
@@ -561,7 +561,7 @@ static const MemoryRegionOps ibex_spi_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-static Property ibex_spi_properties[] = {
+static const Property ibex_spi_properties[] = {
DEFINE_PROP_UINT32("num_cs", IbexSPIHostState, num_cs, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ssi/npcm7xx_fiu.c b/hw/ssi/npcm7xx_fiu.c
index 119c38c415..fdd3ad2fdc 100644
--- a/hw/ssi/npcm7xx_fiu.c
+++ b/hw/ssi/npcm7xx_fiu.c
@@ -541,7 +541,7 @@ static const VMStateDescription vmstate_npcm7xx_fiu = {
},
};
-static Property npcm7xx_fiu_properties[] = {
+static const Property npcm7xx_fiu_properties[] = {
DEFINE_PROP_INT32("cs-count", NPCM7xxFIUState, cs_count, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c
index c21b2ebb3c..4ca9c469a4 100644
--- a/hw/ssi/pnv_spi.c
+++ b/hw/ssi/pnv_spi.c
@@ -1195,7 +1195,7 @@ static const MemoryRegionOps pnv_spi_xscom_ops = {
.endianness = DEVICE_BIG_ENDIAN,
};
-static Property pnv_spi_properties[] = {
+static const Property pnv_spi_properties[] = {
DEFINE_PROP_UINT32("spic_num", PnvSpi, spic_num, 0),
DEFINE_PROP_UINT8("transfer_len", PnvSpi, transfer_len, 4),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c
index 08a107792b..7458747779 100644
--- a/hw/ssi/sifive_spi.c
+++ b/hw/ssi/sifive_spi.c
@@ -328,7 +328,7 @@ static void sifive_spi_realize(DeviceState *dev, Error **errp)
fifo8_create(&s->rx_fifo, FIFO_CAPACITY);
}
-static Property sifive_spi_properties[] = {
+static const Property sifive_spi_properties[] = {
DEFINE_PROP_UINT32("num-cs", SiFiveSPIState, num_cs, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
index 3f357e8f16..cab0014c3f 100644
--- a/hw/ssi/ssi.c
+++ b/hw/ssi/ssi.c
@@ -108,7 +108,7 @@ static void ssi_peripheral_realize(DeviceState *dev, Error **errp)
ssc->realize(s, errp);
}
-static Property ssi_peripheral_properties[] = {
+static const Property ssi_peripheral_properties[] = {
DEFINE_PROP_UINT8("cs", SSIPeripheral, cs_index, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index 7f1e1808c5..588c1ec071 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -361,7 +361,7 @@ static const VMStateDescription vmstate_xilinx_spi = {
}
};
-static Property xilinx_spi_properties[] = {
+static const Property xilinx_spi_properties[] = {
DEFINE_PROP_UINT8("num-ss-bits", XilinxSPI, num_cs, 1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index aeb462c3ce..f72cb3cbc8 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -1420,12 +1420,12 @@ static const VMStateDescription vmstate_xlnx_zynqmp_qspips = {
}
};
-static Property xilinx_zynqmp_qspips_properties[] = {
+static const Property xilinx_zynqmp_qspips_properties[] = {
DEFINE_PROP_UINT32("dma-burst-size", XlnxZynqMPQSPIPS, dma_burst_size, 64),
DEFINE_PROP_END_OF_LIST(),
};
-static Property xilinx_spips_properties[] = {
+static const Property xilinx_spips_properties[] = {
DEFINE_PROP_UINT8("num-busses", XilinxSPIPS, num_busses, 1),
DEFINE_PROP_UINT8("num-ss-bits", XilinxSPIPS, num_cs, 4),
DEFINE_PROP_UINT8("num-txrx-bytes", XilinxSPIPS, num_txrx_bytes, 1),
diff --git a/hw/ssi/xlnx-versal-ospi.c b/hw/ssi/xlnx-versal-ospi.c
index ecc1903b8e..e51abe9de2 100644
--- a/hw/ssi/xlnx-versal-ospi.c
+++ b/hw/ssi/xlnx-versal-ospi.c
@@ -1825,7 +1825,7 @@ static const VMStateDescription vmstate_xlnx_versal_ospi = {
}
};
-static Property xlnx_versal_ospi_properties[] = {
+static const Property xlnx_versal_ospi_properties[] = {
DEFINE_PROP_BOOL("dac-with-indac", XlnxVersalOspi, dac_with_indac, false),
DEFINE_PROP_BOOL("indac-write-disabled", XlnxVersalOspi,
ind_write_disabled, false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 59/71] hw/ssi: Constify all Property
2024-12-13 19:07 ` [PATCH 59/71] hw/ssi: " Richard Henderson
@ 2024-12-14 10:05 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:05 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Steven Lee, Troy Lee, Jamin Lin, Andrew Jeffery,
Joel Stanley, Alistair Francis, Tyrone Ting, Hao Wu,
Nicholas Piggin, Frédéric Barrat, Bin Meng,
Palmer Dabbelt, Edgar E. Iglesias, Francisco Iglesias,
open list:ASPEED BMCs, open list:OpenTitan,
open list:PowerNV Non-Virt...
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/ssi/aspeed_smc.c | 4 ++--
> hw/ssi/ibex_spi_host.c | 2 +-
> hw/ssi/npcm7xx_fiu.c | 2 +-
> hw/ssi/pnv_spi.c | 2 +-
> hw/ssi/sifive_spi.c | 2 +-
> hw/ssi/ssi.c | 2 +-
> hw/ssi/xilinx_spi.c | 2 +-
> hw/ssi/xilinx_spips.c | 4 ++--
> hw/ssi/xlnx-versal-ospi.c | 2 +-
> 9 files changed, 11 insertions(+), 11 deletions(-)
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
> index 033cbbb59b..bbdd4e4786 100644
> --- a/hw/ssi/aspeed_smc.c
> +++ b/hw/ssi/aspeed_smc.c
> @@ -1287,7 +1287,7 @@ static const VMStateDescription vmstate_aspeed_smc = {
> }
> };
>
> -static Property aspeed_smc_properties[] = {
> +static const Property aspeed_smc_properties[] = {
> DEFINE_PROP_BOOL("inject-failure", AspeedSMCState, inject_failure, false),
> DEFINE_PROP_UINT64("dram-base", AspeedSMCState, dram_base, 0),
> DEFINE_PROP_LINK("dram", AspeedSMCState, dram_mr,
> @@ -1336,7 +1336,7 @@ static void aspeed_smc_flash_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
> }
>
> -static Property aspeed_smc_flash_properties[] = {
> +static const Property aspeed_smc_flash_properties[] = {
> DEFINE_PROP_UINT8("cs", AspeedSMCFlash, cs, 0),
> DEFINE_PROP_LINK("controller", AspeedSMCFlash, controller, TYPE_ASPEED_SMC,
> AspeedSMCState *),
> diff --git a/hw/ssi/ibex_spi_host.c b/hw/ssi/ibex_spi_host.c
> index 9e07432f7c..60a0b17b62 100644
> --- a/hw/ssi/ibex_spi_host.c
> +++ b/hw/ssi/ibex_spi_host.c
> @@ -561,7 +561,7 @@ static const MemoryRegionOps ibex_spi_ops = {
> .endianness = DEVICE_LITTLE_ENDIAN,
> };
>
> -static Property ibex_spi_properties[] = {
> +static const Property ibex_spi_properties[] = {
> DEFINE_PROP_UINT32("num_cs", IbexSPIHostState, num_cs, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ssi/npcm7xx_fiu.c b/hw/ssi/npcm7xx_fiu.c
> index 119c38c415..fdd3ad2fdc 100644
> --- a/hw/ssi/npcm7xx_fiu.c
> +++ b/hw/ssi/npcm7xx_fiu.c
> @@ -541,7 +541,7 @@ static const VMStateDescription vmstate_npcm7xx_fiu = {
> },
> };
>
> -static Property npcm7xx_fiu_properties[] = {
> +static const Property npcm7xx_fiu_properties[] = {
> DEFINE_PROP_INT32("cs-count", NPCM7xxFIUState, cs_count, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c
> index c21b2ebb3c..4ca9c469a4 100644
> --- a/hw/ssi/pnv_spi.c
> +++ b/hw/ssi/pnv_spi.c
> @@ -1195,7 +1195,7 @@ static const MemoryRegionOps pnv_spi_xscom_ops = {
> .endianness = DEVICE_BIG_ENDIAN,
> };
>
> -static Property pnv_spi_properties[] = {
> +static const Property pnv_spi_properties[] = {
> DEFINE_PROP_UINT32("spic_num", PnvSpi, spic_num, 0),
> DEFINE_PROP_UINT8("transfer_len", PnvSpi, transfer_len, 4),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c
> index 08a107792b..7458747779 100644
> --- a/hw/ssi/sifive_spi.c
> +++ b/hw/ssi/sifive_spi.c
> @@ -328,7 +328,7 @@ static void sifive_spi_realize(DeviceState *dev, Error **errp)
> fifo8_create(&s->rx_fifo, FIFO_CAPACITY);
> }
>
> -static Property sifive_spi_properties[] = {
> +static const Property sifive_spi_properties[] = {
> DEFINE_PROP_UINT32("num-cs", SiFiveSPIState, num_cs, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
> index 3f357e8f16..cab0014c3f 100644
> --- a/hw/ssi/ssi.c
> +++ b/hw/ssi/ssi.c
> @@ -108,7 +108,7 @@ static void ssi_peripheral_realize(DeviceState *dev, Error **errp)
> ssc->realize(s, errp);
> }
>
> -static Property ssi_peripheral_properties[] = {
> +static const Property ssi_peripheral_properties[] = {
> DEFINE_PROP_UINT8("cs", SSIPeripheral, cs_index, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
> index 7f1e1808c5..588c1ec071 100644
> --- a/hw/ssi/xilinx_spi.c
> +++ b/hw/ssi/xilinx_spi.c
> @@ -361,7 +361,7 @@ static const VMStateDescription vmstate_xilinx_spi = {
> }
> };
>
> -static Property xilinx_spi_properties[] = {
> +static const Property xilinx_spi_properties[] = {
> DEFINE_PROP_UINT8("num-ss-bits", XilinxSPI, num_cs, 1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
> index aeb462c3ce..f72cb3cbc8 100644
> --- a/hw/ssi/xilinx_spips.c
> +++ b/hw/ssi/xilinx_spips.c
> @@ -1420,12 +1420,12 @@ static const VMStateDescription vmstate_xlnx_zynqmp_qspips = {
> }
> };
>
> -static Property xilinx_zynqmp_qspips_properties[] = {
> +static const Property xilinx_zynqmp_qspips_properties[] = {
> DEFINE_PROP_UINT32("dma-burst-size", XlnxZynqMPQSPIPS, dma_burst_size, 64),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> -static Property xilinx_spips_properties[] = {
> +static const Property xilinx_spips_properties[] = {
> DEFINE_PROP_UINT8("num-busses", XilinxSPIPS, num_busses, 1),
> DEFINE_PROP_UINT8("num-ss-bits", XilinxSPIPS, num_cs, 4),
> DEFINE_PROP_UINT8("num-txrx-bytes", XilinxSPIPS, num_txrx_bytes, 1),
> diff --git a/hw/ssi/xlnx-versal-ospi.c b/hw/ssi/xlnx-versal-ospi.c
> index ecc1903b8e..e51abe9de2 100644
> --- a/hw/ssi/xlnx-versal-ospi.c
> +++ b/hw/ssi/xlnx-versal-ospi.c
> @@ -1825,7 +1825,7 @@ static const VMStateDescription vmstate_xlnx_versal_ospi = {
> }
> };
>
> -static Property xlnx_versal_ospi_properties[] = {
> +static const Property xlnx_versal_ospi_properties[] = {
> DEFINE_PROP_BOOL("dac-with-indac", XlnxVersalOspi, dac_with_indac, false),
> DEFINE_PROP_BOOL("indac-write-disabled", XlnxVersalOspi,
> ind_write_disabled, false),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 60/71] hw/timer: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (62 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 59/71] hw/ssi: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 10:05 ` Cédric Le Goater
2024-12-13 19:07 ` [PATCH 61/71] hw/tpm: " Richard Henderson
` (8 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Beniamino Galvani, Strahinja Jankovic,
Cédric Le Goater, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Michael Rolnik, Clément Chigot,
Frederic Konrad, Michael S. Tsirkin, Paolo Bonzini,
Alistair Francis, Subbaraya Sundeep, Yoshinori Sato, Magnus Damm,
Bin Meng, Palmer Dabbelt, Mark Cave-Ayland, Edgar E. Iglesias,
open list:ARM cores, open list:OpenTitan
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/timer/a9gtimer.c | 2 +-
hw/timer/allwinner-a10-pit.c | 2 +-
hw/timer/arm_mptimer.c | 2 +-
hw/timer/arm_timer.c | 2 +-
hw/timer/aspeed_timer.c | 2 +-
hw/timer/avr_timer16.c | 2 +-
hw/timer/grlib_gptimer.c | 2 +-
hw/timer/hpet.c | 2 +-
hw/timer/i8254_common.c | 2 +-
hw/timer/ibex_timer.c | 2 +-
hw/timer/mss-timer.c | 2 +-
hw/timer/nrf51_timer.c | 2 +-
hw/timer/pxa2xx_timer.c | 2 +-
hw/timer/renesas_cmt.c | 2 +-
hw/timer/renesas_tmr.c | 2 +-
hw/timer/sifive_pwm.c | 2 +-
hw/timer/slavio_timer.c | 2 +-
hw/timer/sse-timer.c | 2 +-
hw/timer/stm32f2xx_timer.c | 2 +-
hw/timer/xilinx_timer.c | 2 +-
20 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index 8091ec18c7..c0a91bab0c 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -373,7 +373,7 @@ static const VMStateDescription vmstate_a9_gtimer = {
}
};
-static Property a9_gtimer_properties[] = {
+static const Property a9_gtimer_properties[] = {
DEFINE_PROP_UINT32("num-cpu", A9GTimerState, num_cpu, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c
index d488e9782b..2904ccfb42 100644
--- a/hw/timer/allwinner-a10-pit.c
+++ b/hw/timer/allwinner-a10-pit.c
@@ -188,7 +188,7 @@ static const MemoryRegionOps a10_pit_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-static Property a10_pit_properties[] = {
+static const Property a10_pit_properties[] = {
DEFINE_PROP_UINT32("clk0-freq", AwA10PITState, clk_freq[0], 0),
DEFINE_PROP_UINT32("clk1-freq", AwA10PITState, clk_freq[1], 0),
DEFINE_PROP_UINT32("clk2-freq", AwA10PITState, clk_freq[2], 0),
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index defa30b46d..6244a7a84f 100644
--- a/hw/timer/arm_mptimer.c
+++ b/hw/timer/arm_mptimer.c
@@ -300,7 +300,7 @@ static const VMStateDescription vmstate_arm_mptimer = {
}
};
-static Property arm_mptimer_properties[] = {
+static const Property arm_mptimer_properties[] = {
DEFINE_PROP_UINT32("num-cpu", ARMMPTimerState, num_cpu, 0),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 0940e03f1d..dfa034296c 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -387,7 +387,7 @@ static const TypeInfo icp_pit_info = {
.instance_init = icp_pit_init,
};
-static Property sp804_properties[] = {
+static const Property sp804_properties[] = {
DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
index 149f7cc5a6..4c16b5016e 100644
--- a/hw/timer/aspeed_timer.c
+++ b/hw/timer/aspeed_timer.c
@@ -674,7 +674,7 @@ static const VMStateDescription vmstate_aspeed_timer_state = {
}
};
-static Property aspeed_timer_properties[] = {
+static const Property aspeed_timer_properties[] = {
DEFINE_PROP_LINK("scu", AspeedTimerCtrlState, scu, TYPE_ASPEED_SCU,
AspeedSCUState *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/timer/avr_timer16.c b/hw/timer/avr_timer16.c
index 421920054f..2e3ce83c43 100644
--- a/hw/timer/avr_timer16.c
+++ b/hw/timer/avr_timer16.c
@@ -542,7 +542,7 @@ static const MemoryRegionOps avr_timer16_ifr_ops = {
.impl = {.max_access_size = 1}
};
-static Property avr_timer16_properties[] = {
+static const Property avr_timer16_properties[] = {
DEFINE_PROP_UINT8("id", struct AVRTimer16State, id, 0),
DEFINE_PROP_UINT64("cpu-frequency-hz", struct AVRTimer16State,
cpu_freq_hz, 0),
diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
index 6ef08f25fd..a7428ed938 100644
--- a/hw/timer/grlib_gptimer.c
+++ b/hw/timer/grlib_gptimer.c
@@ -403,7 +403,7 @@ static void grlib_gptimer_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(sbd, &unit->iomem);
}
-static Property grlib_gptimer_properties[] = {
+static const Property grlib_gptimer_properties[] = {
DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz, 40000000),
DEFINE_PROP_UINT32("irq-line", GPTimerUnit, irq_line, 8),
DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2),
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 5399f1b2a3..46886c379e 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -745,7 +745,7 @@ static void hpet_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out(dev, &s->pit_enabled, 1);
}
-static Property hpet_device_properties[] = {
+static const Property hpet_device_properties[] = {
DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0),
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index 28fdabc321..953c1e11eb 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -238,7 +238,7 @@ static const VMStateDescription vmstate_pit_common = {
}
};
-static Property pit_common_properties[] = {
+static const Property pit_common_properties[] = {
DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/ibex_timer.c b/hw/timer/ibex_timer.c
index 2bdcff532d..fba4466a89 100644
--- a/hw/timer/ibex_timer.c
+++ b/hw/timer/ibex_timer.c
@@ -263,7 +263,7 @@ static const VMStateDescription vmstate_ibex_timer = {
}
};
-static Property ibex_timer_properties[] = {
+static const Property ibex_timer_properties[] = {
DEFINE_PROP_UINT32("timebase-freq", IbexTimerState, timebase_freq, 10000),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/mss-timer.c b/hw/timer/mss-timer.c
index b66aed56ea..e5c5cd6a84 100644
--- a/hw/timer/mss-timer.c
+++ b/hw/timer/mss-timer.c
@@ -279,7 +279,7 @@ static const VMStateDescription vmstate_mss_timer = {
}
};
-static Property mss_timer_properties[] = {
+static const Property mss_timer_properties[] = {
/* Libero GUI shows 100Mhz as default for clocks */
DEFINE_PROP_UINT32("clock-frequency", MSSTimerState, freq_hz,
100 * 1000000),
diff --git a/hw/timer/nrf51_timer.c b/hw/timer/nrf51_timer.c
index 35b0e62d5b..48fccec1bf 100644
--- a/hw/timer/nrf51_timer.c
+++ b/hw/timer/nrf51_timer.c
@@ -379,7 +379,7 @@ static const VMStateDescription vmstate_nrf51_timer = {
}
};
-static Property nrf51_timer_properties[] = {
+static const Property nrf51_timer_properties[] = {
DEFINE_PROP_UINT8("id", NRF51TimerState, id, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c
index 3234bbb1f4..345145bfa8 100644
--- a/hw/timer/pxa2xx_timer.c
+++ b/hw/timer/pxa2xx_timer.c
@@ -549,7 +549,7 @@ static const VMStateDescription vmstate_pxa2xx_timer_regs = {
}
};
-static Property pxa25x_timer_dev_properties[] = {
+static const Property pxa25x_timer_dev_properties[] = {
DEFINE_PROP_UINT32("freq", PXA2xxTimerInfo, freq, PXA25X_FREQ),
DEFINE_PROP_BIT("tm4", PXA2xxTimerInfo, flags,
PXA2XX_TIMER_HAVE_TM4, false),
diff --git a/hw/timer/renesas_cmt.c b/hw/timer/renesas_cmt.c
index cd59b08c87..6d451fa86b 100644
--- a/hw/timer/renesas_cmt.c
+++ b/hw/timer/renesas_cmt.c
@@ -253,7 +253,7 @@ static const VMStateDescription vmstate_rcmt = {
}
};
-static Property rcmt_properties[] = {
+static const Property rcmt_properties[] = {
DEFINE_PROP_UINT64("input-freq", RCMTState, input_freq, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c
index a93e075fcd..890f803cf8 100644
--- a/hw/timer/renesas_tmr.c
+++ b/hw/timer/renesas_tmr.c
@@ -463,7 +463,7 @@ static const VMStateDescription vmstate_rtmr = {
}
};
-static Property rtmr_properties[] = {
+static const Property rtmr_properties[] = {
DEFINE_PROP_UINT64("input-freq", RTMRState, input_freq, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/sifive_pwm.c b/hw/timer/sifive_pwm.c
index 4602fc1a61..042c89c67a 100644
--- a/hw/timer/sifive_pwm.c
+++ b/hw/timer/sifive_pwm.c
@@ -404,7 +404,7 @@ static const VMStateDescription vmstate_sifive_pwm = {
}
};
-static Property sifive_pwm_properties[] = {
+static const Property sifive_pwm_properties[] = {
/* 0.5Ghz per spec after FSBL */
DEFINE_PROP_UINT64("clock-frequency", struct SiFivePwmState,
freq_hz, 500000000ULL),
diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
index 12cb3bac97..32991f4436 100644
--- a/hw/timer/slavio_timer.c
+++ b/hw/timer/slavio_timer.c
@@ -420,7 +420,7 @@ static void slavio_timer_init(Object *obj)
}
}
-static Property slavio_timer_properties[] = {
+static const Property slavio_timer_properties[] = {
DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/sse-timer.c b/hw/timer/sse-timer.c
index 115b0138c8..6b7a67941c 100644
--- a/hw/timer/sse-timer.c
+++ b/hw/timer/sse-timer.c
@@ -440,7 +440,7 @@ static const VMStateDescription sse_timer_vmstate = {
}
};
-static Property sse_timer_properties[] = {
+static const Property sse_timer_properties[] = {
DEFINE_PROP_LINK("counter", SSETimer, counter, TYPE_SSE_COUNTER, SSECounter *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c
index 16b47887a5..d9d745cd76 100644
--- a/hw/timer/stm32f2xx_timer.c
+++ b/hw/timer/stm32f2xx_timer.c
@@ -298,7 +298,7 @@ static const VMStateDescription vmstate_stm32f2xx_timer = {
}
};
-static Property stm32f2xx_timer_properties[] = {
+static const Property stm32f2xx_timer_properties[] = {
DEFINE_PROP_UINT64("clock-frequency", struct STM32F2XXTimerState,
freq_hz, 1000000000),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
index 32a9df69e0..7fe3e83baa 100644
--- a/hw/timer/xilinx_timer.c
+++ b/hw/timer/xilinx_timer.c
@@ -242,7 +242,7 @@ static void xilinx_timer_init(Object *obj)
sysbus_init_irq(SYS_BUS_DEVICE(obj), &t->irq);
}
-static Property xilinx_timer_properties[] = {
+static const Property xilinx_timer_properties[] = {
DEFINE_PROP_UINT32("clock-frequency", XpsTimerState, freq_hz, 62 * 1000000),
DEFINE_PROP_UINT8("one-timer-only", XpsTimerState, one_timer_only, 0),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 60/71] hw/timer: Constify all Property
2024-12-13 19:07 ` [PATCH 60/71] hw/timer: " Richard Henderson
@ 2024-12-14 10:05 ` Cédric Le Goater
0 siblings, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:05 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Peter Maydell, Beniamino Galvani, Strahinja Jankovic, Steven Lee,
Troy Lee, Jamin Lin, Andrew Jeffery, Joel Stanley, Michael Rolnik,
Clément Chigot, Frederic Konrad, Michael S. Tsirkin,
Paolo Bonzini, Alistair Francis, Subbaraya Sundeep,
Yoshinori Sato, Magnus Damm, Bin Meng, Palmer Dabbelt,
Mark Cave-Ayland, Edgar E. Iglesias, open list:ARM cores,
open list:OpenTitan
On 12/13/24 20:07, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/timer/a9gtimer.c | 2 +-
> hw/timer/allwinner-a10-pit.c | 2 +-
> hw/timer/arm_mptimer.c | 2 +-
> hw/timer/arm_timer.c | 2 +-
> hw/timer/aspeed_timer.c | 2 +-
> hw/timer/avr_timer16.c | 2 +-
> hw/timer/grlib_gptimer.c | 2 +-
> hw/timer/hpet.c | 2 +-
> hw/timer/i8254_common.c | 2 +-
> hw/timer/ibex_timer.c | 2 +-
> hw/timer/mss-timer.c | 2 +-
> hw/timer/nrf51_timer.c | 2 +-
> hw/timer/pxa2xx_timer.c | 2 +-
> hw/timer/renesas_cmt.c | 2 +-
> hw/timer/renesas_tmr.c | 2 +-
> hw/timer/sifive_pwm.c | 2 +-
> hw/timer/slavio_timer.c | 2 +-
> hw/timer/sse-timer.c | 2 +-
> hw/timer/stm32f2xx_timer.c | 2 +-
> hw/timer/xilinx_timer.c | 2 +-
> 20 files changed, 20 insertions(+), 20 deletions(-)
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
>
> diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
> index 8091ec18c7..c0a91bab0c 100644
> --- a/hw/timer/a9gtimer.c
> +++ b/hw/timer/a9gtimer.c
> @@ -373,7 +373,7 @@ static const VMStateDescription vmstate_a9_gtimer = {
> }
> };
>
> -static Property a9_gtimer_properties[] = {
> +static const Property a9_gtimer_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", A9GTimerState, num_cpu, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c
> index d488e9782b..2904ccfb42 100644
> --- a/hw/timer/allwinner-a10-pit.c
> +++ b/hw/timer/allwinner-a10-pit.c
> @@ -188,7 +188,7 @@ static const MemoryRegionOps a10_pit_ops = {
> .endianness = DEVICE_NATIVE_ENDIAN,
> };
>
> -static Property a10_pit_properties[] = {
> +static const Property a10_pit_properties[] = {
> DEFINE_PROP_UINT32("clk0-freq", AwA10PITState, clk_freq[0], 0),
> DEFINE_PROP_UINT32("clk1-freq", AwA10PITState, clk_freq[1], 0),
> DEFINE_PROP_UINT32("clk2-freq", AwA10PITState, clk_freq[2], 0),
> diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
> index defa30b46d..6244a7a84f 100644
> --- a/hw/timer/arm_mptimer.c
> +++ b/hw/timer/arm_mptimer.c
> @@ -300,7 +300,7 @@ static const VMStateDescription vmstate_arm_mptimer = {
> }
> };
>
> -static Property arm_mptimer_properties[] = {
> +static const Property arm_mptimer_properties[] = {
> DEFINE_PROP_UINT32("num-cpu", ARMMPTimerState, num_cpu, 0),
> DEFINE_PROP_END_OF_LIST()
> };
> diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
> index 0940e03f1d..dfa034296c 100644
> --- a/hw/timer/arm_timer.c
> +++ b/hw/timer/arm_timer.c
> @@ -387,7 +387,7 @@ static const TypeInfo icp_pit_info = {
> .instance_init = icp_pit_init,
> };
>
> -static Property sp804_properties[] = {
> +static const Property sp804_properties[] = {
> DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
> DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
> index 149f7cc5a6..4c16b5016e 100644
> --- a/hw/timer/aspeed_timer.c
> +++ b/hw/timer/aspeed_timer.c
> @@ -674,7 +674,7 @@ static const VMStateDescription vmstate_aspeed_timer_state = {
> }
> };
>
> -static Property aspeed_timer_properties[] = {
> +static const Property aspeed_timer_properties[] = {
> DEFINE_PROP_LINK("scu", AspeedTimerCtrlState, scu, TYPE_ASPEED_SCU,
> AspeedSCUState *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/timer/avr_timer16.c b/hw/timer/avr_timer16.c
> index 421920054f..2e3ce83c43 100644
> --- a/hw/timer/avr_timer16.c
> +++ b/hw/timer/avr_timer16.c
> @@ -542,7 +542,7 @@ static const MemoryRegionOps avr_timer16_ifr_ops = {
> .impl = {.max_access_size = 1}
> };
>
> -static Property avr_timer16_properties[] = {
> +static const Property avr_timer16_properties[] = {
> DEFINE_PROP_UINT8("id", struct AVRTimer16State, id, 0),
> DEFINE_PROP_UINT64("cpu-frequency-hz", struct AVRTimer16State,
> cpu_freq_hz, 0),
> diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
> index 6ef08f25fd..a7428ed938 100644
> --- a/hw/timer/grlib_gptimer.c
> +++ b/hw/timer/grlib_gptimer.c
> @@ -403,7 +403,7 @@ static void grlib_gptimer_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(sbd, &unit->iomem);
> }
>
> -static Property grlib_gptimer_properties[] = {
> +static const Property grlib_gptimer_properties[] = {
> DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz, 40000000),
> DEFINE_PROP_UINT32("irq-line", GPTimerUnit, irq_line, 8),
> DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2),
> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
> index 5399f1b2a3..46886c379e 100644
> --- a/hw/timer/hpet.c
> +++ b/hw/timer/hpet.c
> @@ -745,7 +745,7 @@ static void hpet_realize(DeviceState *dev, Error **errp)
> qdev_init_gpio_out(dev, &s->pit_enabled, 1);
> }
>
> -static Property hpet_device_properties[] = {
> +static const Property hpet_device_properties[] = {
> DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
> DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
> DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0),
> diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
> index 28fdabc321..953c1e11eb 100644
> --- a/hw/timer/i8254_common.c
> +++ b/hw/timer/i8254_common.c
> @@ -238,7 +238,7 @@ static const VMStateDescription vmstate_pit_common = {
> }
> };
>
> -static Property pit_common_properties[] = {
> +static const Property pit_common_properties[] = {
> DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/ibex_timer.c b/hw/timer/ibex_timer.c
> index 2bdcff532d..fba4466a89 100644
> --- a/hw/timer/ibex_timer.c
> +++ b/hw/timer/ibex_timer.c
> @@ -263,7 +263,7 @@ static const VMStateDescription vmstate_ibex_timer = {
> }
> };
>
> -static Property ibex_timer_properties[] = {
> +static const Property ibex_timer_properties[] = {
> DEFINE_PROP_UINT32("timebase-freq", IbexTimerState, timebase_freq, 10000),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/mss-timer.c b/hw/timer/mss-timer.c
> index b66aed56ea..e5c5cd6a84 100644
> --- a/hw/timer/mss-timer.c
> +++ b/hw/timer/mss-timer.c
> @@ -279,7 +279,7 @@ static const VMStateDescription vmstate_mss_timer = {
> }
> };
>
> -static Property mss_timer_properties[] = {
> +static const Property mss_timer_properties[] = {
> /* Libero GUI shows 100Mhz as default for clocks */
> DEFINE_PROP_UINT32("clock-frequency", MSSTimerState, freq_hz,
> 100 * 1000000),
> diff --git a/hw/timer/nrf51_timer.c b/hw/timer/nrf51_timer.c
> index 35b0e62d5b..48fccec1bf 100644
> --- a/hw/timer/nrf51_timer.c
> +++ b/hw/timer/nrf51_timer.c
> @@ -379,7 +379,7 @@ static const VMStateDescription vmstate_nrf51_timer = {
> }
> };
>
> -static Property nrf51_timer_properties[] = {
> +static const Property nrf51_timer_properties[] = {
> DEFINE_PROP_UINT8("id", NRF51TimerState, id, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c
> index 3234bbb1f4..345145bfa8 100644
> --- a/hw/timer/pxa2xx_timer.c
> +++ b/hw/timer/pxa2xx_timer.c
> @@ -549,7 +549,7 @@ static const VMStateDescription vmstate_pxa2xx_timer_regs = {
> }
> };
>
> -static Property pxa25x_timer_dev_properties[] = {
> +static const Property pxa25x_timer_dev_properties[] = {
> DEFINE_PROP_UINT32("freq", PXA2xxTimerInfo, freq, PXA25X_FREQ),
> DEFINE_PROP_BIT("tm4", PXA2xxTimerInfo, flags,
> PXA2XX_TIMER_HAVE_TM4, false),
> diff --git a/hw/timer/renesas_cmt.c b/hw/timer/renesas_cmt.c
> index cd59b08c87..6d451fa86b 100644
> --- a/hw/timer/renesas_cmt.c
> +++ b/hw/timer/renesas_cmt.c
> @@ -253,7 +253,7 @@ static const VMStateDescription vmstate_rcmt = {
> }
> };
>
> -static Property rcmt_properties[] = {
> +static const Property rcmt_properties[] = {
> DEFINE_PROP_UINT64("input-freq", RCMTState, input_freq, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c
> index a93e075fcd..890f803cf8 100644
> --- a/hw/timer/renesas_tmr.c
> +++ b/hw/timer/renesas_tmr.c
> @@ -463,7 +463,7 @@ static const VMStateDescription vmstate_rtmr = {
> }
> };
>
> -static Property rtmr_properties[] = {
> +static const Property rtmr_properties[] = {
> DEFINE_PROP_UINT64("input-freq", RTMRState, input_freq, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/sifive_pwm.c b/hw/timer/sifive_pwm.c
> index 4602fc1a61..042c89c67a 100644
> --- a/hw/timer/sifive_pwm.c
> +++ b/hw/timer/sifive_pwm.c
> @@ -404,7 +404,7 @@ static const VMStateDescription vmstate_sifive_pwm = {
> }
> };
>
> -static Property sifive_pwm_properties[] = {
> +static const Property sifive_pwm_properties[] = {
> /* 0.5Ghz per spec after FSBL */
> DEFINE_PROP_UINT64("clock-frequency", struct SiFivePwmState,
> freq_hz, 500000000ULL),
> diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
> index 12cb3bac97..32991f4436 100644
> --- a/hw/timer/slavio_timer.c
> +++ b/hw/timer/slavio_timer.c
> @@ -420,7 +420,7 @@ static void slavio_timer_init(Object *obj)
> }
> }
>
> -static Property slavio_timer_properties[] = {
> +static const Property slavio_timer_properties[] = {
> DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/sse-timer.c b/hw/timer/sse-timer.c
> index 115b0138c8..6b7a67941c 100644
> --- a/hw/timer/sse-timer.c
> +++ b/hw/timer/sse-timer.c
> @@ -440,7 +440,7 @@ static const VMStateDescription sse_timer_vmstate = {
> }
> };
>
> -static Property sse_timer_properties[] = {
> +static const Property sse_timer_properties[] = {
> DEFINE_PROP_LINK("counter", SSETimer, counter, TYPE_SSE_COUNTER, SSECounter *),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c
> index 16b47887a5..d9d745cd76 100644
> --- a/hw/timer/stm32f2xx_timer.c
> +++ b/hw/timer/stm32f2xx_timer.c
> @@ -298,7 +298,7 @@ static const VMStateDescription vmstate_stm32f2xx_timer = {
> }
> };
>
> -static Property stm32f2xx_timer_properties[] = {
> +static const Property stm32f2xx_timer_properties[] = {
> DEFINE_PROP_UINT64("clock-frequency", struct STM32F2XXTimerState,
> freq_hz, 1000000000),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
> index 32a9df69e0..7fe3e83baa 100644
> --- a/hw/timer/xilinx_timer.c
> +++ b/hw/timer/xilinx_timer.c
> @@ -242,7 +242,7 @@ static void xilinx_timer_init(Object *obj)
> sysbus_init_irq(SYS_BUS_DEVICE(obj), &t->irq);
> }
>
> -static Property xilinx_timer_properties[] = {
> +static const Property xilinx_timer_properties[] = {
> DEFINE_PROP_UINT32("clock-frequency", XpsTimerState, freq_hz, 62 * 1000000),
> DEFINE_PROP_UINT8("one-timer-only", XpsTimerState, one_timer_only, 0),
> DEFINE_PROP_END_OF_LIST(),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 61/71] hw/tpm: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (63 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 60/71] hw/timer: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 0:09 ` Stefan Berger
2024-12-13 19:07 ` [PATCH 62/71] hw/tricore: " Richard Henderson
` (7 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Berger
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/tpm/tpm_crb.c | 2 +-
hw/tpm/tpm_spapr.c | 2 +-
hw/tpm/tpm_tis_i2c.c | 2 +-
hw/tpm/tpm_tis_isa.c | 2 +-
hw/tpm/tpm_tis_sysbus.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 5cd5a2533b..2bf6e7ffe9 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -226,7 +226,7 @@ static const VMStateDescription vmstate_tpm_crb = {
}
};
-static Property tpm_crb_properties[] = {
+static const Property tpm_crb_properties[] = {
DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe),
DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
index 5f7a0dfc61..e15b67dd45 100644
--- a/hw/tpm/tpm_spapr.c
+++ b/hw/tpm/tpm_spapr.c
@@ -364,7 +364,7 @@ static const VMStateDescription vmstate_spapr_vtpm = {
}
};
-static Property tpm_spapr_properties[] = {
+static const Property tpm_spapr_properties[] = {
DEFINE_SPAPR_PROPERTIES(SpaprTpmState, vdev),
DEFINE_PROP_TPMBE("tpmdev", SpaprTpmState, be_driver),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c
index c5548b0a45..b27af230cd 100644
--- a/hw/tpm/tpm_tis_i2c.c
+++ b/hw/tpm/tpm_tis_i2c.c
@@ -491,7 +491,7 @@ static int tpm_tis_i2c_send(I2CSlave *i2c, uint8_t data)
return 1;
}
-static Property tpm_tis_i2c_properties[] = {
+static const Property tpm_tis_i2c_properties[] = {
DEFINE_PROP_TPMBE("tpmdev", TPMStateI2C, state.be_driver),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
index 21109edcaa..9b2160972a 100644
--- a/hw/tpm/tpm_tis_isa.c
+++ b/hw/tpm/tpm_tis_isa.c
@@ -91,7 +91,7 @@ static void tpm_tis_isa_reset(DeviceState *dev)
return tpm_tis_reset(s);
}
-static Property tpm_tis_isa_properties[] = {
+static const Property tpm_tis_isa_properties[] = {
DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ),
DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver),
DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true),
diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
index 967f264634..88c1f1e478 100644
--- a/hw/tpm/tpm_tis_sysbus.c
+++ b/hw/tpm/tpm_tis_sysbus.c
@@ -90,7 +90,7 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)
return tpm_tis_reset(s);
}
-static Property tpm_tis_sysbus_properties[] = {
+static const Property tpm_tis_sysbus_properties[] = {
DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ),
DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 61/71] hw/tpm: Constify all Property
2024-12-13 19:07 ` [PATCH 61/71] hw/tpm: " Richard Henderson
@ 2024-12-14 0:09 ` Stefan Berger
0 siblings, 0 replies; 124+ messages in thread
From: Stefan Berger @ 2024-12-14 0:09 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: Stefan Berger
On 12/13/24 2:07 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> hw/tpm/tpm_crb.c | 2 +-
> hw/tpm/tpm_spapr.c | 2 +-
> hw/tpm/tpm_tis_i2c.c | 2 +-
> hw/tpm/tpm_tis_isa.c | 2 +-
> hw/tpm/tpm_tis_sysbus.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
> index 5cd5a2533b..2bf6e7ffe9 100644
> --- a/hw/tpm/tpm_crb.c
> +++ b/hw/tpm/tpm_crb.c
> @@ -226,7 +226,7 @@ static const VMStateDescription vmstate_tpm_crb = {
> }
> };
>
> -static Property tpm_crb_properties[] = {
> +static const Property tpm_crb_properties[] = {
> DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe),
> DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
> index 5f7a0dfc61..e15b67dd45 100644
> --- a/hw/tpm/tpm_spapr.c
> +++ b/hw/tpm/tpm_spapr.c
> @@ -364,7 +364,7 @@ static const VMStateDescription vmstate_spapr_vtpm = {
> }
> };
>
> -static Property tpm_spapr_properties[] = {
> +static const Property tpm_spapr_properties[] = {
> DEFINE_SPAPR_PROPERTIES(SpaprTpmState, vdev),
> DEFINE_PROP_TPMBE("tpmdev", SpaprTpmState, be_driver),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c
> index c5548b0a45..b27af230cd 100644
> --- a/hw/tpm/tpm_tis_i2c.c
> +++ b/hw/tpm/tpm_tis_i2c.c
> @@ -491,7 +491,7 @@ static int tpm_tis_i2c_send(I2CSlave *i2c, uint8_t data)
> return 1;
> }
>
> -static Property tpm_tis_i2c_properties[] = {
> +static const Property tpm_tis_i2c_properties[] = {
> DEFINE_PROP_TPMBE("tpmdev", TPMStateI2C, state.be_driver),
> DEFINE_PROP_END_OF_LIST(),
> };
> diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
> index 21109edcaa..9b2160972a 100644
> --- a/hw/tpm/tpm_tis_isa.c
> +++ b/hw/tpm/tpm_tis_isa.c
> @@ -91,7 +91,7 @@ static void tpm_tis_isa_reset(DeviceState *dev)
> return tpm_tis_reset(s);
> }
>
> -static Property tpm_tis_isa_properties[] = {
> +static const Property tpm_tis_isa_properties[] = {
> DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ),
> DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver),
> DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true),
> diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
> index 967f264634..88c1f1e478 100644
> --- a/hw/tpm/tpm_tis_sysbus.c
> +++ b/hw/tpm/tpm_tis_sysbus.c
> @@ -90,7 +90,7 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)
> return tpm_tis_reset(s);
> }
>
> -static Property tpm_tis_sysbus_properties[] = {
> +static const Property tpm_tis_sysbus_properties[] = {
> DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ),
> DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver),
> DEFINE_PROP_END_OF_LIST(),
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 62/71] hw/tricore: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (64 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 61/71] hw/tpm: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-14 8:23 ` Bastian Koppelmann
2024-12-13 19:07 ` [PATCH 63/71] hw/ufs: " Richard Henderson
` (6 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Bastian Koppelmann
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/tricore/tc27x_soc.c | 2 +-
hw/tricore/tricore_testdevice.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
index ecd92717b5..6f50cb5116 100644
--- a/hw/tricore/tc27x_soc.c
+++ b/hw/tricore/tc27x_soc.c
@@ -201,7 +201,7 @@ static void tc27x_soc_init(Object *obj)
object_initialize_child(obj, "tc27x", &s->cpu, sc->cpu_type);
}
-static Property tc27x_soc_properties[] = {
+static const Property tc27x_soc_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c
index ae95c49565..dbdcc9704e 100644
--- a/hw/tricore/tricore_testdevice.c
+++ b/hw/tricore/tricore_testdevice.c
@@ -58,7 +58,7 @@ static void tricore_testdevice_init(Object *obj)
"tricore_testdevice", 0x4);
}
-static Property tricore_testdevice_properties[] = {
+static const Property tricore_testdevice_properties[] = {
DEFINE_PROP_END_OF_LIST()
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 63/71] hw/ufs: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (65 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 62/71] hw/tricore: " Richard Henderson
@ 2024-12-13 19:07 ` Richard Henderson
2024-12-13 19:13 ` [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (5 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Jeuk Kim
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ufs/lu.c | 2 +-
hw/ufs/ufs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ufs/lu.c b/hw/ufs/lu.c
index 81bfff9b4e..74ff52ad09 100644
--- a/hw/ufs/lu.c
+++ b/hw/ufs/lu.c
@@ -274,7 +274,7 @@ static UfsReqResult ufs_process_scsi_cmd(UfsLu *lu, UfsRequest *req)
return UFS_REQUEST_NO_COMPLETE;
}
-static Property ufs_lu_props[] = {
+static const Property ufs_lu_props[] = {
DEFINE_PROP_DRIVE("drive", UfsLu, conf.blk),
DEFINE_PROP_UINT8("lun", UfsLu, lun, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index 79f786ed4e..fe77158439 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -1752,7 +1752,7 @@ static void ufs_exit(PCIDevice *pci_dev)
}
}
-static Property ufs_props[] = {
+static const Property ufs_props[] = {
DEFINE_PROP_STRING("serial", UfsHc, params.serial),
DEFINE_PROP_UINT8("nutrs", UfsHc, params.nutrs, 32),
DEFINE_PROP_UINT8("nutmrs", UfsHc, params.nutmrs, 8),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 00/71] whole-tree: Constify Property structures
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (66 preceding siblings ...)
2024-12-13 19:07 ` [PATCH 63/71] hw/ufs: " Richard Henderson
@ 2024-12-13 19:13 ` Richard Henderson
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
` (4 subsequent siblings)
72 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:13 UTC (permalink / raw)
To: qemu-devel
On 12/13/24 13:06, Richard Henderson wrote:
> Since d36f165d952 (qdev: make properties array "const"), we can
> define our Property structure const. Do this across the entire tree.
>
> There are a few other minor changes:
> - Two instances where it was obvious that an empty property list
> could be removed entirely. There are other empty lists that
> probably should be removed, but I didn't look further into usage.
> - In hw/misc/xlnx-versal-trng.c, adjust a Property to use the
> correct PropertyInfo in the definition, rather than setting
> it at runtime.
> - One instance where { } was used instead of DEFINE_PROP_END_OF_LIST.
> Not a bug, but wrong style.
I also meant to report that for qemu-system-aarch64 (the only one I checked), this moves
150k from .data to .data.rel.ro. I'm somewhat surprised there's that many, or that
Property is as large as it is at 88 bytes.
r~
^ permalink raw reply [flat|nested] 124+ messages in thread* [PATCH 63/71] hw/ufs: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (67 preceding siblings ...)
2024-12-13 19:13 ` [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
@ 2024-12-13 19:29 ` Richard Henderson
2024-12-13 19:29 ` [PATCH 64/71] hw/usb: " Richard Henderson
` (5 more replies)
2024-12-13 19:31 ` [PATCH 70/71] tests/unit: Constify all Property Richard Henderson
` (3 subsequent siblings)
72 siblings, 6 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Jeuk Kim
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ufs/lu.c | 2 +-
hw/ufs/ufs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ufs/lu.c b/hw/ufs/lu.c
index 81bfff9b4e..74ff52ad09 100644
--- a/hw/ufs/lu.c
+++ b/hw/ufs/lu.c
@@ -274,7 +274,7 @@ static UfsReqResult ufs_process_scsi_cmd(UfsLu *lu, UfsRequest *req)
return UFS_REQUEST_NO_COMPLETE;
}
-static Property ufs_lu_props[] = {
+static const Property ufs_lu_props[] = {
DEFINE_PROP_DRIVE("drive", UfsLu, conf.blk),
DEFINE_PROP_UINT8("lun", UfsLu, lun, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index 79f786ed4e..fe77158439 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -1752,7 +1752,7 @@ static void ufs_exit(PCIDevice *pci_dev)
}
}
-static Property ufs_props[] = {
+static const Property ufs_props[] = {
DEFINE_PROP_STRING("serial", UfsHc, params.serial),
DEFINE_PROP_UINT8("nutrs", UfsHc, params.nutrs, 32),
DEFINE_PROP_UINT8("nutmrs", UfsHc, params.nutmrs, 8),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 64/71] hw/usb: Constify all Property
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
@ 2024-12-13 19:29 ` Richard Henderson
2024-12-13 19:29 ` [PATCH 65/71] hw/vfio: " Richard Henderson
` (4 subsequent siblings)
5 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Hongren (Zenithal) Zheng, Canokeys.org, Samuel Thibault
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/usb/bus.c | 2 +-
hw/usb/canokey.c | 2 +-
hw/usb/ccid-card-emulated.c | 2 +-
hw/usb/ccid-card-passthru.c | 2 +-
hw/usb/dev-audio.c | 2 +-
hw/usb/dev-hid.c | 6 +++---
hw/usb/dev-hub.c | 2 +-
hw/usb/dev-mtp.c | 2 +-
hw/usb/dev-network.c | 2 +-
hw/usb/dev-serial.c | 4 ++--
hw/usb/dev-smartcard-reader.c | 4 ++--
hw/usb/dev-storage-classic.c | 2 +-
hw/usb/dev-uas.c | 2 +-
hw/usb/hcd-dwc2.c | 2 +-
hw/usb/hcd-dwc3.c | 2 +-
hw/usb/hcd-ehci-pci.c | 2 +-
hw/usb/hcd-ehci-sysbus.c | 2 +-
hw/usb/hcd-ohci-pci.c | 2 +-
hw/usb/hcd-ohci-sysbus.c | 2 +-
hw/usb/hcd-uhci.c | 4 ++--
hw/usb/hcd-xhci-nec.c | 2 +-
hw/usb/hcd-xhci-sysbus.c | 2 +-
hw/usb/hcd-xhci.c | 2 +-
hw/usb/host-libusb.c | 2 +-
hw/usb/redirect.c | 2 +-
hw/usb/u2f-emulated.c | 2 +-
hw/usb/u2f-passthru.c | 2 +-
27 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index bfab2807d7..80e6a92820 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -18,7 +18,7 @@ static char *usb_get_dev_path(DeviceState *dev);
static char *usb_get_fw_dev_path(DeviceState *qdev);
static void usb_qdev_unrealize(DeviceState *qdev);
-static Property usb_props[] = {
+static const Property usb_props[] = {
DEFINE_PROP_STRING("port", USBDevice, port_path),
DEFINE_PROP_STRING("serial", USBDevice, serial),
DEFINE_PROP_BIT("msos-desc", USBDevice, flags,
diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c
index b306eeb20e..7cb600e3c8 100644
--- a/hw/usb/canokey.c
+++ b/hw/usb/canokey.c
@@ -296,7 +296,7 @@ static void canokey_unrealize(USBDevice *base)
trace_canokey_unrealize();
}
-static Property canokey_properties[] = {
+static const Property canokey_properties[] = {
DEFINE_PROP_STRING("file", CanoKeyState, file),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 3ee9c73b87..dd58333943 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -582,7 +582,7 @@ static void emulated_unrealize(CCIDCardState *base)
qemu_mutex_destroy(&card->event_list_mutex);
}
-static Property emulated_card_properties[] = {
+static const Property emulated_card_properties[] = {
DEFINE_PROP_STRING("backend", EmulatedState, backend_str),
DEFINE_PROP_STRING("cert1", EmulatedState, cert1),
DEFINE_PROP_STRING("cert2", EmulatedState, cert2),
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index a515703904..f97dcf767f 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -388,7 +388,7 @@ static const VMStateDescription passthru_vmstate = {
}
};
-static Property passthru_card_properties[] = {
+static const Property passthru_card_properties[] = {
DEFINE_PROP_CHR("chardev", PassthruState, cs),
DEFINE_PROP_UINT8("debug", PassthruState, debug, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
index 1897fff9e6..6007f16d30 100644
--- a/hw/usb/dev-audio.c
+++ b/hw/usb/dev-audio.c
@@ -990,7 +990,7 @@ static const VMStateDescription vmstate_usb_audio = {
.unmigratable = 1,
};
-static Property usb_audio_properties[] = {
+static const Property usb_audio_properties[] = {
DEFINE_AUDIO_PROPERTIES(USBAudioState, card),
DEFINE_PROP_UINT32("debug", USBAudioState, debug, 0),
DEFINE_PROP_UINT32("buffer", USBAudioState, buffer_user, 0),
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index 9e358c934e..d83f67b984 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -793,7 +793,7 @@ static const TypeInfo usb_hid_type_info = {
.class_init = usb_hid_class_initfn,
};
-static Property usb_tablet_properties[] = {
+static const Property usb_tablet_properties[] = {
DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2),
DEFINE_PROP_STRING("display", USBHIDState, display),
DEFINE_PROP_UINT32("head", USBHIDState, head, 0),
@@ -818,7 +818,7 @@ static const TypeInfo usb_tablet_info = {
.class_init = usb_tablet_class_initfn,
};
-static Property usb_mouse_properties[] = {
+static const Property usb_mouse_properties[] = {
DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2),
DEFINE_PROP_END_OF_LIST(),
};
@@ -841,7 +841,7 @@ static const TypeInfo usb_mouse_info = {
.class_init = usb_mouse_class_initfn,
};
-static Property usb_keyboard_properties[] = {
+static const Property usb_keyboard_properties[] = {
DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2),
DEFINE_PROP_STRING("display", USBHIDState, display),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index 2c3640c705..317ca0b081 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -665,7 +665,7 @@ static const VMStateDescription vmstate_usb_hub = {
}
};
-static Property usb_hub_properties[] = {
+static const Property usb_hub_properties[] = {
DEFINE_PROP_UINT32("ports", USBHubState, num_ports, 8),
DEFINE_PROP_BOOL("port-power", USBHubState, port_power, false),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 554b397e88..7994727e5e 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -2078,7 +2078,7 @@ static const VMStateDescription vmstate_usb_mtp = {
}
};
-static Property mtp_properties[] = {
+static const Property mtp_properties[] = {
DEFINE_PROP_STRING("rootdir", MTPState, root),
DEFINE_PROP_STRING("desc", MTPState, desc),
DEFINE_PROP_BOOL("readonly", MTPState, readonly, true),
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index d00d68b21d..6c4f5776d4 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -1407,7 +1407,7 @@ static const VMStateDescription vmstate_usb_net = {
.unmigratable = 1,
};
-static Property net_properties[] = {
+static const Property net_properties[] = {
DEFINE_NIC_PROPERTIES(USBNetState, conf),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 63047d79cf..0c3e9160ec 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -634,7 +634,7 @@ static const VMStateDescription vmstate_usb_serial = {
.unmigratable = 1,
};
-static Property serial_properties[] = {
+static const Property serial_properties[] = {
DEFINE_PROP_CHR("chardev", USBSerialState, cs),
DEFINE_PROP_BOOL("always-plugged", USBSerialState, always_plugged, false),
DEFINE_PROP_END_OF_LIST(),
@@ -677,7 +677,7 @@ static const TypeInfo serial_info = {
.class_init = usb_serial_class_initfn,
};
-static Property braille_properties[] = {
+static const Property braille_properties[] = {
DEFINE_PROP_CHR("chardev", USBSerialState, cs),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index c0d63e0425..c3c02f0aad 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1171,7 +1171,7 @@ static Answer *ccid_peek_next_answer(USBCCIDState *s)
: &s->pending_answers[s->pending_answers_start % PENDING_ANSWERS_NUM];
}
-static Property ccid_props[] = {
+static const Property ccid_props[] = {
DEFINE_PROP_UINT32("slot", struct CCIDCardState, slot, 0),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1431,7 +1431,7 @@ static const VMStateDescription ccid_vmstate = {
}
};
-static Property ccid_properties[] = {
+static const Property ccid_properties[] = {
DEFINE_PROP_UINT8("debug", USBCCIDState, debug, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/dev-storage-classic.c b/hw/usb/dev-storage-classic.c
index 6147387dc6..ca037ba96f 100644
--- a/hw/usb/dev-storage-classic.c
+++ b/hw/usb/dev-storage-classic.c
@@ -67,7 +67,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
s->scsi_dev = scsi_dev;
}
-static Property msd_properties[] = {
+static const Property msd_properties[] = {
DEFINE_BLOCK_PROPERTIES(MSDState, conf),
DEFINE_BLOCK_ERROR_PROPERTIES(MSDState, conf),
DEFINE_PROP_BOOL("removable", MSDState, removable, false),
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 1804cb6799..57e8d20051 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -953,7 +953,7 @@ static const VMStateDescription vmstate_usb_uas = {
}
};
-static Property uas_properties[] = {
+static const Property uas_properties[] = {
DEFINE_PROP_UINT32("log-scsi-req", UASDevice, requestlog, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c
index b4f0652c7d..6a10f3e9cd 100644
--- a/hw/usb/hcd-dwc2.c
+++ b/hw/usb/hcd-dwc2.c
@@ -1448,7 +1448,7 @@ const VMStateDescription vmstate_dwc2_state = {
}
};
-static Property dwc2_usb_properties[] = {
+static const Property dwc2_usb_properties[] = {
DEFINE_PROP_UINT32("usb_version", DWC2State, usb_version, 2),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/hcd-dwc3.c b/hw/usb/hcd-dwc3.c
index e7d8c7924b..ff970bd989 100644
--- a/hw/usb/hcd-dwc3.c
+++ b/hw/usb/hcd-dwc3.c
@@ -656,7 +656,7 @@ static const VMStateDescription vmstate_usb_dwc3 = {
}
};
-static Property usb_dwc3_properties[] = {
+static const Property usb_dwc3_properties[] = {
DEFINE_PROP_UINT32("DWC_USB3_USERID", USBDWC3, cfg.dwc_usb3_user,
0x12345678),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index dd06451e23..374f25c5ed 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -135,7 +135,7 @@ static void usb_ehci_pci_write_config(PCIDevice *dev, uint32_t addr,
i->ehci.as = busmaster ? pci_get_address_space(dev) : &address_space_memory;
}
-static Property ehci_pci_properties[] = {
+static const Property ehci_pci_properties[] = {
DEFINE_PROP_UINT32("maxframes", EHCIPCIState, ehci.maxframes, 128),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
index eb7df93ac2..f4e08aab89 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -30,7 +30,7 @@ static const VMStateDescription vmstate_ehci_sysbus = {
}
};
-static Property ehci_sysbus_properties[] = {
+static const Property ehci_sysbus_properties[] = {
DEFINE_PROP_UINT32("maxframes", EHCISysBusState, ehci.maxframes, 128),
DEFINE_PROP_BOOL("companion-enable", EHCISysBusState, ehci.companion_enable,
false),
diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c
index 47fb659806..459644cc1b 100644
--- a/hw/usb/hcd-ohci-pci.c
+++ b/hw/usb/hcd-ohci-pci.c
@@ -109,7 +109,7 @@ static void usb_ohci_reset_pci(DeviceState *d)
ohci_hard_reset(s);
}
-static Property ohci_pci_properties[] = {
+static const Property ohci_pci_properties[] = {
DEFINE_PROP_STRING("masterbus", OHCIPCIState, masterbus),
DEFINE_PROP_UINT32("num-ports", OHCIPCIState, num_ports, 3),
DEFINE_PROP_UINT32("firstport", OHCIPCIState, firstport, 0),
diff --git a/hw/usb/hcd-ohci-sysbus.c b/hw/usb/hcd-ohci-sysbus.c
index 313e1e71bb..81cf2e558d 100644
--- a/hw/usb/hcd-ohci-sysbus.c
+++ b/hw/usb/hcd-ohci-sysbus.c
@@ -57,7 +57,7 @@ static void ohci_sysbus_reset(DeviceState *dev)
ohci_hard_reset(ohci);
}
-static Property ohci_sysbus_properties[] = {
+static const Property ohci_sysbus_properties[] = {
DEFINE_PROP_STRING("masterbus", OHCISysBusState, masterbus),
DEFINE_PROP_UINT32("num-ports", OHCISysBusState, num_ports, 3),
DEFINE_PROP_UINT32("firstport", OHCISysBusState, firstport, 0),
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 65c1f93cc9..245352c231 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1227,14 +1227,14 @@ static void usb_uhci_exit(PCIDevice *dev)
}
}
-static Property uhci_properties_companion[] = {
+static const Property uhci_properties_companion[] = {
DEFINE_PROP_STRING("masterbus", UHCIState, masterbus),
DEFINE_PROP_UINT32("firstport", UHCIState, firstport, 0),
DEFINE_PROP_UINT32("bandwidth", UHCIState, frame_bandwidth, 1280),
DEFINE_PROP_UINT32("maxframes", UHCIState, maxframes, 128),
DEFINE_PROP_END_OF_LIST(),
};
-static Property uhci_properties_standalone[] = {
+static const Property uhci_properties_standalone[] = {
DEFINE_PROP_UINT32("bandwidth", UHCIState, frame_bandwidth, 1280),
DEFINE_PROP_UINT32("maxframes", UHCIState, maxframes, 128),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index 0c063b3697..b582cf8f8d 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -38,7 +38,7 @@ struct XHCINecState {
uint32_t slots;
};
-static Property nec_xhci_properties[] = {
+static const Property nec_xhci_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO),
DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS),
diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index 59cf7fd4ab..f4dbad7cc6 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -82,7 +82,7 @@ void xhci_sysbus_build_aml(Aml *scope, uint32_t mmio, unsigned int irq)
aml_append(scope, dev);
}
-static Property xhci_sysbus_props[] = {
+static const Property xhci_sysbus_props[] = {
DEFINE_PROP_UINT32("intrs", XHCISysbusState, xhci.numintrs, XHCI_MAXINTRS),
DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index d85adaca0d..3c5006f425 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3605,7 +3605,7 @@ const VMStateDescription vmstate_xhci = {
}
};
-static Property xhci_properties[] = {
+static const Property xhci_properties[] = {
DEFINE_PROP_BIT("streams", XHCIState, flags,
XHCI_FLAG_ENABLE_STREAMS, true),
DEFINE_PROP_UINT32("p2", XHCIState, numports_2, 4),
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 691bc881fb..85d33b51ba 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1758,7 +1758,7 @@ static const VMStateDescription vmstate_usb_host = {
}
};
-static Property usb_host_dev_properties[] = {
+static const Property usb_host_dev_properties[] = {
DEFINE_PROP_UINT32("hostbus", USBHostDevice, match.bus_num, 0),
DEFINE_PROP_UINT32("hostaddr", USBHostDevice, match.addr, 0),
DEFINE_PROP_STRING("hostport", USBHostDevice, match.port),
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 0f2dd2e504..f72a612d5a 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -2573,7 +2573,7 @@ static const VMStateDescription usbredir_vmstate = {
}
};
-static Property usbredir_properties[] = {
+static const Property usbredir_properties[] = {
DEFINE_PROP_CHR("chardev", USBRedirDevice, cs),
DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, usbredirparser_warning),
DEFINE_PROP_STRING("filter", USBRedirDevice, filter_str),
diff --git a/hw/usb/u2f-emulated.c b/hw/usb/u2f-emulated.c
index 63cceaa5fc..df86ce97fc 100644
--- a/hw/usb/u2f-emulated.c
+++ b/hw/usb/u2f-emulated.c
@@ -369,7 +369,7 @@ static void u2f_emulated_unrealize(U2FKeyState *base)
}
}
-static Property u2f_emulated_properties[] = {
+static const Property u2f_emulated_properties[] = {
DEFINE_PROP_STRING("dir", U2FEmulatedState, dir),
DEFINE_PROP_STRING("cert", U2FEmulatedState, cert),
DEFINE_PROP_STRING("privkey", U2FEmulatedState, privkey),
diff --git a/hw/usb/u2f-passthru.c b/hw/usb/u2f-passthru.c
index c4a783d128..ec4f6165d8 100644
--- a/hw/usb/u2f-passthru.c
+++ b/hw/usb/u2f-passthru.c
@@ -516,7 +516,7 @@ static const VMStateDescription u2f_passthru_vmstate = {
}
};
-static Property u2f_passthru_properties[] = {
+static const Property u2f_passthru_properties[] = {
DEFINE_PROP_STRING("hidraw", U2FPassthruState, hidraw),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 65/71] hw/vfio: Constify all Property
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
2024-12-13 19:29 ` [PATCH 64/71] hw/usb: " Richard Henderson
@ 2024-12-13 19:29 ` Richard Henderson
2024-12-14 11:58 ` Cédric Le Goater
2024-12-20 20:41 ` Eric Farman
2024-12-13 19:30 ` [PATCH 66/71] hw/virtio: " Richard Henderson
` (3 subsequent siblings)
5 siblings, 2 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:29 UTC (permalink / raw)
To: qemu-devel
Cc: Tony Krowiak, Halil Pasic, Jason Herne, Thomas Huth,
Alex Williamson, Cédric Le Goater, Eric Farman,
Matthew Rosato, open list:vfio-ap
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/vfio/ap.c | 2 +-
hw/vfio/ccw.c | 2 +-
hw/vfio/pci.c | 4 ++--
hw/vfio/platform.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 4013e7b436..2e6ea2dd93 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -191,7 +191,7 @@ static void vfio_ap_unrealize(DeviceState *dev)
g_free(vapdev->vdev.name);
}
-static Property vfio_ap_properties[] = {
+static const Property vfio_ap_properties[] = {
DEFINE_PROP_STRING("sysfsdev", VFIOAPDevice, vdev.sysfsdev),
#ifdef CONFIG_IOMMUFD
DEFINE_PROP_LINK("iommufd", VFIOAPDevice, vdev.iommufd,
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index c1cd7736cd..b96ab27e12 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -655,7 +655,7 @@ static void vfio_ccw_unrealize(DeviceState *dev)
}
}
-static Property vfio_ccw_properties[] = {
+static const Property vfio_ccw_properties[] = {
DEFINE_PROP_STRING("sysfsdev", VFIOCCWDevice, vdev.sysfsdev),
DEFINE_PROP_BOOL("force-orb-pfch", VFIOCCWDevice, force_orb_pfch, false),
#ifdef CONFIG_IOMMUFD
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 14bcc725c3..93aca850e3 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3354,7 +3354,7 @@ static void vfio_instance_init(Object *obj)
pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
}
-static Property vfio_pci_dev_properties[] = {
+static const Property vfio_pci_dev_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host),
DEFINE_PROP_UUID_NODEFAULT("vf-token", VFIOPCIDevice, vf_token),
DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev),
@@ -3451,7 +3451,7 @@ static const TypeInfo vfio_pci_dev_info = {
},
};
-static Property vfio_pci_dev_nohotplug_properties[] = {
+static const Property vfio_pci_dev_nohotplug_properties[] = {
DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
ON_OFF_AUTO_AUTO),
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index a85c199c76..766e8a86ef 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -629,7 +629,7 @@ static const VMStateDescription vfio_platform_vmstate = {
.unmigratable = 1,
};
-static Property vfio_platform_dev_properties[] = {
+static const Property vfio_platform_dev_properties[] = {
DEFINE_PROP_STRING("host", VFIOPlatformDevice, vbasedev.name),
DEFINE_PROP_STRING("sysfsdev", VFIOPlatformDevice, vbasedev.sysfsdev),
DEFINE_PROP_BOOL("x-no-mmap", VFIOPlatformDevice, vbasedev.no_mmap, false),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 65/71] hw/vfio: Constify all Property
2024-12-13 19:29 ` [PATCH 65/71] hw/vfio: " Richard Henderson
@ 2024-12-14 11:58 ` Cédric Le Goater
2024-12-20 20:41 ` Eric Farman
1 sibling, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 11:58 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Tony Krowiak, Halil Pasic, Jason Herne, Thomas Huth,
Alex Williamson, Eric Farman, Matthew Rosato, open list:vfio-ap
On 12/13/24 20:29, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/vfio/ap.c | 2 +-
> hw/vfio/ccw.c | 2 +-
> hw/vfio/pci.c | 4 ++--
> hw/vfio/platform.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 4013e7b436..2e6ea2dd93 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -191,7 +191,7 @@ static void vfio_ap_unrealize(DeviceState *dev)
> g_free(vapdev->vdev.name);
> }
>
> -static Property vfio_ap_properties[] = {
> +static const Property vfio_ap_properties[] = {
> DEFINE_PROP_STRING("sysfsdev", VFIOAPDevice, vdev.sysfsdev),
> #ifdef CONFIG_IOMMUFD
> DEFINE_PROP_LINK("iommufd", VFIOAPDevice, vdev.iommufd,
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index c1cd7736cd..b96ab27e12 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -655,7 +655,7 @@ static void vfio_ccw_unrealize(DeviceState *dev)
> }
> }
>
> -static Property vfio_ccw_properties[] = {
> +static const Property vfio_ccw_properties[] = {
> DEFINE_PROP_STRING("sysfsdev", VFIOCCWDevice, vdev.sysfsdev),
> DEFINE_PROP_BOOL("force-orb-pfch", VFIOCCWDevice, force_orb_pfch, false),
> #ifdef CONFIG_IOMMUFD
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index 14bcc725c3..93aca850e3 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -3354,7 +3354,7 @@ static void vfio_instance_init(Object *obj)
> pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
> }
>
> -static Property vfio_pci_dev_properties[] = {
> +static const Property vfio_pci_dev_properties[] = {
> DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host),
> DEFINE_PROP_UUID_NODEFAULT("vf-token", VFIOPCIDevice, vf_token),
> DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev),
> @@ -3451,7 +3451,7 @@ static const TypeInfo vfio_pci_dev_info = {
> },
> };
>
> -static Property vfio_pci_dev_nohotplug_properties[] = {
> +static const Property vfio_pci_dev_nohotplug_properties[] = {
> DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
> DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
> ON_OFF_AUTO_AUTO),
> diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
> index a85c199c76..766e8a86ef 100644
> --- a/hw/vfio/platform.c
> +++ b/hw/vfio/platform.c
> @@ -629,7 +629,7 @@ static const VMStateDescription vfio_platform_vmstate = {
> .unmigratable = 1,
> };
>
> -static Property vfio_platform_dev_properties[] = {
> +static const Property vfio_platform_dev_properties[] = {
> DEFINE_PROP_STRING("host", VFIOPlatformDevice, vbasedev.name),
> DEFINE_PROP_STRING("sysfsdev", VFIOPlatformDevice, vbasedev.sysfsdev),
> DEFINE_PROP_BOOL("x-no-mmap", VFIOPlatformDevice, vbasedev.no_mmap, false),
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 65/71] hw/vfio: Constify all Property
2024-12-13 19:29 ` [PATCH 65/71] hw/vfio: " Richard Henderson
2024-12-14 11:58 ` Cédric Le Goater
@ 2024-12-20 20:41 ` Eric Farman
1 sibling, 0 replies; 124+ messages in thread
From: Eric Farman @ 2024-12-20 20:41 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Tony Krowiak, Halil Pasic, Jason Herne, Thomas Huth,
Alex Williamson, Cédric Le Goater, Matthew Rosato,
open list:vfio-ap
On Fri, 2024-12-13 at 13:29 -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/vfio/ap.c | 2 +-
> hw/vfio/ccw.c | 2 +-
> hw/vfio/pci.c | 4 ++--
> hw/vfio/platform.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Eric Farman <farman@linux.ibm.com>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 66/71] hw/virtio: Constify all Property
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
2024-12-13 19:29 ` [PATCH 64/71] hw/usb: " Richard Henderson
2024-12-13 19:29 ` [PATCH 65/71] hw/vfio: " Richard Henderson
@ 2024-12-13 19:30 ` Richard Henderson
2024-12-13 19:30 ` [PATCH 67/71] hw/watchdog: " Richard Henderson
` (2 subsequent siblings)
5 siblings, 0 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:30 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Stefano Garzarella, Raphael Norwitz,
Alex Bennée, Stefan Hajnoczi, Viresh Kumar, Gerd Hoffmann,
Mathieu Poirier, reviewer:vhost-user-scmi, Manos Pitsidianakis,
David Hildenbrand, Gonglei (Arei), Eric Auger, Alexander Graf,
Dorjoy Chowdhury, Laurent Vivier, Amit Shah, open list:virtiofs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/virtio/vdpa-dev-pci.c | 2 +-
hw/virtio/vdpa-dev.c | 2 +-
hw/virtio/vhost-scsi-pci.c | 2 +-
hw/virtio/vhost-user-blk-pci.c | 2 +-
hw/virtio/vhost-user-device.c | 2 +-
hw/virtio/vhost-user-fs-pci.c | 2 +-
hw/virtio/vhost-user-fs.c | 2 +-
hw/virtio/vhost-user-gpio.c | 2 +-
hw/virtio/vhost-user-i2c.c | 2 +-
hw/virtio/vhost-user-input.c | 2 +-
hw/virtio/vhost-user-rng-pci.c | 2 +-
hw/virtio/vhost-user-rng.c | 2 +-
hw/virtio/vhost-user-scmi.c | 2 +-
hw/virtio/vhost-user-scsi-pci.c | 2 +-
hw/virtio/vhost-user-snd-pci.c | 2 +-
hw/virtio/vhost-user-snd.c | 2 +-
hw/virtio/vhost-user-vsock-pci.c | 2 +-
hw/virtio/vhost-user-vsock.c | 2 +-
hw/virtio/vhost-vsock-common.c | 2 +-
hw/virtio/vhost-vsock-pci.c | 2 +-
hw/virtio/vhost-vsock.c | 2 +-
hw/virtio/virtio-9p-pci.c | 2 +-
hw/virtio/virtio-balloon.c | 2 +-
hw/virtio/virtio-blk-pci.c | 2 +-
hw/virtio/virtio-crypto-pci.c | 2 +-
hw/virtio/virtio-crypto.c | 2 +-
hw/virtio/virtio-input-pci.c | 2 +-
hw/virtio/virtio-iommu-pci.c | 2 +-
hw/virtio/virtio-iommu.c | 2 +-
hw/virtio/virtio-mem.c | 2 +-
hw/virtio/virtio-mmio.c | 2 +-
hw/virtio/virtio-net-pci.c | 2 +-
hw/virtio/virtio-nsm.c | 2 +-
hw/virtio/virtio-pci.c | 4 ++--
hw/virtio/virtio-pmem.c | 2 +-
hw/virtio/virtio-rng-pci.c | 2 +-
hw/virtio/virtio-rng.c | 2 +-
hw/virtio/virtio-scsi-pci.c | 2 +-
hw/virtio/virtio-serial-pci.c | 2 +-
hw/virtio/virtio.c | 2 +-
40 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/hw/virtio/vdpa-dev-pci.c b/hw/virtio/vdpa-dev-pci.c
index 5446e6b393..d0ee240e9d 100644
--- a/hw/virtio/vdpa-dev-pci.c
+++ b/hw/virtio/vdpa-dev-pci.c
@@ -48,7 +48,7 @@ static void vhost_vdpa_device_pci_instance_init(Object *obj)
"bootindex");
}
-static Property vhost_vdpa_device_pci_properties[] = {
+static const Property vhost_vdpa_device_pci_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 64b96b226c..61849b3b0e 100644
--- a/hw/virtio/vdpa-dev.c
+++ b/hw/virtio/vdpa-dev.c
@@ -337,7 +337,7 @@ static void vhost_vdpa_device_set_status(VirtIODevice *vdev, uint8_t status)
}
}
-static Property vhost_vdpa_device_properties[] = {
+static const Property vhost_vdpa_device_properties[] = {
DEFINE_PROP_STRING("vhostdev", VhostVdpaDevice, vhostdev),
DEFINE_PROP_UINT16("queue-size", VhostVdpaDevice, queue_size, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-scsi-pci.c b/hw/virtio/vhost-scsi-pci.c
index 08980bc23b..7536b37f18 100644
--- a/hw/virtio/vhost-scsi-pci.c
+++ b/hw/virtio/vhost-scsi-pci.c
@@ -38,7 +38,7 @@ struct VHostSCSIPCI {
VHostSCSI vdev;
};
-static Property vhost_scsi_pci_properties[] = {
+static const Property vhost_scsi_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
DEV_NVECTORS_UNSPECIFIED),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-user-blk-pci.c b/hw/virtio/vhost-user-blk-pci.c
index eef8641a98..99f1472023 100644
--- a/hw/virtio/vhost-user-blk-pci.c
+++ b/hw/virtio/vhost-user-blk-pci.c
@@ -43,7 +43,7 @@ struct VHostUserBlkPCI {
VHostUserBlk vdev;
};
-static Property vhost_user_blk_pci_properties[] = {
+static const Property vhost_user_blk_pci_properties[] = {
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
DEV_NVECTORS_UNSPECIFIED),
diff --git a/hw/virtio/vhost-user-device.c b/hw/virtio/vhost-user-device.c
index 67aa934710..3222b67bd9 100644
--- a/hw/virtio/vhost-user-device.c
+++ b/hw/virtio/vhost-user-device.c
@@ -29,7 +29,7 @@ static const VMStateDescription vud_vmstate = {
.unmigratable = 1,
};
-static Property vud_properties[] = {
+static const Property vud_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_UINT16("virtio-id", VHostUserBase, virtio_id, 0),
DEFINE_PROP_UINT32("vq_size", VHostUserBase, vq_size, 64),
diff --git a/hw/virtio/vhost-user-fs-pci.c b/hw/virtio/vhost-user-fs-pci.c
index 6829b8b743..9ba6c40655 100644
--- a/hw/virtio/vhost-user-fs-pci.c
+++ b/hw/virtio/vhost-user-fs-pci.c
@@ -29,7 +29,7 @@ typedef struct VHostUserFSPCI VHostUserFSPCI;
DECLARE_INSTANCE_CHECKER(VHostUserFSPCI, VHOST_USER_FS_PCI,
TYPE_VHOST_USER_FS_PCI)
-static Property vhost_user_fs_pci_properties[] = {
+static const Property vhost_user_fs_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
DEV_NVECTORS_UNSPECIFIED),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c
index 32ee7f496d..c0462329a5 100644
--- a/hw/virtio/vhost-user-fs.c
+++ b/hw/virtio/vhost-user-fs.c
@@ -403,7 +403,7 @@ static const VMStateDescription vuf_backend_vmstate = {
},
};
-static Property vuf_properties[] = {
+static const Property vuf_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserFS, conf.chardev),
DEFINE_PROP_STRING("tag", VHostUserFS, conf.tag),
DEFINE_PROP_UINT16("num-request-queues", VHostUserFS,
diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c
index 9f37c25415..c997c66d80 100644
--- a/hw/virtio/vhost-user-gpio.c
+++ b/hw/virtio/vhost-user-gpio.c
@@ -14,7 +14,7 @@
#include "standard-headers/linux/virtio_ids.h"
#include "standard-headers/linux/virtio_gpio.h"
-static Property vgpio_properties[] = {
+static const Property vgpio_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c
index a464f5e039..b0a5cbf3ea 100644
--- a/hw/virtio/vhost-user-i2c.c
+++ b/hw/virtio/vhost-user-i2c.c
@@ -14,7 +14,7 @@
#include "qemu/error-report.h"
#include "standard-headers/linux/virtio_ids.h"
-static Property vi2c_properties[] = {
+static const Property vi2c_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-input.c b/hw/virtio/vhost-user-input.c
index bedec0468c..c57cc461bb 100644
--- a/hw/virtio/vhost-user-input.c
+++ b/hw/virtio/vhost-user-input.c
@@ -7,7 +7,7 @@
#include "qemu/osdep.h"
#include "hw/virtio/virtio-input.h"
-static Property vinput_properties[] = {
+static const Property vinput_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-rng-pci.c b/hw/virtio/vhost-user-rng-pci.c
index f64935453b..0016ee74ce 100644
--- a/hw/virtio/vhost-user-rng-pci.c
+++ b/hw/virtio/vhost-user-rng-pci.c
@@ -23,7 +23,7 @@ typedef struct VHostUserRNGPCI VHostUserRNGPCI;
DECLARE_INSTANCE_CHECKER(VHostUserRNGPCI, VHOST_USER_RNG_PCI,
TYPE_VHOST_USER_RNG_PCI)
-static Property vhost_user_rng_pci_properties[] = {
+static const Property vhost_user_rng_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
DEV_NVECTORS_UNSPECIFIED),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c
index 01879c863d..c9985b5fad 100644
--- a/hw/virtio/vhost-user-rng.c
+++ b/hw/virtio/vhost-user-rng.c
@@ -20,7 +20,7 @@ static const VMStateDescription vu_rng_vmstate = {
.unmigratable = 1,
};
-static Property vrng_properties[] = {
+static const Property vrng_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-scmi.c b/hw/virtio/vhost-user-scmi.c
index 300847e672..a15e6916ef 100644
--- a/hw/virtio/vhost-user-scmi.c
+++ b/hw/virtio/vhost-user-scmi.c
@@ -277,7 +277,7 @@ static const VMStateDescription vu_scmi_vmstate = {
.unmigratable = 1,
};
-static Property vu_scmi_properties[] = {
+static const Property vu_scmi_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserSCMI, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-scsi-pci.c b/hw/virtio/vhost-user-scsi-pci.c
index 75882e3cf9..b2f6451f48 100644
--- a/hw/virtio/vhost-user-scsi-pci.c
+++ b/hw/virtio/vhost-user-scsi-pci.c
@@ -44,7 +44,7 @@ struct VHostUserSCSIPCI {
VHostUserSCSI vdev;
};
-static Property vhost_user_scsi_pci_properties[] = {
+static const Property vhost_user_scsi_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
DEV_NVECTORS_UNSPECIFIED),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-user-snd-pci.c b/hw/virtio/vhost-user-snd-pci.c
index d61cfdae63..5cf3557b7e 100644
--- a/hw/virtio/vhost-user-snd-pci.c
+++ b/hw/virtio/vhost-user-snd-pci.c
@@ -23,7 +23,7 @@ typedef struct VHostUserSoundPCI VHostUserSoundPCI;
DECLARE_INSTANCE_CHECKER(VHostUserSoundPCI, VHOST_USER_SND_PCI,
TYPE_VHOST_USER_SND_PCI)
-static Property vhost_user_snd_pci_properties[] = {
+static const Property vhost_user_snd_pci_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-snd.c b/hw/virtio/vhost-user-snd.c
index 9a217543f8..8810a9f699 100644
--- a/hw/virtio/vhost-user-snd.c
+++ b/hw/virtio/vhost-user-snd.c
@@ -21,7 +21,7 @@ static const VMStateDescription vu_snd_vmstate = {
.unmigratable = 1,
};
-static Property vsnd_properties[] = {
+static const Property vsnd_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserBase, chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-vsock-pci.c b/hw/virtio/vhost-user-vsock-pci.c
index e5a86e8013..529d967059 100644
--- a/hw/virtio/vhost-user-vsock-pci.c
+++ b/hw/virtio/vhost-user-vsock-pci.c
@@ -31,7 +31,7 @@ struct VHostUserVSockPCI {
/* vhost-user-vsock-pci */
-static Property vhost_user_vsock_pci_properties[] = {
+static const Property vhost_user_vsock_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-user-vsock.c b/hw/virtio/vhost-user-vsock.c
index da3b0e0229..97885bfeab 100644
--- a/hw/virtio/vhost-user-vsock.c
+++ b/hw/virtio/vhost-user-vsock.c
@@ -148,7 +148,7 @@ static void vuv_device_unrealize(DeviceState *dev)
}
-static Property vuv_properties[] = {
+static const Property vuv_properties[] = {
DEFINE_PROP_CHR("chardev", VHostUserVSock, conf.chardev),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c
index fd88df2560..cb2253c39f 100644
--- a/hw/virtio/vhost-vsock-common.c
+++ b/hw/virtio/vhost-vsock-common.c
@@ -285,7 +285,7 @@ static struct vhost_dev *vhost_vsock_common_get_vhost(VirtIODevice *vdev)
return &vvc->vhost_dev;
}
-static Property vhost_vsock_common_properties[] = {
+static const Property vhost_vsock_common_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("seqpacket", VHostVSockCommon, seqpacket,
ON_OFF_AUTO_AUTO),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c
index 9f34414d38..1d9abd02bd 100644
--- a/hw/virtio/vhost-vsock-pci.c
+++ b/hw/virtio/vhost-vsock-pci.c
@@ -35,7 +35,7 @@ struct VHostVSockPCI {
/* vhost-vsock-pci */
-static Property vhost_vsock_pci_properties[] = {
+static const Property vhost_vsock_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
index 3d4a5a97f4..ce80e84494 100644
--- a/hw/virtio/vhost-vsock.c
+++ b/hw/virtio/vhost-vsock.c
@@ -205,7 +205,7 @@ static void vhost_vsock_device_unrealize(DeviceState *dev)
vhost_vsock_common_unrealize(vdev);
}
-static Property vhost_vsock_properties[] = {
+static const Property vhost_vsock_properties[] = {
DEFINE_PROP_UINT64("guest-cid", VHostVSock, conf.guest_cid, 0),
DEFINE_PROP_STRING("vhostfd", VHostVSock, conf.vhostfd),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/virtio-9p-pci.c b/hw/virtio/virtio-9p-pci.c
index 94c14f0b98..b33faf2fbb 100644
--- a/hw/virtio/virtio-9p-pci.c
+++ b/hw/virtio/virtio-9p-pci.c
@@ -43,7 +43,7 @@ static void virtio_9p_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
}
-static Property virtio_9p_pci_properties[] = {
+static const Property virtio_9p_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index afd2ad6dd6..ab2ee30475 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -1015,7 +1015,7 @@ static const VMStateDescription vmstate_virtio_balloon = {
},
};
-static Property virtio_balloon_properties[] = {
+static const Property virtio_balloon_properties[] = {
DEFINE_PROP_BIT("deflate-on-oom", VirtIOBalloon, host_features,
VIRTIO_BALLOON_F_DEFLATE_ON_OOM, false),
DEFINE_PROP_BIT("free-page-hint", VirtIOBalloon, host_features,
diff --git a/hw/virtio/virtio-blk-pci.c b/hw/virtio/virtio-blk-pci.c
index 9743bee965..abdcc11b2e 100644
--- a/hw/virtio/virtio-blk-pci.c
+++ b/hw/virtio/virtio-blk-pci.c
@@ -38,7 +38,7 @@ struct VirtIOBlkPCI {
VirtIOBlock vdev;
};
-static Property virtio_blk_pci_properties[] = {
+static const Property virtio_blk_pci_properties[] = {
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c
index 0783dc2f7e..23c85fe586 100644
--- a/hw/virtio/virtio-crypto-pci.c
+++ b/hw/virtio/virtio-crypto-pci.c
@@ -37,7 +37,7 @@ struct VirtIOCryptoPCI {
VirtIOCrypto vdev;
};
-static Property virtio_crypto_pci_properties[] = {
+static const Property virtio_crypto_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c
index c3ffd8328d..9ae0b02598 100644
--- a/hw/virtio/virtio-crypto.c
+++ b/hw/virtio/virtio-crypto.c
@@ -1128,7 +1128,7 @@ static const VMStateDescription vmstate_virtio_crypto = {
},
};
-static Property virtio_crypto_properties[] = {
+static const Property virtio_crypto_properties[] = {
DEFINE_PROP_LINK("cryptodev", VirtIOCrypto, conf.cryptodev,
TYPE_CRYPTODEV_BACKEND, CryptoDevBackend *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c
index a53edf46c4..55c0b0555b 100644
--- a/hw/virtio/virtio-input-pci.c
+++ b/hw/virtio/virtio-input-pci.c
@@ -37,7 +37,7 @@ struct VirtIOInputHIDPCI {
VirtIOInputHID vdev;
};
-static Property virtio_input_pci_properties[] = {
+static const Property virtio_input_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c
index cbdfe4c591..92adf63684 100644
--- a/hw/virtio/virtio-iommu-pci.c
+++ b/hw/virtio/virtio-iommu-pci.c
@@ -34,7 +34,7 @@ struct VirtIOIOMMUPCI {
VirtIOIOMMU vdev;
};
-static Property virtio_iommu_pci_properties[] = {
+static const Property virtio_iommu_pci_properties[] = {
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_ARRAY("reserved-regions", VirtIOIOMMUPCI,
vdev.nr_prop_resv_regions, vdev.prop_resv_regions,
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 59ef4fb217..576ad8383f 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -1655,7 +1655,7 @@ static const VMStateDescription vmstate_virtio_iommu = {
},
};
-static Property virtio_iommu_properties[] = {
+static const Property virtio_iommu_properties[] = {
DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus,
TYPE_PCI_BUS, PCIBus *),
DEFINE_PROP_BOOL("boot-bypass", VirtIOIOMMU, boot_bypass, true),
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
index 80ada89551..3f6f46fad7 100644
--- a/hw/virtio/virtio-mem.c
+++ b/hw/virtio/virtio-mem.c
@@ -1680,7 +1680,7 @@ static void virtio_mem_instance_finalize(Object *obj)
vmem->mr = NULL;
}
-static Property virtio_mem_properties[] = {
+static const Property virtio_mem_properties[] = {
DEFINE_PROP_UINT64(VIRTIO_MEM_ADDR_PROP, VirtIOMEM, addr, 0),
DEFINE_PROP_UINT32(VIRTIO_MEM_NODE_PROP, VirtIOMEM, node, 0),
DEFINE_PROP_BOOL(VIRTIO_MEM_PREALLOC_PROP, VirtIOMEM, prealloc, false),
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index e3366fe54c..49d9fe8f30 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -751,7 +751,7 @@ static void virtio_mmio_pre_plugged(DeviceState *d, Error **errp)
/* virtio-mmio device */
-static Property virtio_mmio_properties[] = {
+static const Property virtio_mmio_properties[] = {
DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy,
format_transport_address, true),
DEFINE_PROP_BOOL("force-legacy", VirtIOMMIOProxy, legacy, true),
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
index e03543a70a..e86094ae22 100644
--- a/hw/virtio/virtio-net-pci.c
+++ b/hw/virtio/virtio-net-pci.c
@@ -38,7 +38,7 @@ struct VirtIONetPCI {
VirtIONet vdev;
};
-static Property virtio_net_properties[] = {
+static const Property virtio_net_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
diff --git a/hw/virtio/virtio-nsm.c b/hw/virtio/virtio-nsm.c
index a3db8eef3e..7b85a3f4f7 100644
--- a/hw/virtio/virtio-nsm.c
+++ b/hw/virtio/virtio-nsm.c
@@ -1698,7 +1698,7 @@ static const VMStateDescription vmstate_virtio_nsm = {
},
};
-static Property virtio_nsm_properties[] = {
+static const Property virtio_nsm_properties[] = {
DEFINE_PROP_STRING("module-id", VirtIONSM, module_id),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 5c6c2019ce..de41cb5ef2 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2349,7 +2349,7 @@ static void virtio_pci_bus_reset_hold(Object *obj, ResetType type)
}
}
-static Property virtio_pci_properties[] = {
+static const Property virtio_pci_properties[] = {
DEFINE_PROP_BIT("virtio-pci-bus-master-bug-migration", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false),
DEFINE_PROP_BIT("migrate-extra", VirtIOPCIProxy, flags,
@@ -2431,7 +2431,7 @@ static const TypeInfo virtio_pci_info = {
.abstract = true,
};
-static Property virtio_pci_generic_properties[] = {
+static const Property virtio_pci_generic_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("disable-legacy", VirtIOPCIProxy, disable_legacy,
ON_OFF_AUTO_AUTO),
DEFINE_PROP_BOOL("disable-modern", VirtIOPCIProxy, disable_modern, false),
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
index c3512c2dae..f6f3b5ddaf 100644
--- a/hw/virtio/virtio-pmem.c
+++ b/hw/virtio/virtio-pmem.c
@@ -155,7 +155,7 @@ static MemoryRegion *virtio_pmem_get_memory_region(VirtIOPMEM *pmem,
return &pmem->memdev->mr;
}
-static Property virtio_pmem_properties[] = {
+static const Property virtio_pmem_properties[] = {
DEFINE_PROP_UINT64(VIRTIO_PMEM_ADDR_PROP, VirtIOPMEM, start, 0),
DEFINE_PROP_LINK(VIRTIO_PMEM_MEMDEV_PROP, VirtIOPMEM, memdev,
TYPE_MEMORY_BACKEND, HostMemoryBackend *),
diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c
index 6e76f8b57b..398f432237 100644
--- a/hw/virtio/virtio-rng-pci.c
+++ b/hw/virtio/virtio-rng-pci.c
@@ -32,7 +32,7 @@ struct VirtIORngPCI {
VirtIORNG vdev;
};
-static Property virtio_rng_properties[] = {
+static const Property virtio_rng_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 7cf31da071..13a1a0b236 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -249,7 +249,7 @@ static const VMStateDescription vmstate_virtio_rng = {
},
};
-static Property virtio_rng_properties[] = {
+static const Property virtio_rng_properties[] = {
/* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If
* you have an entropy source capable of generating more entropy than this
* and you can pass it through via virtio-rng, then hats off to you. Until
diff --git a/hw/virtio/virtio-scsi-pci.c b/hw/virtio/virtio-scsi-pci.c
index e8e3442f38..733b5756db 100644
--- a/hw/virtio/virtio-scsi-pci.c
+++ b/hw/virtio/virtio-scsi-pci.c
@@ -35,7 +35,7 @@ struct VirtIOSCSIPCI {
VirtIOSCSI vdev;
};
-static Property virtio_scsi_pci_properties[] = {
+static const Property virtio_scsi_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
diff --git a/hw/virtio/virtio-serial-pci.c b/hw/virtio/virtio-serial-pci.c
index cea31adcc4..bda643ec54 100644
--- a/hw/virtio/virtio-serial-pci.c
+++ b/hw/virtio/virtio-serial-pci.c
@@ -69,7 +69,7 @@ static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
}
-static Property virtio_serial_pci_properties[] = {
+static const Property virtio_serial_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index f12c4aa81e..7fcdb55ba4 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -4012,7 +4012,7 @@ static void virtio_device_instance_finalize(Object *obj)
g_free(vdev->vector_queues);
}
-static Property virtio_properties[] = {
+static const Property virtio_properties[] = {
DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
DEFINE_PROP_BOOL("use-started", VirtIODevice, use_started, true),
DEFINE_PROP_BOOL("use-disabled-flag", VirtIODevice, use_disabled_flag, true),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 67/71] hw/watchdog: Constify all Property
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
` (2 preceding siblings ...)
2024-12-13 19:30 ` [PATCH 66/71] hw/virtio: " Richard Henderson
@ 2024-12-13 19:30 ` Richard Henderson
2024-12-14 10:15 ` Cédric Le Goater
2024-12-16 13:17 ` Leif Lindholm
2024-12-13 19:30 ` [PATCH 68/71] hw/xen: " Richard Henderson
2024-12-13 19:30 ` [PATCH 69/71] hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties Richard Henderson
5 siblings, 2 replies; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:30 UTC (permalink / raw)
To: qemu-devel
Cc: Radoslaw Biernacki, Peter Maydell, Leif Lindholm,
Marcin Juszkiewicz, Cédric Le Goater, Steven Lee, Troy Lee,
Jamin Lin, Andrew Jeffery, Joel Stanley, Jean-Christophe Dubois,
open list:SBSA-REF
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/watchdog/sbsa_gwdt.c | 2 +-
hw/watchdog/wdt_aspeed.c | 2 +-
hw/watchdog/wdt_imx2.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c
index 80f9b36e79..2e25d4b4e9 100644
--- a/hw/watchdog/sbsa_gwdt.c
+++ b/hw/watchdog/sbsa_gwdt.c
@@ -262,7 +262,7 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Error **errp)
dev);
}
-static Property wdt_sbsa_gwdt_props[] = {
+static const Property wdt_sbsa_gwdt_props[] = {
/*
* Timer frequency in Hz. This must match the frequency used by
* the CPU's generic timer. Default 62.5Hz matches QEMU's legacy
diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
index 39c3f362a8..c95877e5c7 100644
--- a/hw/watchdog/wdt_aspeed.c
+++ b/hw/watchdog/wdt_aspeed.c
@@ -288,7 +288,7 @@ static void aspeed_wdt_realize(DeviceState *dev, Error **errp)
sysbus_init_mmio(sbd, &s->iomem);
}
-static Property aspeed_wdt_properties[] = {
+static const Property aspeed_wdt_properties[] = {
DEFINE_PROP_LINK("scu", AspeedWDTState, scu, TYPE_ASPEED_SCU,
AspeedSCUState *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c
index 8162d58afa..61fbd91ee4 100644
--- a/hw/watchdog/wdt_imx2.c
+++ b/hw/watchdog/wdt_imx2.c
@@ -281,7 +281,7 @@ static void imx2_wdt_realize(DeviceState *dev, Error **errp)
}
}
-static Property imx2_wdt_properties[] = {
+static const Property imx2_wdt_properties[] = {
DEFINE_PROP_BOOL("pretimeout-support", IMX2WdtState, pretimeout_support,
false),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* Re: [PATCH 67/71] hw/watchdog: Constify all Property
2024-12-13 19:30 ` [PATCH 67/71] hw/watchdog: " Richard Henderson
@ 2024-12-14 10:15 ` Cédric Le Goater
2024-12-16 13:17 ` Leif Lindholm
1 sibling, 0 replies; 124+ messages in thread
From: Cédric Le Goater @ 2024-12-14 10:15 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Radoslaw Biernacki, Peter Maydell, Leif Lindholm,
Marcin Juszkiewicz, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Jean-Christophe Dubois,
open list:SBSA-REF
On 12/13/24 20:30, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
For the aspeed part,
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/watchdog/sbsa_gwdt.c | 2 +-
> hw/watchdog/wdt_aspeed.c | 2 +-
> hw/watchdog/wdt_imx2.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c
> index 80f9b36e79..2e25d4b4e9 100644
> --- a/hw/watchdog/sbsa_gwdt.c
> +++ b/hw/watchdog/sbsa_gwdt.c
> @@ -262,7 +262,7 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Error **errp)
> dev);
> }
>
> -static Property wdt_sbsa_gwdt_props[] = {
> +static const Property wdt_sbsa_gwdt_props[] = {
> /*
> * Timer frequency in Hz. This must match the frequency used by
> * the CPU's generic timer. Default 62.5Hz matches QEMU's legacy
> diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
> index 39c3f362a8..c95877e5c7 100644
> --- a/hw/watchdog/wdt_aspeed.c
> +++ b/hw/watchdog/wdt_aspeed.c
> @@ -288,7 +288,7 @@ static void aspeed_wdt_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property aspeed_wdt_properties[] = {
> +static const Property aspeed_wdt_properties[] = {
> DEFINE_PROP_LINK("scu", AspeedWDTState, scu, TYPE_ASPEED_SCU,
> AspeedSCUState *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c
> index 8162d58afa..61fbd91ee4 100644
> --- a/hw/watchdog/wdt_imx2.c
> +++ b/hw/watchdog/wdt_imx2.c
> @@ -281,7 +281,7 @@ static void imx2_wdt_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property imx2_wdt_properties[] = {
> +static const Property imx2_wdt_properties[] = {
> DEFINE_PROP_BOOL("pretimeout-support", IMX2WdtState, pretimeout_support,
> false),
> DEFINE_PROP_END_OF_LIST()
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 67/71] hw/watchdog: Constify all Property
2024-12-13 19:30 ` [PATCH 67/71] hw/watchdog: " Richard Henderson
2024-12-14 10:15 ` Cédric Le Goater
@ 2024-12-16 13:17 ` Leif Lindholm
1 sibling, 0 replies; 124+ messages in thread
From: Leif Lindholm @ 2024-12-16 13:17 UTC (permalink / raw)
To: Richard Henderson
Cc: qemu-devel, Radoslaw Biernacki, Peter Maydell, Marcin Juszkiewicz,
Cédric Le Goater, Steven Lee, Troy Lee, Jamin Lin,
Andrew Jeffery, Joel Stanley, Jean-Christophe Dubois,
open list:SBSA-REF
On Fri, 13 Dec 2024 at 19:30, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
For sbsa:
Reviewed-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
/
Leif
> ---
> hw/watchdog/sbsa_gwdt.c | 2 +-
> hw/watchdog/wdt_aspeed.c | 2 +-
> hw/watchdog/wdt_imx2.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c
> index 80f9b36e79..2e25d4b4e9 100644
> --- a/hw/watchdog/sbsa_gwdt.c
> +++ b/hw/watchdog/sbsa_gwdt.c
> @@ -262,7 +262,7 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Error **errp)
> dev);
> }
>
> -static Property wdt_sbsa_gwdt_props[] = {
> +static const Property wdt_sbsa_gwdt_props[] = {
> /*
> * Timer frequency in Hz. This must match the frequency used by
> * the CPU's generic timer. Default 62.5Hz matches QEMU's legacy
> diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
> index 39c3f362a8..c95877e5c7 100644
> --- a/hw/watchdog/wdt_aspeed.c
> +++ b/hw/watchdog/wdt_aspeed.c
> @@ -288,7 +288,7 @@ static void aspeed_wdt_realize(DeviceState *dev, Error **errp)
> sysbus_init_mmio(sbd, &s->iomem);
> }
>
> -static Property aspeed_wdt_properties[] = {
> +static const Property aspeed_wdt_properties[] = {
> DEFINE_PROP_LINK("scu", AspeedWDTState, scu, TYPE_ASPEED_SCU,
> AspeedSCUState *),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c
> index 8162d58afa..61fbd91ee4 100644
> --- a/hw/watchdog/wdt_imx2.c
> +++ b/hw/watchdog/wdt_imx2.c
> @@ -281,7 +281,7 @@ static void imx2_wdt_realize(DeviceState *dev, Error **errp)
> }
> }
>
> -static Property imx2_wdt_properties[] = {
> +static const Property imx2_wdt_properties[] = {
> DEFINE_PROP_BOOL("pretimeout-support", IMX2WdtState, pretimeout_support,
> false),
> DEFINE_PROP_END_OF_LIST()
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 124+ messages in thread
* [PATCH 68/71] hw/xen: Constify all Property
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
` (3 preceding siblings ...)
2024-12-13 19:30 ` [PATCH 67/71] hw/watchdog: " Richard Henderson
@ 2024-12-13 19:30 ` Richard Henderson
2024-12-14 17:53 ` Jason Andryuk
2024-12-13 19:30 ` [PATCH 69/71] hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties Richard Henderson
5 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:30 UTC (permalink / raw)
To: qemu-devel
Cc: Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/xen/xen-bus.c | 2 +-
hw/xen/xen-legacy-backend.c | 4 ++--
hw/xen/xen_pt.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 95b207ac8b..0d7defb8cd 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -1092,7 +1092,7 @@ unrealize:
xen_device_unrealize(dev);
}
-static Property xen_device_props[] = {
+static const Property xen_device_props[] = {
DEFINE_PROP_UINT16("frontend-id", XenDevice, frontend_id,
DOMID_INVALID),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index e8e1ee4f7d..b15393e934 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -635,7 +635,7 @@ int xen_be_bind_evtchn(struct XenLegacyDevice *xendev)
}
-static Property xendev_properties[] = {
+static const Property xendev_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
@@ -674,7 +674,7 @@ static const TypeInfo xensysbus_info = {
}
};
-static Property xen_sysdev_properties[] = {
+static const Property xen_sysdev_properties[] = {
{/* end of property list */},
};
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 3635d1b39f..557aa98be4 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -931,7 +931,7 @@ static void xen_pt_unregister_device(PCIDevice *d)
xen_pt_destroy(d);
}
-static Property xen_pci_passthrough_properties[] = {
+static const Property xen_pci_passthrough_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("hostaddr", XenPCIPassthroughState, hostaddr),
DEFINE_PROP_BOOL("permissive", XenPCIPassthroughState, permissive, false),
DEFINE_PROP_END_OF_LIST(),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 69/71] hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
` (4 preceding siblings ...)
2024-12-13 19:30 ` [PATCH 68/71] hw/xen: " Richard Henderson
@ 2024-12-13 19:30 ` Richard Henderson
2024-12-14 17:54 ` Jason Andryuk
5 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:30 UTC (permalink / raw)
To: qemu-devel
Cc: Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias, open list:X86 Xen CPUs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/xen/xen-legacy-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index b15393e934..f6ad58fe13 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -675,7 +675,7 @@ static const TypeInfo xensysbus_info = {
};
static const Property xen_sysdev_properties[] = {
- {/* end of property list */},
+ DEFINE_PROP_END_OF_LIST(),
};
static void xen_sysdev_class_init(ObjectClass *klass, void *data)
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [PATCH 70/71] tests/unit: Constify all Property
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (68 preceding siblings ...)
2024-12-13 19:29 ` [PATCH 63/71] hw/ufs: Constify all Property Richard Henderson
@ 2024-12-13 19:31 ` Richard Henderson
2024-12-13 19:31 ` [PATCH 71/71] docs: Constify all Property in examples Richard Henderson
2024-12-13 19:43 ` [PATCH 00/71] whole-tree: Constify Property structures Philippe Mathieu-Daudé
` (2 subsequent siblings)
72 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Daniel P. Berrangé, Eduardo Habkost
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/unit/test-qdev-global-props.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/unit/test-qdev-global-props.c b/tests/unit/test-qdev-global-props.c
index c8862cac5f..1eb95d2429 100644
--- a/tests/unit/test-qdev-global-props.c
+++ b/tests/unit/test-qdev-global-props.c
@@ -46,7 +46,7 @@ struct MyType {
uint32_t prop2;
};
-static Property static_props[] = {
+static const Property static_props[] = {
DEFINE_PROP_UINT32("prop1", MyType, prop1, PROP_DEFAULT),
DEFINE_PROP_UINT32("prop2", MyType, prop2, PROP_DEFAULT),
DEFINE_PROP_END_OF_LIST()
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread* [PATCH 71/71] docs: Constify all Property in examples
2024-12-13 19:31 ` [PATCH 70/71] tests/unit: Constify all Property Richard Henderson
@ 2024-12-13 19:31 ` Richard Henderson
2024-12-16 14:47 ` Peter Xu
0 siblings, 1 reply; 124+ messages in thread
From: Richard Henderson @ 2024-12-13 19:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Xu, Fabiano Rosas, Michael S. Tsirkin
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
docs/devel/migration/compatibility.rst | 4 ++--
docs/devel/virtio-backends.rst | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/devel/migration/compatibility.rst b/docs/devel/migration/compatibility.rst
index 5a5417ef06..c787f53738 100644
--- a/docs/devel/migration/compatibility.rst
+++ b/docs/devel/migration/compatibility.rst
@@ -198,7 +198,7 @@ was done::
The relevant parts for migration are::
- @@ -1281,7 +1284,8 @@ static Property virtio_blk_properties[] = {
+ @@ -1281,7 +1284,8 @@ static const Property virtio_blk_properties[] = {
#endif
DEFINE_PROP_BIT("request-merging", VirtIOBlock, conf.request_merging, 0,
true),
@@ -395,7 +395,7 @@ the old behaviour or the new behaviour::
index 8a87ccc8b0..5153ad63d6 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
- @@ -79,6 +79,8 @@ static Property pci_props[] = {
+ @@ -79,6 +79,8 @@ static const Property pci_props[] = {
DEFINE_PROP_STRING("failover_pair_id", PCIDevice,
failover_pair_id),
DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0),
diff --git a/docs/devel/virtio-backends.rst b/docs/devel/virtio-backends.rst
index 9ff092e7a0..a6f9df4845 100644
--- a/docs/devel/virtio-backends.rst
+++ b/docs/devel/virtio-backends.rst
@@ -101,7 +101,7 @@ manually instantiated:
VirtIOBlock vdev;
};
- static Property virtio_blk_pci_properties[] = {
+ static const Property virtio_blk_pci_properties[] = {
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
--
2.43.0
^ permalink raw reply related [flat|nested] 124+ messages in thread
* Re: [PATCH 00/71] whole-tree: Constify Property structures
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (69 preceding siblings ...)
2024-12-13 19:31 ` [PATCH 70/71] tests/unit: Constify all Property Richard Henderson
@ 2024-12-13 19:43 ` Philippe Mathieu-Daudé
2024-12-14 18:40 ` Bernhard Beschow
2024-12-15 9:31 ` Paolo Bonzini
72 siblings, 0 replies; 124+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-13 19:43 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
On 13/12/24 20:06, Richard Henderson wrote:
> Since d36f165d952 (qdev: make properties array "const"), we can
> define our Property structure const. Do this across the entire tree.
>
> There are a few other minor changes:
> - Two instances where it was obvious that an empty property list
> could be removed entirely. There are other empty lists that
> probably should be removed, but I didn't look further into usage.
> - In hw/misc/xlnx-versal-trng.c, adjust a Property to use the
> correct PropertyInfo in the definition, rather than setting
> it at runtime.
> - One instance where { } was used instead of DEFINE_PROP_END_OF_LIST.
> Not a bug, but wrong style.
>
>
> r~
>
>
> Richard Henderson (71):
> target/arm: Constify all Property
> target/avr: Constify all Property
> target/hexagon: Constify all Property
> target/i386: Constify all Property
> target/microblaze: Constify all Property
> target/mips: Constify all Property
> target/ppc: Remove empty property list
> target/riscv: Constify all Property
> target/s390x: Constify all Property
> target/sparc: Constify all Property and PropertyInfo
> cpu-target: Constify all Property
> hw/9pfs: Constify all Property
> hw/acpi: Constify all Property
> hw/adc: Constify all Property
> hw/arm: Constify all Property
> hw/audio: Constify all Property
> hw/avr: Constify all Property
> hw/block/xen-block: Unexport PropertyInfo
> hw/block: Constify all Property
> hw/char: Constify all Property
> hw/core: Constify all Property
> hw/cpu: Constify all Property
> hw/cxl: Constify all Property
> hw/display: Constify all Property
> hw/dma: Constify all Property
> hw/gpio: Constify all Property
> hw/hyperv: Constify all Property
> hw/i2c: Constify all Property
> hw/i386: Constify all Property
> hw/ide: Constify all Property
> hw/input: Constify all Property
> hw/intc: Constify all Property
> hw/ipack: Constify all Property
> hw/ipmi: Constify all Property
> hw/isa: Constify all Property
> hw/m68k: Constify all Property
> hw/mem: Constify all Property
> hw/mips: Constify all Property
> hw/misc/xlnx-versal-trng: Constify trng_props
> hw/misc: Constify all Property
> hw/net: Constify all Property
> hw/nubus: Constify all Property
> hw/nvme: Constify all Property
> hw/nvram: Constify all Property
> hw/pci-bridge: Constify all Property
> hw/pci-host/astro: Remove empty Property list
> hw/pci-host: Constify all Property
> hw/pci: Constify all Property
> hw/ppc: Constify all Property
> hw/remote: Constify all Property
> hw/riscv: Constify all Property
> hw/rtc: Constify all Property
> hw/rx: Constify all Property
> hw/s390x: Constify all Property
> hw/scsi: Constify all Property
> hw/sd: Constify all Property
> hw/sparc: Constify all Property
> hw/sparc64: Constify all Property
> hw/ssi: Constify all Property
> hw/timer: Constify all Property
> hw/tpm: Constify all Property
> hw/tricore: Constify all Property
> hw/ufs: Constify all Property
> hw/usb: Constify all Property
> hw/vfio: Constify all Property
> hw/virtio: Constify all Property
> hw/watchdog: Constify all Property
> hw/xen: Constify all Property
> hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties
> tests/unit: Constify all Property
> docs: Constify all Property in examples
Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 00/71] whole-tree: Constify Property structures
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (70 preceding siblings ...)
2024-12-13 19:43 ` [PATCH 00/71] whole-tree: Constify Property structures Philippe Mathieu-Daudé
@ 2024-12-14 18:40 ` Bernhard Beschow
2024-12-15 18:13 ` Richard Henderson
2024-12-15 9:31 ` Paolo Bonzini
72 siblings, 1 reply; 124+ messages in thread
From: Bernhard Beschow @ 2024-12-14 18:40 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Am 13. Dezember 2024 19:06:30 UTC schrieb Richard Henderson <richard.henderson@linaro.org>:
>Since d36f165d952 (qdev: make properties array "const"), we can
>define our Property structure const. Do this across the entire tree.
>
>There are a few other minor changes:
> - Two instances where it was obvious that an empty property list
> could be removed entirely. There are other empty lists that
> probably should be removed, but I didn't look further into usage.
> - In hw/misc/xlnx-versal-trng.c, adjust a Property to use the
> correct PropertyInfo in the definition, rather than setting
> it at runtime.
> - One instance where { } was used instead of DEFINE_PROP_END_OF_LIST.
> Not a bug, but wrong style.
>
>
>r~
>
>
>Richard Henderson (71):
> target/arm: Constify all Property
> target/avr: Constify all Property
> target/hexagon: Constify all Property
> target/i386: Constify all Property
> target/microblaze: Constify all Property
> target/mips: Constify all Property
> target/ppc: Remove empty property list
> target/riscv: Constify all Property
> target/s390x: Constify all Property
> target/sparc: Constify all Property and PropertyInfo
> cpu-target: Constify all Property
> hw/9pfs: Constify all Property
> hw/acpi: Constify all Property
> hw/adc: Constify all Property
> hw/arm: Constify all Property
> hw/audio: Constify all Property
> hw/avr: Constify all Property
> hw/block/xen-block: Unexport PropertyInfo
> hw/block: Constify all Property
> hw/char: Constify all Property
> hw/core: Constify all Property
> hw/cpu: Constify all Property
> hw/cxl: Constify all Property
> hw/display: Constify all Property
> hw/dma: Constify all Property
> hw/gpio: Constify all Property
> hw/hyperv: Constify all Property
> hw/i2c: Constify all Property
> hw/i386: Constify all Property
> hw/ide: Constify all Property
> hw/input: Constify all Property
> hw/intc: Constify all Property
> hw/ipack: Constify all Property
> hw/ipmi: Constify all Property
> hw/isa: Constify all Property
> hw/m68k: Constify all Property
> hw/mem: Constify all Property
> hw/mips: Constify all Property
> hw/misc/xlnx-versal-trng: Constify trng_props
> hw/misc: Constify all Property
> hw/net: Constify all Property
> hw/nubus: Constify all Property
> hw/nvme: Constify all Property
> hw/nvram: Constify all Property
> hw/pci-bridge: Constify all Property
> hw/pci-host/astro: Remove empty Property list
> hw/pci-host: Constify all Property
> hw/pci: Constify all Property
> hw/ppc: Constify all Property
> hw/remote: Constify all Property
> hw/riscv: Constify all Property
> hw/rtc: Constify all Property
> hw/rx: Constify all Property
> hw/s390x: Constify all Property
> hw/scsi: Constify all Property
> hw/sd: Constify all Property
> hw/sparc: Constify all Property
> hw/sparc64: Constify all Property
> hw/ssi: Constify all Property
> hw/timer: Constify all Property
> hw/tpm: Constify all Property
> hw/tricore: Constify all Property
> hw/ufs: Constify all Property
> hw/usb: Constify all Property
> hw/vfio: Constify all Property
> hw/virtio: Constify all Property
> hw/watchdog: Constify all Property
> hw/xen: Constify all Property
> hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties
> tests/unit: Constify all Property
> docs: Constify all Property in examples
>
> cpu-target.c | 2 +-
> hw/9pfs/virtio-9p-device.c | 2 +-
> hw/acpi/erst.c | 2 +-
> hw/acpi/generic_event_device.c | 2 +-
> hw/acpi/piix4.c | 2 +-
> hw/acpi/vmgenid.c | 2 +-
> hw/adc/aspeed_adc.c | 2 +-
> hw/adc/npcm7xx_adc.c | 2 +-
> hw/arm/armsse.c | 8 ++++----
> hw/arm/armv7m.c | 4 ++--
> hw/arm/aspeed_soc_common.c | 2 +-
> hw/arm/bcm2836.c | 2 +-
> hw/arm/fsl-imx25.c | 2 +-
> hw/arm/fsl-imx6.c | 2 +-
> hw/arm/fsl-imx6ul.c | 2 +-
> hw/arm/fsl-imx7.c | 2 +-
> hw/arm/integratorcp.c | 2 +-
> hw/arm/msf2-soc.c | 2 +-
> hw/arm/npcm7xx.c | 2 +-
> hw/arm/nrf51_soc.c | 2 +-
> hw/arm/smmu-common.c | 2 +-
> hw/arm/smmuv3.c | 2 +-
> hw/arm/stellaris.c | 2 +-
> hw/arm/strongarm.c | 2 +-
> hw/arm/xlnx-versal.c | 2 +-
> hw/arm/xlnx-zynqmp.c | 2 +-
> hw/audio/ac97.c | 2 +-
> hw/audio/adlib.c | 2 +-
> hw/audio/asc.c | 2 +-
> hw/audio/cs4231a.c | 2 +-
> hw/audio/es1370.c | 2 +-
> hw/audio/gus.c | 2 +-
> hw/audio/hda-codec.c | 2 +-
> hw/audio/intel-hda.c | 4 ++--
> hw/audio/pcspk.c | 2 +-
> hw/audio/pl041.c | 2 +-
> hw/audio/sb16.c | 2 +-
> hw/audio/via-ac97.c | 2 +-
> hw/audio/virtio-snd-pci.c | 2 +-
> hw/audio/virtio-snd.c | 2 +-
> hw/audio/wm8750.c | 2 +-
> hw/avr/atmega.c | 2 +-
> hw/block/fdc-isa.c | 2 +-
> hw/block/fdc-sysbus.c | 4 ++--
> hw/block/fdc.c | 2 +-
> hw/block/m25p80.c | 2 +-
> hw/block/nand.c | 2 +-
> hw/block/pflash_cfi01.c | 2 +-
> hw/block/pflash_cfi02.c | 2 +-
> hw/block/swim.c | 2 +-
> hw/block/vhost-user-blk.c | 2 +-
> hw/block/virtio-blk.c | 2 +-
> hw/block/xen-block.c | 4 ++--
> hw/char/avr_usart.c | 2 +-
> hw/char/bcm2835_aux.c | 2 +-
> hw/char/cadence_uart.c | 2 +-
> hw/char/cmsdk-apb-uart.c | 2 +-
> hw/char/debugcon.c | 2 +-
> hw/char/digic-uart.c | 2 +-
> hw/char/escc.c | 2 +-
> hw/char/exynos4210_uart.c | 2 +-
> hw/char/goldfish_tty.c | 2 +-
> hw/char/grlib_apbuart.c | 2 +-
> hw/char/ibex_uart.c | 2 +-
> hw/char/imx_serial.c | 2 +-
> hw/char/ipoctal232.c | 2 +-
> hw/char/mcf_uart.c | 2 +-
> hw/char/nrf51_uart.c | 2 +-
> hw/char/parallel.c | 2 +-
> hw/char/pl011.c | 2 +-
> hw/char/renesas_sci.c | 2 +-
> hw/char/sclpconsole-lm.c | 2 +-
> hw/char/sclpconsole.c | 2 +-
> hw/char/serial-isa.c | 2 +-
> hw/char/serial-mm.c | 2 +-
> hw/char/serial-pci-multi.c | 4 ++--
> hw/char/serial-pci.c | 2 +-
> hw/char/serial.c | 2 +-
> hw/char/sh_serial.c | 2 +-
> hw/char/shakti_uart.c | 2 +-
> hw/char/sifive_uart.c | 2 +-
> hw/char/spapr_vty.c | 2 +-
> hw/char/stm32f2xx_usart.c | 2 +-
> hw/char/stm32l4x5_usart.c | 2 +-
> hw/char/terminal3270.c | 2 +-
> hw/char/virtio-console.c | 2 +-
> hw/char/virtio-serial-bus.c | 4 ++--
> hw/char/xen_console.c | 2 +-
> hw/char/xilinx_uartlite.c | 2 +-
> hw/core/generic-loader.c | 2 +-
> hw/core/guest-loader.c | 2 +-
> hw/core/or-irq.c | 2 +-
> hw/core/platform-bus.c | 2 +-
> hw/core/split-irq.c | 2 +-
> hw/cpu/a15mpcore.c | 2 +-
> hw/cpu/a9mpcore.c | 2 +-
> hw/cpu/arm11mpcore.c | 2 +-
> hw/cpu/cluster.c | 2 +-
> hw/cpu/realview_mpcore.c | 2 +-
> hw/cxl/switch-mailbox-cci.c | 2 +-
> hw/display/artist.c | 2 +-
> hw/display/ati.c | 2 +-
> hw/display/bcm2835_fb.c | 2 +-
> hw/display/bochs-display.c | 2 +-
> hw/display/cg3.c | 2 +-
> hw/display/cirrus_vga.c | 2 +-
> hw/display/cirrus_vga_isa.c | 2 +-
> hw/display/exynos4210_fimd.c | 2 +-
> hw/display/g364fb.c | 2 +-
> hw/display/i2c-ddc.c | 2 +-
> hw/display/macfb.c | 4 ++--
> hw/display/pl110.c | 2 +-
> hw/display/qxl.c | 2 +-
> hw/display/ramfb-standalone.c | 2 +-
> hw/display/sm501.c | 4 ++--
> hw/display/tcx.c | 2 +-
> hw/display/vga-isa.c | 2 +-
> hw/display/vga-mmio.c | 2 +-
> hw/display/vga-pci.c | 4 ++--
> hw/display/vhost-user-gpu.c | 2 +-
> hw/display/virtio-gpu-gl.c | 2 +-
> hw/display/virtio-gpu-pci.c | 2 +-
> hw/display/virtio-gpu-rutabaga.c | 2 +-
> hw/display/virtio-gpu.c | 2 +-
> hw/display/virtio-vga.c | 2 +-
> hw/display/vmware_vga.c | 2 +-
> hw/display/xlnx_dp.c | 2 +-
> hw/dma/i82374.c | 2 +-
> hw/dma/i8257.c | 2 +-
> hw/dma/pl080.c | 2 +-
> hw/dma/pl330.c | 2 +-
> hw/dma/xilinx_axidma.c | 2 +-
> hw/dma/xlnx-zdma.c | 2 +-
> hw/dma/xlnx_csu_dma.c | 2 +-
> hw/gpio/imx_gpio.c | 2 +-
> hw/gpio/npcm7xx_gpio.c | 2 +-
> hw/gpio/omap_gpio.c | 2 +-
> hw/gpio/pca9552.c | 2 +-
> hw/gpio/pca9554.c | 2 +-
> hw/gpio/pl061.c | 2 +-
> hw/gpio/sifive_gpio.c | 2 +-
> hw/gpio/stm32l4x5_gpio.c | 2 +-
> hw/hyperv/hv-balloon.c | 2 +-
> hw/hyperv/syndbg.c | 2 +-
> hw/hyperv/vmbus.c | 4 ++--
> hw/i2c/aspeed_i2c.c | 4 ++--
> hw/i2c/core.c | 2 +-
> hw/i2c/i2c_mux_pca954x.c | 2 +-
> hw/i2c/omap_i2c.c | 2 +-
> hw/i386/amd_iommu.c | 2 +-
> hw/i386/intel_iommu.c | 2 +-
> hw/i386/kvm/clock.c | 2 +-
> hw/i386/kvm/i8254.c | 2 +-
> hw/i386/kvm/ioapic.c | 2 +-
> hw/i386/sgx-epc.c | 2 +-
> hw/i386/vmmouse.c | 2 +-
> hw/i386/vmport.c | 2 +-
> hw/i386/x86-iommu.c | 2 +-
> hw/i386/xen/xen_pvdevice.c | 2 +-
> hw/ide/ahci.c | 2 +-
> hw/ide/cf.c | 2 +-
> hw/ide/cmd646.c | 2 +-
> hw/ide/ide-dev.c | 6 +++---
> hw/ide/isa.c | 2 +-
> hw/ide/macio.c | 2 +-
> hw/ide/mmio.c | 2 +-
> hw/input/pckbd.c | 4 ++--
> hw/input/stellaris_gamepad.c | 2 +-
> hw/input/virtio-input-hid.c | 6 +++---
> hw/input/virtio-input-host.c | 2 +-
> hw/input/virtio-input.c | 2 +-
> hw/intc/apic_common.c | 2 +-
> hw/intc/arm_gic_common.c | 2 +-
> hw/intc/arm_gicv2m.c | 2 +-
> hw/intc/arm_gicv3_common.c | 2 +-
> hw/intc/arm_gicv3_its.c | 2 +-
> hw/intc/arm_gicv3_its_kvm.c | 2 +-
> hw/intc/armv7m_nvic.c | 2 +-
> hw/intc/exynos4210_combiner.c | 2 +-
> hw/intc/exynos4210_gic.c | 2 +-
> hw/intc/goldfish_pic.c | 2 +-
> hw/intc/grlib_irqmp.c | 2 +-
> hw/intc/i8259_common.c | 2 +-
> hw/intc/ioapic.c | 2 +-
> hw/intc/loongarch_extioi.c | 2 +-
> hw/intc/loongarch_pch_msi.c | 2 +-
> hw/intc/loongarch_pch_pic.c | 2 +-
> hw/intc/loongson_ipi_common.c | 2 +-
> hw/intc/m68k_irqc.c | 2 +-
> hw/intc/mips_gic.c | 2 +-
> hw/intc/omap_intc.c | 2 +-
> hw/intc/ompic.c | 2 +-
> hw/intc/openpic.c | 2 +-
> hw/intc/openpic_kvm.c | 2 +-
> hw/intc/pnv_xive.c | 2 +-
> hw/intc/pnv_xive2.c | 2 +-
> hw/intc/ppc-uic.c | 2 +-
> hw/intc/riscv_aclint.c | 4 ++--
> hw/intc/riscv_aplic.c | 2 +-
> hw/intc/riscv_imsic.c | 2 +-
> hw/intc/rx_icu.c | 2 +-
> hw/intc/s390_flic.c | 4 ++--
> hw/intc/sifive_plic.c | 2 +-
> hw/intc/spapr_xive.c | 2 +-
> hw/intc/xics.c | 4 ++--
> hw/intc/xilinx_intc.c | 2 +-
> hw/intc/xive.c | 8 ++++----
> hw/intc/xive2.c | 4 ++--
> hw/intc/xlnx-pmu-iomod-intc.c | 2 +-
> hw/ipack/ipack.c | 2 +-
> hw/ipmi/ipmi.c | 2 +-
> hw/ipmi/ipmi_bmc_extern.c | 2 +-
> hw/ipmi/ipmi_bmc_sim.c | 2 +-
> hw/ipmi/isa_ipmi_bt.c | 2 +-
> hw/ipmi/isa_ipmi_kcs.c | 2 +-
> hw/isa/lpc_ich9.c | 2 +-
> hw/isa/pc87312.c | 2 +-
> hw/isa/piix.c | 2 +-
> hw/m68k/mcf5206.c | 2 +-
> hw/m68k/mcf_intc.c | 2 +-
> hw/m68k/next-cube.c | 2 +-
> hw/m68k/q800-glue.c | 2 +-
> hw/mem/cxl_type3.c | 2 +-
> hw/mem/nvdimm.c | 2 +-
> hw/mem/pc-dimm.c | 2 +-
> hw/mem/sparse-mem.c | 2 +-
> hw/mips/cps.c | 2 +-
> hw/misc/a9scu.c | 2 +-
> hw/misc/allwinner-h3-dramc.c | 2 +-
> hw/misc/allwinner-r40-dramc.c | 2 +-
> hw/misc/allwinner-sid.c | 2 +-
> hw/misc/applesmc.c | 2 +-
> hw/misc/arm11scu.c | 2 +-
> hw/misc/arm_l2x0.c | 2 +-
> hw/misc/arm_sysctl.c | 2 +-
> hw/misc/armsse-cpuid.c | 2 +-
> hw/misc/aspeed_hace.c | 2 +-
> hw/misc/aspeed_i3c.c | 2 +-
> hw/misc/aspeed_lpc.c | 2 +-
> hw/misc/aspeed_sbc.c | 2 +-
> hw/misc/aspeed_scu.c | 2 +-
> hw/misc/aspeed_sdmc.c | 2 +-
> hw/misc/bcm2835_cprman.c | 2 +-
> hw/misc/bcm2835_property.c | 2 +-
> hw/misc/debugexit.c | 2 +-
> hw/misc/eccmemctl.c | 2 +-
> hw/misc/empty_slot.c | 2 +-
> hw/misc/iotkit-secctl.c | 2 +-
> hw/misc/iotkit-sysctl.c | 2 +-
> hw/misc/iotkit-sysinfo.c | 2 +-
> hw/misc/ivshmem.c | 4 ++--
> hw/misc/led.c | 2 +-
> hw/misc/mac_via.c | 2 +-
> hw/misc/macio/cuda.c | 2 +-
> hw/misc/macio/macio.c | 4 ++--
> hw/misc/macio/pmu.c | 2 +-
> hw/misc/mips_cmgcr.c | 2 +-
> hw/misc/mips_cpc.c | 2 +-
> hw/misc/mips_itu.c | 2 +-
> hw/misc/mos6522.c | 2 +-
> hw/misc/mps2-fpgaio.c | 2 +-
> hw/misc/mps2-scc.c | 2 +-
> hw/misc/msf2-sysreg.c | 2 +-
> hw/misc/npcm7xx_gcr.c | 2 +-
> hw/misc/nrf51_rng.c | 2 +-
> hw/misc/pci-testdev.c | 2 +-
> hw/misc/pvpanic-isa.c | 2 +-
> hw/misc/pvpanic-pci.c | 2 +-
> hw/misc/sifive_e_aon.c | 2 +-
> hw/misc/sifive_u_otp.c | 2 +-
> hw/misc/stm32l4x5_rcc.c | 2 +-
> hw/misc/tz-mpc.c | 2 +-
> hw/misc/tz-msc.c | 2 +-
> hw/misc/tz-ppc.c | 2 +-
> hw/misc/unimp.c | 2 +-
> hw/misc/xlnx-versal-cframe-reg.c | 4 ++--
> hw/misc/xlnx-versal-cfu.c | 4 ++--
> hw/misc/xlnx-versal-trng.c | 6 +++---
> hw/misc/xlnx-versal-xramc.c | 2 +-
> hw/misc/zynq_slcr.c | 2 +-
> hw/net/allwinner-sun8i-emac.c | 2 +-
> hw/net/allwinner_emac.c | 2 +-
> hw/net/cadence_gem.c | 2 +-
> hw/net/can/xlnx-versal-canfd.c | 2 +-
> hw/net/can/xlnx-zynqmp-can.c | 2 +-
> hw/net/dp8393x.c | 2 +-
> hw/net/e1000.c | 2 +-
> hw/net/e1000e.c | 2 +-
> hw/net/eepro100.c | 2 +-
> hw/net/fsl_etsec/etsec.c | 2 +-
> hw/net/ftgmac100.c | 4 ++--
> hw/net/igb.c | 2 +-
> hw/net/imx_fec.c | 2 +-
> hw/net/lan9118.c | 2 +-
> hw/net/lance.c | 2 +-
> hw/net/lasi_i82596.c | 2 +-
> hw/net/mcf_fec.c | 2 +-
> hw/net/mipsnet.c | 2 +-
> hw/net/msf2-emac.c | 2 +-
> hw/net/mv88w8618_eth.c | 2 +-
> hw/net/ne2000-isa.c | 2 +-
> hw/net/ne2000-pci.c | 2 +-
> hw/net/npcm7xx_emc.c | 2 +-
> hw/net/npcm_gmac.c | 2 +-
> hw/net/opencores_eth.c | 2 +-
> hw/net/pcnet-pci.c | 2 +-
> hw/net/rocker/rocker.c | 2 +-
> hw/net/rtl8139.c | 2 +-
> hw/net/smc91c111.c | 2 +-
> hw/net/spapr_llan.c | 2 +-
> hw/net/stellaris_enet.c | 2 +-
> hw/net/sungem.c | 2 +-
> hw/net/sunhme.c | 2 +-
> hw/net/tulip.c | 2 +-
> hw/net/virtio-net.c | 2 +-
> hw/net/vmxnet3.c | 2 +-
> hw/net/xen_nic.c | 2 +-
> hw/net/xgmac.c | 2 +-
> hw/net/xilinx_axienet.c | 2 +-
> hw/net/xilinx_ethlite.c | 2 +-
> hw/nubus/nubus-bridge.c | 2 +-
> hw/nubus/nubus-device.c | 2 +-
> hw/nvme/ctrl.c | 2 +-
> hw/nvme/ns.c | 2 +-
> hw/nvme/subsys.c | 2 +-
> hw/nvram/ds1225y.c | 2 +-
> hw/nvram/eeprom_at24c.c | 2 +-
> hw/nvram/fw_cfg.c | 6 +++---
> hw/nvram/mac_nvram.c | 2 +-
> hw/nvram/nrf51_nvm.c | 2 +-
> hw/nvram/spapr_nvram.c | 2 +-
> hw/nvram/xlnx-bbram.c | 2 +-
> hw/nvram/xlnx-efuse.c | 2 +-
> hw/nvram/xlnx-versal-efuse-cache.c | 2 +-
> hw/nvram/xlnx-versal-efuse-ctrl.c | 2 +-
> hw/nvram/xlnx-zynqmp-efuse.c | 2 +-
> hw/pci-bridge/cxl_downstream.c | 2 +-
> hw/pci-bridge/cxl_root_port.c | 2 +-
> hw/pci-bridge/cxl_upstream.c | 2 +-
> hw/pci-bridge/gen_pcie_root_port.c | 2 +-
> hw/pci-bridge/pci_bridge_dev.c | 2 +-
> hw/pci-bridge/pci_expander_bridge.c | 4 ++--
> hw/pci-bridge/pcie_pci_bridge.c | 2 +-
> hw/pci-bridge/pcie_root_port.c | 2 +-
> hw/pci-bridge/xio3130_downstream.c | 2 +-
> hw/pci-host/astro.c | 5 -----
> hw/pci-host/dino.c | 2 +-
> hw/pci-host/gpex.c | 2 +-
> hw/pci-host/grackle.c | 2 +-
> hw/pci-host/gt64120.c | 2 +-
> hw/pci-host/i440fx.c | 2 +-
> hw/pci-host/mv64361.c | 2 +-
> hw/pci-host/pnv_phb.c | 4 ++--
> hw/pci-host/pnv_phb3.c | 2 +-
> hw/pci-host/pnv_phb4.c | 2 +-
> hw/pci-host/pnv_phb4_pec.c | 2 +-
> hw/pci-host/ppce500.c | 2 +-
> hw/pci-host/q35.c | 4 ++--
> hw/pci-host/raven.c | 2 +-
> hw/pci-host/sabre.c | 2 +-
> hw/pci-host/uninorth.c | 2 +-
> hw/pci-host/versatile.c | 2 +-
> hw/pci-host/xilinx-pcie.c | 2 +-
> hw/pci/pci.c | 2 +-
> hw/pci/pci_bridge.c | 2 +-
> hw/pci/pci_host.c | 2 +-
> hw/pci/pcie_port.c | 4 ++--
> hw/ppc/pnv.c | 2 +-
> hw/ppc/pnv_adu.c | 2 +-
> hw/ppc/pnv_chiptod.c | 2 +-
> hw/ppc/pnv_core.c | 4 ++--
> hw/ppc/pnv_homer.c | 2 +-
> hw/ppc/pnv_i2c.c | 2 +-
> hw/ppc/pnv_lpc.c | 2 +-
> hw/ppc/pnv_pnor.c | 2 +-
> hw/ppc/pnv_psi.c | 2 +-
> hw/ppc/ppc405_uc.c | 2 +-
> hw/ppc/ppc440_uc.c | 2 +-
> hw/ppc/ppc4xx_devs.c | 4 ++--
> hw/ppc/ppc4xx_sdram.c | 4 ++--
> hw/ppc/prep_systemio.c | 2 +-
> hw/ppc/rs6000_mc.c | 2 +-
> hw/ppc/spapr_cpu_core.c | 2 +-
> hw/ppc/spapr_nvdimm.c | 2 +-
> hw/ppc/spapr_pci.c | 2 +-
> hw/ppc/spapr_rng.c | 2 +-
> hw/ppc/spapr_tpm_proxy.c | 2 +-
> hw/remote/proxy.c | 2 +-
> hw/riscv/opentitan.c | 2 +-
> hw/riscv/riscv-iommu-pci.c | 2 +-
> hw/riscv/riscv-iommu.c | 2 +-
> hw/riscv/riscv_hart.c | 2 +-
> hw/riscv/sifive_u.c | 2 +-
> hw/rtc/allwinner-rtc.c | 2 +-
> hw/rtc/goldfish_rtc.c | 2 +-
> hw/rtc/m48t59-isa.c | 2 +-
> hw/rtc/m48t59.c | 2 +-
> hw/rtc/mc146818rtc.c | 2 +-
> hw/rtc/pl031.c | 2 +-
> hw/rx/rx62n.c | 2 +-
> hw/s390x/3270-ccw.c | 2 +-
> hw/s390x/ccw-device.c | 2 +-
> hw/s390x/css-bridge.c | 2 +-
> hw/s390x/ipl.c | 2 +-
> hw/s390x/s390-pci-bus.c | 2 +-
> hw/s390x/s390-skeys.c | 2 +-
> hw/s390x/s390-stattrib.c | 2 +-
> hw/s390x/vhost-scsi-ccw.c | 2 +-
> hw/s390x/vhost-user-fs-ccw.c | 2 +-
> hw/s390x/vhost-vsock-ccw.c | 2 +-
> hw/s390x/virtio-ccw-9p.c | 2 +-
> hw/s390x/virtio-ccw-balloon.c | 2 +-
> hw/s390x/virtio-ccw-blk.c | 2 +-
> hw/s390x/virtio-ccw-crypto.c | 2 +-
> hw/s390x/virtio-ccw-gpu.c | 2 +-
> hw/s390x/virtio-ccw-input.c | 2 +-
> hw/s390x/virtio-ccw-net.c | 2 +-
> hw/s390x/virtio-ccw-rng.c | 2 +-
> hw/s390x/virtio-ccw-scsi.c | 2 +-
> hw/s390x/virtio-ccw-serial.c | 2 +-
> hw/scsi/megasas.c | 6 +++---
> hw/scsi/mptsas.c | 2 +-
> hw/scsi/scsi-bus.c | 2 +-
> hw/scsi/scsi-disk.c | 6 +++---
> hw/scsi/scsi-generic.c | 2 +-
> hw/scsi/spapr_vscsi.c | 2 +-
> hw/scsi/vhost-scsi.c | 2 +-
> hw/scsi/vhost-user-scsi.c | 2 +-
> hw/scsi/virtio-scsi.c | 2 +-
> hw/scsi/vmw_pvscsi.c | 2 +-
> hw/sd/allwinner-sdhost.c | 2 +-
> hw/sd/aspeed_sdhci.c | 2 +-
> hw/sd/sd.c | 6 +++---
> hw/sd/sdhci-pci.c | 2 +-
> hw/sd/sdhci.c | 2 +-
> hw/sparc/sun4m.c | 2 +-
> hw/sparc/sun4m_iommu.c | 2 +-
> hw/sparc64/sun4u.c | 6 +++---
> hw/ssi/aspeed_smc.c | 4 ++--
> hw/ssi/ibex_spi_host.c | 2 +-
> hw/ssi/npcm7xx_fiu.c | 2 +-
> hw/ssi/pnv_spi.c | 2 +-
> hw/ssi/sifive_spi.c | 2 +-
> hw/ssi/ssi.c | 2 +-
> hw/ssi/xilinx_spi.c | 2 +-
> hw/ssi/xilinx_spips.c | 4 ++--
> hw/ssi/xlnx-versal-ospi.c | 2 +-
> hw/timer/a9gtimer.c | 2 +-
> hw/timer/allwinner-a10-pit.c | 2 +-
> hw/timer/arm_mptimer.c | 2 +-
> hw/timer/arm_timer.c | 2 +-
> hw/timer/aspeed_timer.c | 2 +-
> hw/timer/avr_timer16.c | 2 +-
> hw/timer/grlib_gptimer.c | 2 +-
> hw/timer/hpet.c | 2 +-
> hw/timer/i8254_common.c | 2 +-
> hw/timer/ibex_timer.c | 2 +-
> hw/timer/mss-timer.c | 2 +-
> hw/timer/nrf51_timer.c | 2 +-
> hw/timer/pxa2xx_timer.c | 2 +-
> hw/timer/renesas_cmt.c | 2 +-
> hw/timer/renesas_tmr.c | 2 +-
> hw/timer/sifive_pwm.c | 2 +-
> hw/timer/slavio_timer.c | 2 +-
> hw/timer/sse-timer.c | 2 +-
> hw/timer/stm32f2xx_timer.c | 2 +-
> hw/timer/xilinx_timer.c | 2 +-
> hw/tpm/tpm_crb.c | 2 +-
> hw/tpm/tpm_spapr.c | 2 +-
> hw/tpm/tpm_tis_i2c.c | 2 +-
> hw/tpm/tpm_tis_isa.c | 2 +-
> hw/tpm/tpm_tis_sysbus.c | 2 +-
> hw/tricore/tc27x_soc.c | 2 +-
> hw/tricore/tricore_testdevice.c | 2 +-
> hw/ufs/lu.c | 2 +-
> hw/ufs/ufs.c | 2 +-
> hw/usb/bus.c | 2 +-
> hw/usb/canokey.c | 2 +-
> hw/usb/ccid-card-emulated.c | 2 +-
> hw/usb/ccid-card-passthru.c | 2 +-
> hw/usb/dev-audio.c | 2 +-
> hw/usb/dev-hid.c | 6 +++---
> hw/usb/dev-hub.c | 2 +-
> hw/usb/dev-mtp.c | 2 +-
> hw/usb/dev-network.c | 2 +-
> hw/usb/dev-serial.c | 4 ++--
> hw/usb/dev-smartcard-reader.c | 4 ++--
> hw/usb/dev-storage-classic.c | 2 +-
> hw/usb/dev-uas.c | 2 +-
> hw/usb/hcd-dwc2.c | 2 +-
> hw/usb/hcd-dwc3.c | 2 +-
> hw/usb/hcd-ehci-pci.c | 2 +-
> hw/usb/hcd-ehci-sysbus.c | 2 +-
> hw/usb/hcd-ohci-pci.c | 2 +-
> hw/usb/hcd-ohci-sysbus.c | 2 +-
> hw/usb/hcd-uhci.c | 4 ++--
> hw/usb/hcd-xhci-nec.c | 2 +-
> hw/usb/hcd-xhci-sysbus.c | 2 +-
> hw/usb/hcd-xhci.c | 2 +-
> hw/usb/host-libusb.c | 2 +-
> hw/usb/redirect.c | 2 +-
> hw/usb/u2f-emulated.c | 2 +-
> hw/usb/u2f-passthru.c | 2 +-
> hw/vfio/ap.c | 2 +-
> hw/vfio/ccw.c | 2 +-
> hw/vfio/pci.c | 4 ++--
> hw/vfio/platform.c | 2 +-
> hw/virtio/vdpa-dev-pci.c | 2 +-
> hw/virtio/vdpa-dev.c | 2 +-
> hw/virtio/vhost-scsi-pci.c | 2 +-
> hw/virtio/vhost-user-blk-pci.c | 2 +-
> hw/virtio/vhost-user-device.c | 2 +-
> hw/virtio/vhost-user-fs-pci.c | 2 +-
> hw/virtio/vhost-user-fs.c | 2 +-
> hw/virtio/vhost-user-gpio.c | 2 +-
> hw/virtio/vhost-user-i2c.c | 2 +-
> hw/virtio/vhost-user-input.c | 2 +-
> hw/virtio/vhost-user-rng-pci.c | 2 +-
> hw/virtio/vhost-user-rng.c | 2 +-
> hw/virtio/vhost-user-scmi.c | 2 +-
> hw/virtio/vhost-user-scsi-pci.c | 2 +-
> hw/virtio/vhost-user-snd-pci.c | 2 +-
> hw/virtio/vhost-user-snd.c | 2 +-
> hw/virtio/vhost-user-vsock-pci.c | 2 +-
> hw/virtio/vhost-user-vsock.c | 2 +-
> hw/virtio/vhost-vsock-common.c | 2 +-
> hw/virtio/vhost-vsock-pci.c | 2 +-
> hw/virtio/vhost-vsock.c | 2 +-
> hw/virtio/virtio-9p-pci.c | 2 +-
> hw/virtio/virtio-balloon.c | 2 +-
> hw/virtio/virtio-blk-pci.c | 2 +-
> hw/virtio/virtio-crypto-pci.c | 2 +-
> hw/virtio/virtio-crypto.c | 2 +-
> hw/virtio/virtio-input-pci.c | 2 +-
> hw/virtio/virtio-iommu-pci.c | 2 +-
> hw/virtio/virtio-iommu.c | 2 +-
> hw/virtio/virtio-mem.c | 2 +-
> hw/virtio/virtio-mmio.c | 2 +-
> hw/virtio/virtio-net-pci.c | 2 +-
> hw/virtio/virtio-nsm.c | 2 +-
> hw/virtio/virtio-pci.c | 4 ++--
> hw/virtio/virtio-pmem.c | 2 +-
> hw/virtio/virtio-rng-pci.c | 2 +-
> hw/virtio/virtio-rng.c | 2 +-
> hw/virtio/virtio-scsi-pci.c | 2 +-
> hw/virtio/virtio-serial-pci.c | 2 +-
> hw/virtio/virtio.c | 2 +-
> hw/watchdog/sbsa_gwdt.c | 2 +-
> hw/watchdog/wdt_aspeed.c | 2 +-
> hw/watchdog/wdt_imx2.c | 2 +-
> hw/xen/xen-bus.c | 2 +-
> hw/xen/xen-legacy-backend.c | 6 +++---
> hw/xen/xen_pt.c | 2 +-
> target/arm/cpu.c | 26 +++++++++++++-------------
> target/arm/cpu64.c | 6 +++---
> target/arm/tcg/cpu64.c | 2 +-
> target/avr/cpu.c | 2 +-
> target/hexagon/cpu.c | 2 +-
> target/i386/cpu.c | 4 ++--
> target/microblaze/cpu.c | 2 +-
> target/mips/cpu.c | 2 +-
> target/ppc/cpu_init.c | 6 ------
> target/riscv/cpu.c | 2 +-
> target/s390x/cpu.c | 2 +-
> target/sparc/cpu.c | 4 ++--
> tests/unit/test-qdev-global-props.c | 2 +-
> docs/devel/migration/compatibility.rst | 4 ++--
> docs/devel/virtio-backends.rst | 2 +-
> 568 files changed, 644 insertions(+), 655 deletions(-)
>
Maybe extend checkpatch to catch these in the future? (Not meant to be a blocker)
Best regards,
Bernhard
^ permalink raw reply [flat|nested] 124+ messages in thread* Re: [PATCH 00/71] whole-tree: Constify Property structures
2024-12-13 19:06 [PATCH 00/71] whole-tree: Constify Property structures Richard Henderson
` (71 preceding siblings ...)
2024-12-14 18:40 ` Bernhard Beschow
@ 2024-12-15 9:31 ` Paolo Bonzini
72 siblings, 0 replies; 124+ messages in thread
From: Paolo Bonzini @ 2024-12-15 9:31 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
On 12/13/24 20:06, Richard Henderson wrote:
> Since d36f165d952 (qdev: make properties array "const"), we can
> define our Property structure const. Do this across the entire tree.
>
> There are a few other minor changes:
> - Two instances where it was obvious that an empty property list
> could be removed entirely. There are other empty lists that
> probably should be removed, but I didn't look further into usage.
> - In hw/misc/xlnx-versal-trng.c, adjust a Property to use the
> correct PropertyInfo in the definition, rather than setting
> it at runtime.
> - One instance where { } was used instead of DEFINE_PROP_END_OF_LIST.
> Not a bug, but wrong style.
Thanks very much! It's not a lot of memory but it's nice to share these
across multiple instances of QEMU.
Paolo
> r~
>
>
> Richard Henderson (71):
> target/arm: Constify all Property
> target/avr: Constify all Property
> target/hexagon: Constify all Property
> target/i386: Constify all Property
> target/microblaze: Constify all Property
> target/mips: Constify all Property
> target/ppc: Remove empty property list
> target/riscv: Constify all Property
> target/s390x: Constify all Property
> target/sparc: Constify all Property and PropertyInfo
> cpu-target: Constify all Property
> hw/9pfs: Constify all Property
> hw/acpi: Constify all Property
> hw/adc: Constify all Property
> hw/arm: Constify all Property
> hw/audio: Constify all Property
> hw/avr: Constify all Property
> hw/block/xen-block: Unexport PropertyInfo
> hw/block: Constify all Property
> hw/char: Constify all Property
> hw/core: Constify all Property
> hw/cpu: Constify all Property
> hw/cxl: Constify all Property
> hw/display: Constify all Property
> hw/dma: Constify all Property
> hw/gpio: Constify all Property
> hw/hyperv: Constify all Property
> hw/i2c: Constify all Property
> hw/i386: Constify all Property
> hw/ide: Constify all Property
> hw/input: Constify all Property
> hw/intc: Constify all Property
> hw/ipack: Constify all Property
> hw/ipmi: Constify all Property
> hw/isa: Constify all Property
> hw/m68k: Constify all Property
> hw/mem: Constify all Property
> hw/mips: Constify all Property
> hw/misc/xlnx-versal-trng: Constify trng_props
> hw/misc: Constify all Property
> hw/net: Constify all Property
> hw/nubus: Constify all Property
> hw/nvme: Constify all Property
> hw/nvram: Constify all Property
> hw/pci-bridge: Constify all Property
> hw/pci-host/astro: Remove empty Property list
> hw/pci-host: Constify all Property
> hw/pci: Constify all Property
> hw/ppc: Constify all Property
> hw/remote: Constify all Property
> hw/riscv: Constify all Property
> hw/rtc: Constify all Property
> hw/rx: Constify all Property
> hw/s390x: Constify all Property
> hw/scsi: Constify all Property
> hw/sd: Constify all Property
> hw/sparc: Constify all Property
> hw/sparc64: Constify all Property
> hw/ssi: Constify all Property
> hw/timer: Constify all Property
> hw/tpm: Constify all Property
> hw/tricore: Constify all Property
> hw/ufs: Constify all Property
> hw/usb: Constify all Property
> hw/vfio: Constify all Property
> hw/virtio: Constify all Property
> hw/watchdog: Constify all Property
> hw/xen: Constify all Property
> hw/xen: Use DEFINE_PROP_END_OF_LIST in xen_sysdev_properties
> tests/unit: Constify all Property
> docs: Constify all Property in examples
>
> cpu-target.c | 2 +-
> hw/9pfs/virtio-9p-device.c | 2 +-
> hw/acpi/erst.c | 2 +-
> hw/acpi/generic_event_device.c | 2 +-
> hw/acpi/piix4.c | 2 +-
> hw/acpi/vmgenid.c | 2 +-
> hw/adc/aspeed_adc.c | 2 +-
> hw/adc/npcm7xx_adc.c | 2 +-
> hw/arm/armsse.c | 8 ++++----
> hw/arm/armv7m.c | 4 ++--
> hw/arm/aspeed_soc_common.c | 2 +-
> hw/arm/bcm2836.c | 2 +-
> hw/arm/fsl-imx25.c | 2 +-
> hw/arm/fsl-imx6.c | 2 +-
> hw/arm/fsl-imx6ul.c | 2 +-
> hw/arm/fsl-imx7.c | 2 +-
> hw/arm/integratorcp.c | 2 +-
> hw/arm/msf2-soc.c | 2 +-
> hw/arm/npcm7xx.c | 2 +-
> hw/arm/nrf51_soc.c | 2 +-
> hw/arm/smmu-common.c | 2 +-
> hw/arm/smmuv3.c | 2 +-
> hw/arm/stellaris.c | 2 +-
> hw/arm/strongarm.c | 2 +-
> hw/arm/xlnx-versal.c | 2 +-
> hw/arm/xlnx-zynqmp.c | 2 +-
> hw/audio/ac97.c | 2 +-
> hw/audio/adlib.c | 2 +-
> hw/audio/asc.c | 2 +-
> hw/audio/cs4231a.c | 2 +-
> hw/audio/es1370.c | 2 +-
> hw/audio/gus.c | 2 +-
> hw/audio/hda-codec.c | 2 +-
> hw/audio/intel-hda.c | 4 ++--
> hw/audio/pcspk.c | 2 +-
> hw/audio/pl041.c | 2 +-
> hw/audio/sb16.c | 2 +-
> hw/audio/via-ac97.c | 2 +-
> hw/audio/virtio-snd-pci.c | 2 +-
> hw/audio/virtio-snd.c | 2 +-
> hw/audio/wm8750.c | 2 +-
> hw/avr/atmega.c | 2 +-
> hw/block/fdc-isa.c | 2 +-
> hw/block/fdc-sysbus.c | 4 ++--
> hw/block/fdc.c | 2 +-
> hw/block/m25p80.c | 2 +-
> hw/block/nand.c | 2 +-
> hw/block/pflash_cfi01.c | 2 +-
> hw/block/pflash_cfi02.c | 2 +-
> hw/block/swim.c | 2 +-
> hw/block/vhost-user-blk.c | 2 +-
> hw/block/virtio-blk.c | 2 +-
> hw/block/xen-block.c | 4 ++--
> hw/char/avr_usart.c | 2 +-
> hw/char/bcm2835_aux.c | 2 +-
> hw/char/cadence_uart.c | 2 +-
> hw/char/cmsdk-apb-uart.c | 2 +-
> hw/char/debugcon.c | 2 +-
> hw/char/digic-uart.c | 2 +-
> hw/char/escc.c | 2 +-
> hw/char/exynos4210_uart.c | 2 +-
> hw/char/goldfish_tty.c | 2 +-
> hw/char/grlib_apbuart.c | 2 +-
> hw/char/ibex_uart.c | 2 +-
> hw/char/imx_serial.c | 2 +-
> hw/char/ipoctal232.c | 2 +-
> hw/char/mcf_uart.c | 2 +-
> hw/char/nrf51_uart.c | 2 +-
> hw/char/parallel.c | 2 +-
> hw/char/pl011.c | 2 +-
> hw/char/renesas_sci.c | 2 +-
> hw/char/sclpconsole-lm.c | 2 +-
> hw/char/sclpconsole.c | 2 +-
> hw/char/serial-isa.c | 2 +-
> hw/char/serial-mm.c | 2 +-
> hw/char/serial-pci-multi.c | 4 ++--
> hw/char/serial-pci.c | 2 +-
> hw/char/serial.c | 2 +-
> hw/char/sh_serial.c | 2 +-
> hw/char/shakti_uart.c | 2 +-
> hw/char/sifive_uart.c | 2 +-
> hw/char/spapr_vty.c | 2 +-
> hw/char/stm32f2xx_usart.c | 2 +-
> hw/char/stm32l4x5_usart.c | 2 +-
> hw/char/terminal3270.c | 2 +-
> hw/char/virtio-console.c | 2 +-
> hw/char/virtio-serial-bus.c | 4 ++--
> hw/char/xen_console.c | 2 +-
> hw/char/xilinx_uartlite.c | 2 +-
> hw/core/generic-loader.c | 2 +-
> hw/core/guest-loader.c | 2 +-
> hw/core/or-irq.c | 2 +-
> hw/core/platform-bus.c | 2 +-
> hw/core/split-irq.c | 2 +-
> hw/cpu/a15mpcore.c | 2 +-
> hw/cpu/a9mpcore.c | 2 +-
> hw/cpu/arm11mpcore.c | 2 +-
> hw/cpu/cluster.c | 2 +-
> hw/cpu/realview_mpcore.c | 2 +-
> hw/cxl/switch-mailbox-cci.c | 2 +-
> hw/display/artist.c | 2 +-
> hw/display/ati.c | 2 +-
> hw/display/bcm2835_fb.c | 2 +-
> hw/display/bochs-display.c | 2 +-
> hw/display/cg3.c | 2 +-
> hw/display/cirrus_vga.c | 2 +-
> hw/display/cirrus_vga_isa.c | 2 +-
> hw/display/exynos4210_fimd.c | 2 +-
> hw/display/g364fb.c | 2 +-
> hw/display/i2c-ddc.c | 2 +-
> hw/display/macfb.c | 4 ++--
> hw/display/pl110.c | 2 +-
> hw/display/qxl.c | 2 +-
> hw/display/ramfb-standalone.c | 2 +-
> hw/display/sm501.c | 4 ++--
> hw/display/tcx.c | 2 +-
> hw/display/vga-isa.c | 2 +-
> hw/display/vga-mmio.c | 2 +-
> hw/display/vga-pci.c | 4 ++--
> hw/display/vhost-user-gpu.c | 2 +-
> hw/display/virtio-gpu-gl.c | 2 +-
> hw/display/virtio-gpu-pci.c | 2 +-
> hw/display/virtio-gpu-rutabaga.c | 2 +-
> hw/display/virtio-gpu.c | 2 +-
> hw/display/virtio-vga.c | 2 +-
> hw/display/vmware_vga.c | 2 +-
> hw/display/xlnx_dp.c | 2 +-
> hw/dma/i82374.c | 2 +-
> hw/dma/i8257.c | 2 +-
> hw/dma/pl080.c | 2 +-
> hw/dma/pl330.c | 2 +-
> hw/dma/xilinx_axidma.c | 2 +-
> hw/dma/xlnx-zdma.c | 2 +-
> hw/dma/xlnx_csu_dma.c | 2 +-
> hw/gpio/imx_gpio.c | 2 +-
> hw/gpio/npcm7xx_gpio.c | 2 +-
> hw/gpio/omap_gpio.c | 2 +-
> hw/gpio/pca9552.c | 2 +-
> hw/gpio/pca9554.c | 2 +-
> hw/gpio/pl061.c | 2 +-
> hw/gpio/sifive_gpio.c | 2 +-
> hw/gpio/stm32l4x5_gpio.c | 2 +-
> hw/hyperv/hv-balloon.c | 2 +-
> hw/hyperv/syndbg.c | 2 +-
> hw/hyperv/vmbus.c | 4 ++--
> hw/i2c/aspeed_i2c.c | 4 ++--
> hw/i2c/core.c | 2 +-
> hw/i2c/i2c_mux_pca954x.c | 2 +-
> hw/i2c/omap_i2c.c | 2 +-
> hw/i386/amd_iommu.c | 2 +-
> hw/i386/intel_iommu.c | 2 +-
> hw/i386/kvm/clock.c | 2 +-
> hw/i386/kvm/i8254.c | 2 +-
> hw/i386/kvm/ioapic.c | 2 +-
> hw/i386/sgx-epc.c | 2 +-
> hw/i386/vmmouse.c | 2 +-
> hw/i386/vmport.c | 2 +-
> hw/i386/x86-iommu.c | 2 +-
> hw/i386/xen/xen_pvdevice.c | 2 +-
> hw/ide/ahci.c | 2 +-
> hw/ide/cf.c | 2 +-
> hw/ide/cmd646.c | 2 +-
> hw/ide/ide-dev.c | 6 +++---
> hw/ide/isa.c | 2 +-
> hw/ide/macio.c | 2 +-
> hw/ide/mmio.c | 2 +-
> hw/input/pckbd.c | 4 ++--
> hw/input/stellaris_gamepad.c | 2 +-
> hw/input/virtio-input-hid.c | 6 +++---
> hw/input/virtio-input-host.c | 2 +-
> hw/input/virtio-input.c | 2 +-
> hw/intc/apic_common.c | 2 +-
> hw/intc/arm_gic_common.c | 2 +-
> hw/intc/arm_gicv2m.c | 2 +-
> hw/intc/arm_gicv3_common.c | 2 +-
> hw/intc/arm_gicv3_its.c | 2 +-
> hw/intc/arm_gicv3_its_kvm.c | 2 +-
> hw/intc/armv7m_nvic.c | 2 +-
> hw/intc/exynos4210_combiner.c | 2 +-
> hw/intc/exynos4210_gic.c | 2 +-
> hw/intc/goldfish_pic.c | 2 +-
> hw/intc/grlib_irqmp.c | 2 +-
> hw/intc/i8259_common.c | 2 +-
> hw/intc/ioapic.c | 2 +-
> hw/intc/loongarch_extioi.c | 2 +-
> hw/intc/loongarch_pch_msi.c | 2 +-
> hw/intc/loongarch_pch_pic.c | 2 +-
> hw/intc/loongson_ipi_common.c | 2 +-
> hw/intc/m68k_irqc.c | 2 +-
> hw/intc/mips_gic.c | 2 +-
> hw/intc/omap_intc.c | 2 +-
> hw/intc/ompic.c | 2 +-
> hw/intc/openpic.c | 2 +-
> hw/intc/openpic_kvm.c | 2 +-
> hw/intc/pnv_xive.c | 2 +-
> hw/intc/pnv_xive2.c | 2 +-
> hw/intc/ppc-uic.c | 2 +-
> hw/intc/riscv_aclint.c | 4 ++--
> hw/intc/riscv_aplic.c | 2 +-
> hw/intc/riscv_imsic.c | 2 +-
> hw/intc/rx_icu.c | 2 +-
> hw/intc/s390_flic.c | 4 ++--
> hw/intc/sifive_plic.c | 2 +-
> hw/intc/spapr_xive.c | 2 +-
> hw/intc/xics.c | 4 ++--
> hw/intc/xilinx_intc.c | 2 +-
> hw/intc/xive.c | 8 ++++----
> hw/intc/xive2.c | 4 ++--
> hw/intc/xlnx-pmu-iomod-intc.c | 2 +-
> hw/ipack/ipack.c | 2 +-
> hw/ipmi/ipmi.c | 2 +-
> hw/ipmi/ipmi_bmc_extern.c | 2 +-
> hw/ipmi/ipmi_bmc_sim.c | 2 +-
> hw/ipmi/isa_ipmi_bt.c | 2 +-
> hw/ipmi/isa_ipmi_kcs.c | 2 +-
> hw/isa/lpc_ich9.c | 2 +-
> hw/isa/pc87312.c | 2 +-
> hw/isa/piix.c | 2 +-
> hw/m68k/mcf5206.c | 2 +-
> hw/m68k/mcf_intc.c | 2 +-
> hw/m68k/next-cube.c | 2 +-
> hw/m68k/q800-glue.c | 2 +-
> hw/mem/cxl_type3.c | 2 +-
> hw/mem/nvdimm.c | 2 +-
> hw/mem/pc-dimm.c | 2 +-
> hw/mem/sparse-mem.c | 2 +-
> hw/mips/cps.c | 2 +-
> hw/misc/a9scu.c | 2 +-
> hw/misc/allwinner-h3-dramc.c | 2 +-
> hw/misc/allwinner-r40-dramc.c | 2 +-
> hw/misc/allwinner-sid.c | 2 +-
> hw/misc/applesmc.c | 2 +-
> hw/misc/arm11scu.c | 2 +-
> hw/misc/arm_l2x0.c | 2 +-
> hw/misc/arm_sysctl.c | 2 +-
> hw/misc/armsse-cpuid.c | 2 +-
> hw/misc/aspeed_hace.c | 2 +-
> hw/misc/aspeed_i3c.c | 2 +-
> hw/misc/aspeed_lpc.c | 2 +-
> hw/misc/aspeed_sbc.c | 2 +-
> hw/misc/aspeed_scu.c | 2 +-
> hw/misc/aspeed_sdmc.c | 2 +-
> hw/misc/bcm2835_cprman.c | 2 +-
> hw/misc/bcm2835_property.c | 2 +-
> hw/misc/debugexit.c | 2 +-
> hw/misc/eccmemctl.c | 2 +-
> hw/misc/empty_slot.c | 2 +-
> hw/misc/iotkit-secctl.c | 2 +-
> hw/misc/iotkit-sysctl.c | 2 +-
> hw/misc/iotkit-sysinfo.c | 2 +-
> hw/misc/ivshmem.c | 4 ++--
> hw/misc/led.c | 2 +-
> hw/misc/mac_via.c | 2 +-
> hw/misc/macio/cuda.c | 2 +-
> hw/misc/macio/macio.c | 4 ++--
> hw/misc/macio/pmu.c | 2 +-
> hw/misc/mips_cmgcr.c | 2 +-
> hw/misc/mips_cpc.c | 2 +-
> hw/misc/mips_itu.c | 2 +-
> hw/misc/mos6522.c | 2 +-
> hw/misc/mps2-fpgaio.c | 2 +-
> hw/misc/mps2-scc.c | 2 +-
> hw/misc/msf2-sysreg.c | 2 +-
> hw/misc/npcm7xx_gcr.c | 2 +-
> hw/misc/nrf51_rng.c | 2 +-
> hw/misc/pci-testdev.c | 2 +-
> hw/misc/pvpanic-isa.c | 2 +-
> hw/misc/pvpanic-pci.c | 2 +-
> hw/misc/sifive_e_aon.c | 2 +-
> hw/misc/sifive_u_otp.c | 2 +-
> hw/misc/stm32l4x5_rcc.c | 2 +-
> hw/misc/tz-mpc.c | 2 +-
> hw/misc/tz-msc.c | 2 +-
> hw/misc/tz-ppc.c | 2 +-
> hw/misc/unimp.c | 2 +-
> hw/misc/xlnx-versal-cframe-reg.c | 4 ++--
> hw/misc/xlnx-versal-cfu.c | 4 ++--
> hw/misc/xlnx-versal-trng.c | 6 +++---
> hw/misc/xlnx-versal-xramc.c | 2 +-
> hw/misc/zynq_slcr.c | 2 +-
> hw/net/allwinner-sun8i-emac.c | 2 +-
> hw/net/allwinner_emac.c | 2 +-
> hw/net/cadence_gem.c | 2 +-
> hw/net/can/xlnx-versal-canfd.c | 2 +-
> hw/net/can/xlnx-zynqmp-can.c | 2 +-
> hw/net/dp8393x.c | 2 +-
> hw/net/e1000.c | 2 +-
> hw/net/e1000e.c | 2 +-
> hw/net/eepro100.c | 2 +-
> hw/net/fsl_etsec/etsec.c | 2 +-
> hw/net/ftgmac100.c | 4 ++--
> hw/net/igb.c | 2 +-
> hw/net/imx_fec.c | 2 +-
> hw/net/lan9118.c | 2 +-
> hw/net/lance.c | 2 +-
> hw/net/lasi_i82596.c | 2 +-
> hw/net/mcf_fec.c | 2 +-
> hw/net/mipsnet.c | 2 +-
> hw/net/msf2-emac.c | 2 +-
> hw/net/mv88w8618_eth.c | 2 +-
> hw/net/ne2000-isa.c | 2 +-
> hw/net/ne2000-pci.c | 2 +-
> hw/net/npcm7xx_emc.c | 2 +-
> hw/net/npcm_gmac.c | 2 +-
> hw/net/opencores_eth.c | 2 +-
> hw/net/pcnet-pci.c | 2 +-
> hw/net/rocker/rocker.c | 2 +-
> hw/net/rtl8139.c | 2 +-
> hw/net/smc91c111.c | 2 +-
> hw/net/spapr_llan.c | 2 +-
> hw/net/stellaris_enet.c | 2 +-
> hw/net/sungem.c | 2 +-
> hw/net/sunhme.c | 2 +-
> hw/net/tulip.c | 2 +-
> hw/net/virtio-net.c | 2 +-
> hw/net/vmxnet3.c | 2 +-
> hw/net/xen_nic.c | 2 +-
> hw/net/xgmac.c | 2 +-
> hw/net/xilinx_axienet.c | 2 +-
> hw/net/xilinx_ethlite.c | 2 +-
> hw/nubus/nubus-bridge.c | 2 +-
> hw/nubus/nubus-device.c | 2 +-
> hw/nvme/ctrl.c | 2 +-
> hw/nvme/ns.c | 2 +-
> hw/nvme/subsys.c | 2 +-
> hw/nvram/ds1225y.c | 2 +-
> hw/nvram/eeprom_at24c.c | 2 +-
> hw/nvram/fw_cfg.c | 6 +++---
> hw/nvram/mac_nvram.c | 2 +-
> hw/nvram/nrf51_nvm.c | 2 +-
> hw/nvram/spapr_nvram.c | 2 +-
> hw/nvram/xlnx-bbram.c | 2 +-
> hw/nvram/xlnx-efuse.c | 2 +-
> hw/nvram/xlnx-versal-efuse-cache.c | 2 +-
> hw/nvram/xlnx-versal-efuse-ctrl.c | 2 +-
> hw/nvram/xlnx-zynqmp-efuse.c | 2 +-
> hw/pci-bridge/cxl_downstream.c | 2 +-
> hw/pci-bridge/cxl_root_port.c | 2 +-
> hw/pci-bridge/cxl_upstream.c | 2 +-
> hw/pci-bridge/gen_pcie_root_port.c | 2 +-
> hw/pci-bridge/pci_bridge_dev.c | 2 +-
> hw/pci-bridge/pci_expander_bridge.c | 4 ++--
> hw/pci-bridge/pcie_pci_bridge.c | 2 +-
> hw/pci-bridge/pcie_root_port.c | 2 +-
> hw/pci-bridge/xio3130_downstream.c | 2 +-
> hw/pci-host/astro.c | 5 -----
> hw/pci-host/dino.c | 2 +-
> hw/pci-host/gpex.c | 2 +-
> hw/pci-host/grackle.c | 2 +-
> hw/pci-host/gt64120.c | 2 +-
> hw/pci-host/i440fx.c | 2 +-
> hw/pci-host/mv64361.c | 2 +-
> hw/pci-host/pnv_phb.c | 4 ++--
> hw/pci-host/pnv_phb3.c | 2 +-
> hw/pci-host/pnv_phb4.c | 2 +-
> hw/pci-host/pnv_phb4_pec.c | 2 +-
> hw/pci-host/ppce500.c | 2 +-
> hw/pci-host/q35.c | 4 ++--
> hw/pci-host/raven.c | 2 +-
> hw/pci-host/sabre.c | 2 +-
> hw/pci-host/uninorth.c | 2 +-
> hw/pci-host/versatile.c | 2 +-
> hw/pci-host/xilinx-pcie.c | 2 +-
> hw/pci/pci.c | 2 +-
> hw/pci/pci_bridge.c | 2 +-
> hw/pci/pci_host.c | 2 +-
> hw/pci/pcie_port.c | 4 ++--
> hw/ppc/pnv.c | 2 +-
> hw/ppc/pnv_adu.c | 2 +-
> hw/ppc/pnv_chiptod.c | 2 +-
> hw/ppc/pnv_core.c | 4 ++--
> hw/ppc/pnv_homer.c | 2 +-
> hw/ppc/pnv_i2c.c | 2 +-
> hw/ppc/pnv_lpc.c | 2 +-
> hw/ppc/pnv_pnor.c | 2 +-
> hw/ppc/pnv_psi.c | 2 +-
> hw/ppc/ppc405_uc.c | 2 +-
> hw/ppc/ppc440_uc.c | 2 +-
> hw/ppc/ppc4xx_devs.c | 4 ++--
> hw/ppc/ppc4xx_sdram.c | 4 ++--
> hw/ppc/prep_systemio.c | 2 +-
> hw/ppc/rs6000_mc.c | 2 +-
> hw/ppc/spapr_cpu_core.c | 2 +-
> hw/ppc/spapr_nvdimm.c | 2 +-
> hw/ppc/spapr_pci.c | 2 +-
> hw/ppc/spapr_rng.c | 2 +-
> hw/ppc/spapr_tpm_proxy.c | 2 +-
> hw/remote/proxy.c | 2 +-
> hw/riscv/opentitan.c | 2 +-
> hw/riscv/riscv-iommu-pci.c | 2 +-
> hw/riscv/riscv-iommu.c | 2 +-
> hw/riscv/riscv_hart.c | 2 +-
> hw/riscv/sifive_u.c | 2 +-
> hw/rtc/allwinner-rtc.c | 2 +-
> hw/rtc/goldfish_rtc.c | 2 +-
> hw/rtc/m48t59-isa.c | 2 +-
> hw/rtc/m48t59.c | 2 +-
> hw/rtc/mc146818rtc.c | 2 +-
> hw/rtc/pl031.c | 2 +-
> hw/rx/rx62n.c | 2 +-
> hw/s390x/3270-ccw.c | 2 +-
> hw/s390x/ccw-device.c | 2 +-
> hw/s390x/css-bridge.c | 2 +-
> hw/s390x/ipl.c | 2 +-
> hw/s390x/s390-pci-bus.c | 2 +-
> hw/s390x/s390-skeys.c | 2 +-
> hw/s390x/s390-stattrib.c | 2 +-
> hw/s390x/vhost-scsi-ccw.c | 2 +-
> hw/s390x/vhost-user-fs-ccw.c | 2 +-
> hw/s390x/vhost-vsock-ccw.c | 2 +-
> hw/s390x/virtio-ccw-9p.c | 2 +-
> hw/s390x/virtio-ccw-balloon.c | 2 +-
> hw/s390x/virtio-ccw-blk.c | 2 +-
> hw/s390x/virtio-ccw-crypto.c | 2 +-
> hw/s390x/virtio-ccw-gpu.c | 2 +-
> hw/s390x/virtio-ccw-input.c | 2 +-
> hw/s390x/virtio-ccw-net.c | 2 +-
> hw/s390x/virtio-ccw-rng.c | 2 +-
> hw/s390x/virtio-ccw-scsi.c | 2 +-
> hw/s390x/virtio-ccw-serial.c | 2 +-
> hw/scsi/megasas.c | 6 +++---
> hw/scsi/mptsas.c | 2 +-
> hw/scsi/scsi-bus.c | 2 +-
> hw/scsi/scsi-disk.c | 6 +++---
> hw/scsi/scsi-generic.c | 2 +-
> hw/scsi/spapr_vscsi.c | 2 +-
> hw/scsi/vhost-scsi.c | 2 +-
> hw/scsi/vhost-user-scsi.c | 2 +-
> hw/scsi/virtio-scsi.c | 2 +-
> hw/scsi/vmw_pvscsi.c | 2 +-
> hw/sd/allwinner-sdhost.c | 2 +-
> hw/sd/aspeed_sdhci.c | 2 +-
> hw/sd/sd.c | 6 +++---
> hw/sd/sdhci-pci.c | 2 +-
> hw/sd/sdhci.c | 2 +-
> hw/sparc/sun4m.c | 2 +-
> hw/sparc/sun4m_iommu.c | 2 +-
> hw/sparc64/sun4u.c | 6 +++---
> hw/ssi/aspeed_smc.c | 4 ++--
> hw/ssi/ibex_spi_host.c | 2 +-
> hw/ssi/npcm7xx_fiu.c | 2 +-
> hw/ssi/pnv_spi.c | 2 +-
> hw/ssi/sifive_spi.c | 2 +-
> hw/ssi/ssi.c | 2 +-
> hw/ssi/xilinx_spi.c | 2 +-
> hw/ssi/xilinx_spips.c | 4 ++--
> hw/ssi/xlnx-versal-ospi.c | 2 +-
> hw/timer/a9gtimer.c | 2 +-
> hw/timer/allwinner-a10-pit.c | 2 +-
> hw/timer/arm_mptimer.c | 2 +-
> hw/timer/arm_timer.c | 2 +-
> hw/timer/aspeed_timer.c | 2 +-
> hw/timer/avr_timer16.c | 2 +-
> hw/timer/grlib_gptimer.c | 2 +-
> hw/timer/hpet.c | 2 +-
> hw/timer/i8254_common.c | 2 +-
> hw/timer/ibex_timer.c | 2 +-
> hw/timer/mss-timer.c | 2 +-
> hw/timer/nrf51_timer.c | 2 +-
> hw/timer/pxa2xx_timer.c | 2 +-
> hw/timer/renesas_cmt.c | 2 +-
> hw/timer/renesas_tmr.c | 2 +-
> hw/timer/sifive_pwm.c | 2 +-
> hw/timer/slavio_timer.c | 2 +-
> hw/timer/sse-timer.c | 2 +-
> hw/timer/stm32f2xx_timer.c | 2 +-
> hw/timer/xilinx_timer.c | 2 +-
> hw/tpm/tpm_crb.c | 2 +-
> hw/tpm/tpm_spapr.c | 2 +-
> hw/tpm/tpm_tis_i2c.c | 2 +-
> hw/tpm/tpm_tis_isa.c | 2 +-
> hw/tpm/tpm_tis_sysbus.c | 2 +-
> hw/tricore/tc27x_soc.c | 2 +-
> hw/tricore/tricore_testdevice.c | 2 +-
> hw/ufs/lu.c | 2 +-
> hw/ufs/ufs.c | 2 +-
> hw/usb/bus.c | 2 +-
> hw/usb/canokey.c | 2 +-
> hw/usb/ccid-card-emulated.c | 2 +-
> hw/usb/ccid-card-passthru.c | 2 +-
> hw/usb/dev-audio.c | 2 +-
> hw/usb/dev-hid.c | 6 +++---
> hw/usb/dev-hub.c | 2 +-
> hw/usb/dev-mtp.c | 2 +-
> hw/usb/dev-network.c | 2 +-
> hw/usb/dev-serial.c | 4 ++--
> hw/usb/dev-smartcard-reader.c | 4 ++--
> hw/usb/dev-storage-classic.c | 2 +-
> hw/usb/dev-uas.c | 2 +-
> hw/usb/hcd-dwc2.c | 2 +-
> hw/usb/hcd-dwc3.c | 2 +-
> hw/usb/hcd-ehci-pci.c | 2 +-
> hw/usb/hcd-ehci-sysbus.c | 2 +-
> hw/usb/hcd-ohci-pci.c | 2 +-
> hw/usb/hcd-ohci-sysbus.c | 2 +-
> hw/usb/hcd-uhci.c | 4 ++--
> hw/usb/hcd-xhci-nec.c | 2 +-
> hw/usb/hcd-xhci-sysbus.c | 2 +-
> hw/usb/hcd-xhci.c | 2 +-
> hw/usb/host-libusb.c | 2 +-
> hw/usb/redirect.c | 2 +-
> hw/usb/u2f-emulated.c | 2 +-
> hw/usb/u2f-passthru.c | 2 +-
> hw/vfio/ap.c | 2 +-
> hw/vfio/ccw.c | 2 +-
> hw/vfio/pci.c | 4 ++--
> hw/vfio/platform.c | 2 +-
> hw/virtio/vdpa-dev-pci.c | 2 +-
> hw/virtio/vdpa-dev.c | 2 +-
> hw/virtio/vhost-scsi-pci.c | 2 +-
> hw/virtio/vhost-user-blk-pci.c | 2 +-
> hw/virtio/vhost-user-device.c | 2 +-
> hw/virtio/vhost-user-fs-pci.c | 2 +-
> hw/virtio/vhost-user-fs.c | 2 +-
> hw/virtio/vhost-user-gpio.c | 2 +-
> hw/virtio/vhost-user-i2c.c | 2 +-
> hw/virtio/vhost-user-input.c | 2 +-
> hw/virtio/vhost-user-rng-pci.c | 2 +-
> hw/virtio/vhost-user-rng.c | 2 +-
> hw/virtio/vhost-user-scmi.c | 2 +-
> hw/virtio/vhost-user-scsi-pci.c | 2 +-
> hw/virtio/vhost-user-snd-pci.c | 2 +-
> hw/virtio/vhost-user-snd.c | 2 +-
> hw/virtio/vhost-user-vsock-pci.c | 2 +-
> hw/virtio/vhost-user-vsock.c | 2 +-
> hw/virtio/vhost-vsock-common.c | 2 +-
> hw/virtio/vhost-vsock-pci.c | 2 +-
> hw/virtio/vhost-vsock.c | 2 +-
> hw/virtio/virtio-9p-pci.c | 2 +-
> hw/virtio/virtio-balloon.c | 2 +-
> hw/virtio/virtio-blk-pci.c | 2 +-
> hw/virtio/virtio-crypto-pci.c | 2 +-
> hw/virtio/virtio-crypto.c | 2 +-
> hw/virtio/virtio-input-pci.c | 2 +-
> hw/virtio/virtio-iommu-pci.c | 2 +-
> hw/virtio/virtio-iommu.c | 2 +-
> hw/virtio/virtio-mem.c | 2 +-
> hw/virtio/virtio-mmio.c | 2 +-
> hw/virtio/virtio-net-pci.c | 2 +-
> hw/virtio/virtio-nsm.c | 2 +-
> hw/virtio/virtio-pci.c | 4 ++--
> hw/virtio/virtio-pmem.c | 2 +-
> hw/virtio/virtio-rng-pci.c | 2 +-
> hw/virtio/virtio-rng.c | 2 +-
> hw/virtio/virtio-scsi-pci.c | 2 +-
> hw/virtio/virtio-serial-pci.c | 2 +-
> hw/virtio/virtio.c | 2 +-
> hw/watchdog/sbsa_gwdt.c | 2 +-
> hw/watchdog/wdt_aspeed.c | 2 +-
> hw/watchdog/wdt_imx2.c | 2 +-
> hw/xen/xen-bus.c | 2 +-
> hw/xen/xen-legacy-backend.c | 6 +++---
> hw/xen/xen_pt.c | 2 +-
> target/arm/cpu.c | 26 +++++++++++++-------------
> target/arm/cpu64.c | 6 +++---
> target/arm/tcg/cpu64.c | 2 +-
> target/avr/cpu.c | 2 +-
> target/hexagon/cpu.c | 2 +-
> target/i386/cpu.c | 4 ++--
> target/microblaze/cpu.c | 2 +-
> target/mips/cpu.c | 2 +-
> target/ppc/cpu_init.c | 6 ------
> target/riscv/cpu.c | 2 +-
> target/s390x/cpu.c | 2 +-
> target/sparc/cpu.c | 4 ++--
> tests/unit/test-qdev-global-props.c | 2 +-
> docs/devel/migration/compatibility.rst | 4 ++--
> docs/devel/virtio-backends.rst | 2 +-
> 568 files changed, 644 insertions(+), 655 deletions(-)
>
^ permalink raw reply [flat|nested] 124+ messages in thread