[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] target/i386: hax: Move hax_setup_qemu_emulator. |
Date: |
Wed, 10 Jan 2018 14:27:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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