[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for av
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings |
Date: |
Thu, 23 Feb 2017 10:33:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
Hello,
On 02/23/2017 01:32 AM, Alex Williamson wrote:
> On Wed, 22 Feb 2017 10:03:56 +0100
> Paolo Bonzini <address@hidden> wrote:
>
>> On 21/02/2017 18:54, Laszlo Ersek wrote:
>>> Actually, QEMU segfaults. From the dmesg:
>>>
>>> [Tue Feb 21 18:47:28 2017] CPU 0/KVM[8298]: segfault at 48 ip
>>> 00007fcb5dd02105 sp 00007fcb49efc270 error 4 in
>>> qemu-system-x86_64[7fcb5dae3000+905000]
>>>
>>> Complete backtrace below. (Thread 11 seems to be the one
>>> segfaulting.)
>>
>> Indeed. It's the virtio-blk device that is segfaulting, please try
>> this one liner (haven't reproduced it, but it seems obvious with the
>> backtrace and some sleep).
>
> I hit this as well, the patch below resolves it.
I still have migration issues with this patch on ppc, which fails
on the target guest with :
qemu-system-ppc64: VQ 0 size 0x80 < last_avail_idx 0xe1e - used_idx 0x0
qemu-system-ppc64: Failed to load virtio-blk:virtio
qemu-system-ppc64: error while loading state for instance 0x0 of device
'address@hidden:01.0/virtio-blk'
qemu-system-ppc64: load of migration failed: Operation not permitted
Thanks,
C.
> Tested-by: Alex Williamson <address@hidden>
>
>> commit c1aa478c7181c543606ca81404c59e126d66213d
>> Author: Paolo Bonzini <address@hidden>
>> Date: Wed Feb 22 10:02:37 2017 +0100
>>
>> virtio: check for vring setup in virtio_queue_empty
>>
>> If the vring has not been set up, there is nothing in the virtqueue.
>> virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in
>> this case; we have to filter it out just like virtio_queue_notify_aio_vq.
>>
>> Reported-by: Gerd Hoffmann <address@hidden>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>>
>> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
>> index 23483c7..e487e36 100644
>> --- a/hw/virtio/virtio.c
>> +++ b/hw/virtio/virtio.c
>> @@ -2291,7 +2291,7 @@ static bool virtio_queue_host_notifier_aio_poll(void
>> *opaque)
>> VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
>> bool progress;
>>
>> - if (virtio_queue_empty(vq)) {
>> + if (!vq->vring.desc || virtio_queue_empty(vq)) {
>> return false;
>> }
>>
>>
>
>
- [Qemu-devel] [PULL 09/23] virtio: add MemoryListener to cache ring translations, (continued)
- [Qemu-devel] [PULL 09/23] virtio: add MemoryListener to cache ring translations, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 11/23] virtio: check for vring setup in virtio_queue_update_used_idx, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 10/23] virtio: use VRingMemoryRegionCaches for descriptor ring, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 13/23] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Michael S. Tsirkin, 2017/02/17
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Gerd Hoffmann, 2017/02/21
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Laszlo Ersek, 2017/02/21
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Laszlo Ersek, 2017/02/21
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Paolo Bonzini, 2017/02/22
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Alex Williamson, 2017/02/22
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings,
Cédric Le Goater <=
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Paolo Bonzini, 2017/02/23
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Cédric Le Goater, 2017/02/23
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Paolo Bonzini, 2017/02/21
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Laszlo Ersek, 2017/02/21
- Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Gerd Hoffmann, 2017/02/21
[Qemu-devel] [PULL 14/23] pcie: simplify pcie_add_capability(), Michael S. Tsirkin, 2017/02/17
[Qemu-devel] [PULL 16/23] vfio: introduce vfio_get_vaddr(), Michael S. Tsirkin, 2017/02/17
[Qemu-devel] [PULL 15/23] vfio: trace map/unmap for notify as well, Michael S. Tsirkin, 2017/02/17
[Qemu-devel] [PULL 17/23] vfio: allow to notify unmap for very large region, Michael S. Tsirkin, 2017/02/17
[Qemu-devel] [PULL 18/23] intel_iommu: add "caching-mode" option, Michael S. Tsirkin, 2017/02/17