[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] tcg: Really fix cpu_io_recompile
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2] tcg: Really fix cpu_io_recompile |
Date: |
Tue, 20 Mar 2018 08:39:06 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/19/2018 11:54 PM, Paolo Bonzini wrote:
> On 19/03/2018 04:15, Richard Henderson wrote:
>> We have confused the number of instructions that have been
>> executed in the TB with the number of instructions needed
>> to repeat the I/O instruction.
>>
>> We have used cpu_restore_state_from_tb, which means that
>> the guest pc is pointing to the I/O instruction. The only
>> time the answer to the later question is not 1 is when
>> MIPS or SH4 need to re-execute the branch for the delay
>> slot as well.
>>
>> We must rely on cpu->cflags_next_tb to generate the next TB,
>> as otherwise we have a race condition with other guest cpus
>> within the TB cache.
>>
>> Fixes: 0790f86861079b1932679d0f011e431aaf4ee9e2
>> Signed-off-by: Richard Henderson <address@hidden>
>> ---
>>
>> My v1 raced with Paolo's pull request, so v2 now fixes Pavel's fix.
>
> Thanks, let me know if you prefer to send a pull request yourself, or if
> I should include it in the next.
I'm at Linaro Connect this week. Please include this in your next.
r~