[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw: virtio-mem: detach the element fromt the virtqueue when
From: |
David Hildenbrand |
Subject: |
Re: [PATCH] hw: virtio-mem: detach the element fromt the virtqueue when error occurs |
Date: |
Sun, 16 Aug 2020 14:10:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 14.08.20 03:01, Li Qiang wrote:
> David Hildenbrand <david@redhat.com> 于2020年8月14日周五 上午1:15写道:
>>
>> On 13.08.20 18:46, Li Qiang wrote:
>>
>> For now we use "virtio-mem:" for the subject, without the "hw: "part.
>>
>>> If error occurs while processing the virtio request we should call
>>> 'virtqueue_detach_element' to detach the element from the virtqueue
>>> before free the elem.
>>
>> What's the effect of this? In all cases we trigger a virtio_error(), so
>> do we really have to bother?
>>
>
> Though the 'in_use' will be reset to 0 while reseting the virtio device.
> The mapped sglist will not be unammped.
> There maybe some undesired behavior. CC Paolo to make a confirmation.
Looking at hw/virtio/virtio-crypto.c, this seems to be the right thing
to do.
Can you please respin, avoiding adding the label, only inserting the 3
separate virtqueue_detach_element() calls?
Thanks!
--
Thanks,
David / dhildenb