[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] VCPU hotplug support
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] VCPU hotplug support |
Date: |
Tue, 17 Jan 2012 15:22:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-01-17 15:17, Jan Kiszka wrote:
>>
>> /* output Bochs bios info messages */
>> //#define DEBUG_BIOS
>> @@ -930,10 +932,22 @@ static void pc_cpu_reset(void *opaque)
>> env->halted = !cpu_is_bsp(env);
>> }
>>
>> -static CPUState *pc_new_cpu(const char *cpu_model)
>> +CPUState *pc_new_cpu(const char *cpu_model)
>> {
>> CPUState *env;
>>
>> + if (cpu_model == NULL) {
>> +#ifdef TARGET_X86_64
>> + cpu_model = "qemu64";
>> +#else
>> + cpu_model = "qemu32";
>> +#endif
>
> Just always initialize global_cpu_model to a non-NULL value.
Another interface idea: cache the first cpu_model in this function and
use the cached one if a later call passes in NULL. That way PIIX4 would
not need to have access to an ugly global variable.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
[Qemu-devel] [PATCH 3/3] add cpu_set qmp command, Igor Mammedov, 2012/01/17