[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/13] i386: hvf: Use ins_len to advance IP
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 05/13] i386: hvf: Use ins_len to advance IP |
Date: |
Thu, 4 Jun 2020 08:39:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 5/28/20 9:37 PM, Roman Bolshakov wrote:
> There's no need to read VMCS twice, instruction length is already
> available in ins_len.
>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
> target/i386/hvf/hvf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
> index 9ccdb7e7c7..8ff1d25521 100644
> --- a/target/i386/hvf/hvf.c
> +++ b/target/i386/hvf/hvf.c
> @@ -871,7 +871,7 @@ int hvf_vcpu_exec(CPUState *cpu)
> } else {
> simulate_wrmsr(cpu);
> }
> - RIP(env) += rvmcs(cpu->hvf_fd, VMCS_EXIT_INSTRUCTION_LENGTH);
> + RIP(env) += ins_len;
I'd feel safer if you change ins_len to uint64_t first.
> store_regs(cpu);
> break;
> }
>
- Re: [PATCH 05/13] i386: hvf: Use ins_len to advance IP,
Philippe Mathieu-Daudé <=