qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target/i386: hax: Move hax_setup_qemu_emulator.


From: address@hidden
Subject: Re: [Qemu-devel] [PATCH] target/i386: hax: Move hax_setup_qemu_emulator.
Date: Wed, 10 Jan 2018 10:05:26 -0800

Thanks. Then it seems I should put this piece of code in a common
function first and then update this CL.

On Wed, Jan 10, 2018 at 5:27 AM, Paolo Bonzini <address@hidden> wrote:
> On 10/01/2018 07:47, Tao Wu wrote:
>> hax_setup_qemu_emulator reference env->efer which is updated in
>> hax_get_msrs, so it has to be called after hax_get_msrs. This fix
>> the bug that sometimes dump_state show 32 bits regs even in 64 bits
>> mode.
>>
>> Signed-off-by: Tao Wu <address@hidden>
>> ---
>>  target/i386/hax-all.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
>> index 3ce6950296..a933bd462d 100644
>> --- a/target/i386/hax-all.c
>> +++ b/target/i386/hax-all.c
>> @@ -887,9 +887,6 @@ static int hax_sync_vcpu_register(CPUArchState *env, int 
>> set)
>>              return -1;
>>          }
>>      }
>> -    if (!set) {
>> -        hax_setup_qemu_emulator(env);
>> -    }
>>      return 0;
>>  }
>>
>> @@ -1070,6 +1067,7 @@ static int hax_arch_get_registers(CPUArchState *env)
>>          return ret;
>>      }
>>
>> +    hax_setup_qemu_emulator(env);
>>      return 0;
>>  }
>>
>>
>
> Queued, thanks.
>
> Please look into sharing the similar code in target/i386/kvm.c
> (kvm_get_sregs), since the HAX code has some bugs (for example,
> HF_CPL_MASK should be SS.DPL, not CS.DPL).
>
> Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]