[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: |
Fri, 5 Jun 2020 16:29:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 6/4/20 8:15 PM, Paolo Bonzini wrote:
> On 04/06/20 08:39, Philippe Mathieu-Daudé wrote:
>>> 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.
>>
>
> Why? It will never be more than 15 (it's also a 32-bit field in the VMCS).
Indeed, I am now seeing the comment in target/i386/hvf/vmcs.h:132
/* 32-bit read-only data fields */
#define VMCS_EXIT_INSTRUCTION_LENGTH 0x0000440C
So:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Thanks Paolo.