|
@@ -204,6 +204,7 @@ static Property cpu_common_props[] = {
|
|
DEFINE_PROP_END_OF_LIST(),
|
|
DEFINE_PROP_END_OF_LIST(),
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#ifndef CONFIG_USER_ONLY
|
|
static bool cpu_get_start_powered_off(Object *obj, Error **errp)
|
|
static bool cpu_get_start_powered_off(Object *obj, Error **errp)
|
|
{
|
|
{
|
|
CPUState *cpu = CPU(obj);
|
|
CPUState *cpu = CPU(obj);
|
|
@@ -215,12 +216,13 @@ static void cpu_set_start_powered_off(Object *obj, bool value, Error **errp)
|
|
CPUState *cpu = CPU(obj);
|
|
CPUState *cpu = CPU(obj);
|
|
cpu->start_powered_off = value;
|
|
cpu->start_powered_off = value;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
void cpu_class_init_props(DeviceClass *dc)
|
|
void cpu_class_init_props(DeviceClass *dc)
|
|
{
|
|
{
|
|
|
|
+#ifndef CONFIG_USER_ONLY
|
|
ObjectClass *oc = OBJECT_CLASS(dc);
|
|
ObjectClass *oc = OBJECT_CLASS(dc);
|
|
|
|
|
|
- device_class_set_props(dc, cpu_common_props);
|
|
|
|
/*
|
|
/*
|
|
* We can't use DEFINE_PROP_BOOL in the Property array for this
|
|
* We can't use DEFINE_PROP_BOOL in the Property array for this
|
|
* property, because we want this to be settable after realize.
|
|
* property, because we want this to be settable after realize.
|
|
@@ -228,6 +230,9 @@ void cpu_class_init_props(DeviceClass *dc)
|
|
object_class_property_add_bool(oc, "start-powered-off",
|
|
object_class_property_add_bool(oc, "start-powered-off",
|
|
cpu_get_start_powered_off,
|
|
cpu_get_start_powered_off,
|
|
cpu_set_start_powered_off);
|
|
cpu_set_start_powered_off);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+ device_class_set_props(dc, cpu_common_props);
|
|
}
|
|
}
|
|
|
|
|
|
void cpu_exec_initfn(CPUState *cpu)
|
|
void cpu_exec_initfn(CPUState *cpu)
|