[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu/virtio issue due to non-atomic data access

From: Paul Guo
Subject: Re: [Qemu-devel] qemu/virtio issue due to non-atomic data access
Date: Fri, 3 May 2013 11:20:59 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

Yes, sounds to be a better idea. I'm wondering whether the final real virtual 
address for loading in lduw_phys(), etc is aligned also in most cases? given 
the load address (the input argument with type hwaddr) is required to be 
aligned (according to the comment). If so we should make the lduw_phys(), etc 
be the aligned cases by default and add the unaligned versions instead.


> On 2013-05-02 10:12, Paul Guo wrote:
>> A proper fix for this issue seems to be: Judge whether the address is 
>> aligned, do direct loading for the aligned case in ldq_le_p(), etc?
> No, I would think the proper fix would be to change the bits of virtio that 
> are known to access aligned memory to not use the pointer wrapper functions, 
> but to use a normal C memory access followed by leN_to_cpu et al.
> r~

reply via email to

[Prev in Thread] Current Thread [Next in Thread]