qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access d


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access descriptors
Date: Tue, 13 Dec 2016 12:14:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 12/12/2016 15:17, Stefan Hajnoczi wrote:
>>      unsigned int total_bufs, in_total, out_total;
>> -    void *desc_ptr = NULL;
>> -    hwaddr len = 0;
>> +    MemoryRegionCache *desc_cache = NULL;
>> +    MemoryRegionCache vring_desc_cache;
>> +    MemoryRegionCache indirect_desc_cache;
>> +    int64_t len = 0;
>>      int rc;
>>  
>> +    rcu_read_lock();
>
> Please document the purpose of the rcu_read_lock() in virtio code.

Wrong patch, this should be in patch 10 (and then the answer is simply
that VRingMemoryRegionCaches is protected by RCU).

> Also, do the goto err cases call rcu_read_unlock()?

Yes, it does; the err label ends with a "goto done".

Paolo



reply via email to

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