diff --git a/qemu/hw/arm/tosa.c b/qemu/hw/arm/tosa.c index 8630e46e..607878ac 100644 --- a/qemu/hw/arm/tosa.c +++ b/qemu/hw/arm/tosa.c @@ -20,7 +20,7 @@ static int tosa_init(struct uc_struct *uc, MachineState *machine) { //cpu_arm_init(uc, "pxa255"); - uc->cpu = cpu_arm_init(uc, "cortex-a15"); // FIXME + uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15"); // FIXME return 0; } diff --git a/qemu/hw/arm/virt.c b/qemu/hw/arm/virt.c index e2a68412..9e618e86 100644 --- a/qemu/hw/arm/virt.c +++ b/qemu/hw/arm/virt.c @@ -54,7 +54,8 @@ static int machvirt_init(struct uc_struct *uc, MachineState *machine) return -1; } - uc->cpu = cpuobj = object_new(uc, object_class_get_name(oc)); + cpuobj = object_new(uc, object_class_get_name(oc)); + uc->cpu = (CPUState *)cpuobj; object_property_set_bool(uc, cpuobj, true, "realized", NULL); } diff --git a/qemu/hw/i386/pc.c b/qemu/hw/i386/pc.c index 66c4371a..d3aded6d 100644 --- a/qemu/hw/i386/pc.c +++ b/qemu/hw/i386/pc.c @@ -104,7 +104,7 @@ static X86CPU *pc_new_cpu(struct uc_struct *uc, const char *cpu_model, int64_t a } object_property_set_int(uc, OBJECT(cpu), apic_id, "apic-id", &local_err); - object_property_set_bool(uc, OBJECT(cpu), true, "realized", &local_err); // qq + object_property_set_bool(uc, OBJECT(cpu), true, "realized", &local_err); if (local_err) { error_propagate(errp, local_err); @@ -129,7 +129,7 @@ int pc_cpus_init(struct uc_struct *uc, const char *cpu_model) } for (i = 0; i < smp_cpus; i++) { - uc->cpu = pc_new_cpu(uc, cpu_model, x86_cpu_apic_id_from_index(i), &error); // qq + uc->cpu = (CPUState *)pc_new_cpu(uc, cpu_model, x86_cpu_apic_id_from_index(i), &error); if (error) { //error_report("%s", error_get_pretty(error)); error_free(error);