Am 18.06.2013 11:39, schrieb Igor Mammedov:
> On Sun, 16 Jun 2013 17:57:22 +0200
> Andreas Färber <afaer...@suse.de> wrote:
> 
>> Change Monitor::mon_cpu to CPUState as well.
>> In cpu_synchronize_all_states() use qemu_for_each_cpu() now.
>>
>> Reviewed-by: liguang <lig.f...@cn.fujitsu.com>
>> Signed-off-by: Andreas Färber <afaer...@suse.de>
>> ---
[...]
>> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
>> index 655483b..f93629f 100644
>> --- a/hw/i386/kvmvapic.c
>> +++ b/hw/i386/kvmvapic.c
>> @@ -456,7 +456,7 @@ void vapic_report_tpr_access(DeviceState *dev, CPUState 
>> *cs, target_ulong ip,
>>      X86CPU *cpu = X86_CPU(cs);
>>      CPUX86State *env = &cpu->env;
>>  
>> -    cpu_synchronize_state(env);
>> +    cpu_synchronize_state(cs);
>>  
>>      if (evaluate_tpr_instruction(s, env, &ip, access) < 0) {
>>          if (s->state == VAPIC_ACTIVE) {
>> @@ -627,7 +627,7 @@ static void vapic_write(void *opaque, hwaddr addr, 
>> uint64_t data,
>>      hwaddr rom_paddr;
>>      VAPICROMState *s = opaque;
>>  
>> -    cpu_synchronize_state(env);
>> +    cpu_synchronize_state(CPU(x86_env_get_cpu(env)));
> why not use ENV_GET_CPU() here and in several other places below to make it
> uniform?

Explained that in another reply. There's currently about four misuses in
the tree, and there had been previous patches to clean some others up;
after the series only one remains in target-ppc/mmu-hash.c.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to