[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only
From: |
Paolo Bonzini |
Subject: |
[PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only |
Date: |
Thu, 19 Dec 2024 09:31:51 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Avoid the empty property list for user-only mode.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Link:
20241216035109.3486070-5-richard.henderson@linaro.org">https://lore.kernel.org/r/20241216035109.3486070-5-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/s390x/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 4702761ca30..263f9e84ed6 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -309,8 +309,8 @@ static const gchar *s390_gdb_arch_name(CPUState *cs)
return "s390:64-bit";
}
+#ifndef CONFIG_USER_ONLY
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),
DEFINE_PROP_INT32("book-id", S390CPU, env.book_id, -1),
@@ -318,9 +318,9 @@ static const Property s390x_cpu_properties[] = {
DEFINE_PROP_BOOL("dedicated", S390CPU, env.dedicated, false),
DEFINE_PROP_CPUS390ENTITLEMENT("entitlement", S390CPU, env.entitlement,
S390_CPU_ENTITLEMENT_AUTO),
-#endif
DEFINE_PROP_END_OF_LIST()
};
+#endif
#ifdef CONFIG_TCG
#include "hw/core/tcg-cpu-ops.h"
@@ -388,7 +388,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
device_class_set_parent_realize(dc, s390_cpu_realizefn,
&scc->parent_realize);
- device_class_set_props(dc, s390x_cpu_properties);
dc->user_creatable = true;
resettable_class_set_parent_phases(rc, NULL, s390_cpu_reset_hold, NULL,
@@ -404,6 +403,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
cc->gdb_read_register = s390_cpu_gdb_read_register;
cc->gdb_write_register = s390_cpu_gdb_write_register;
#ifndef CONFIG_USER_ONLY
+ device_class_set_props(dc, s390x_cpu_properties);
s390_cpu_class_init_sysemu(cc);
#endif
cc->disas_set_info = s390_cpu_disas_set_info;
--
2.47.1
- [PULL 00/41] Rust, qdev, target/i386 changes for 2024-12-19, Paolo Bonzini, 2024/12/19
- [PULL 01/41] migration: Constify migration_properties, Paolo Bonzini, 2024/12/19
- [PULL 02/41] hw/ide: Constify sysbus_ahci_properties, Paolo Bonzini, 2024/12/19
- [PULL 03/41] target/ppc: Remove empty property list, Paolo Bonzini, 2024/12/19
- [PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only,
Paolo Bonzini <=
- [PULL 06/41] hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM, Paolo Bonzini, 2024/12/19
- [PULL 05/41] hw/pci-host/astro: Remove empty Property list, Paolo Bonzini, 2024/12/19
- [PULL 08/41] hw/s390x: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 09/41] hw/xen: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 10/41] hw/sparc: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 11/41] hw/virtio: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 12/41] include/hw/qdev-core: Detect most empty Property lists at compile time, Paolo Bonzini, 2024/12/19
- [PULL 07/41] hw/tricore: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 13/41] hw/core: Introduce device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 15/41] hw/scsi/megasas: Use device_class_set_props_n, Paolo Bonzini, 2024/12/19