[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] notdirty_mem_write: implement 8-byte accesses
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] notdirty_mem_write: implement 8-byte accesses |
Date: |
Fri, 13 Oct 2017 13:04:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/13/2017 11:27 AM, Andrew Baumann wrote:
>> From: Andrew Baumann
>> Sent: Friday, 13 October 2017 11:19
>>
>> Aligned 8-byte memory writes by a 64-bit target on a 64-bit host should
>> always turn into atomic 8-byte writes on the host, however if we missed
>> in the softmmu, and the TLB line was marked as not dirty, then we
>> would end up tearing the 8-byte write into two 4-byte writes in
>> access_with_adjusted_size().
>>
>> Signed-off-by: Andrew Baumann <address@hidden>
>> ---
>> This manifested as a race in lock-free synchronisation with an aarch64
>> Windows guest on an x86-64 host (with multithreaded TCG).
>>
>> exec.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>
> By the way, I noticed that watch_mem_ops are also 4-byte only. I suspect the
> same fix may be needed there?
Yep.
r~