[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v12 09/13] virtio-iommu: Implement fault reporting
From: |
Peter Xu |
Subject: |
Re: [PATCH v12 09/13] virtio-iommu: Implement fault reporting |
Date: |
Wed, 15 Jan 2020 10:04:42 -0500 |
On Wed, Jan 15, 2020 at 02:12:20PM +0100, Auger Eric wrote:
> >> +static void virtio_iommu_report_fault(VirtIOIOMMU *viommu, uint8_t reason,
> >> + int flags, uint32_t endpoint,
> >> + uint64_t address)
> >> +{
[...]
> >> + if (iov_size(elem->in_sg, elem->in_num) < sizeof(fault)) {
> >> + virtio_error(vdev, "error buffer of wrong size");
> >> + virtqueue_detach_element(vq, elem, 0);
> >> + g_free(elem);
> >> + continue;
> >
> > If virtio_error(), should we stop rather than continue?
> My understanding is the buffer just popped had a wrong size so it is not
> usable. We skip it we try to use another one if any. Does it make sense?
I'm not very familiar to virtio, but I see that virtio_error marks
vdev->broken to true. If with that iiuc the next virtqueue_pop() will
fail directly (see the first call to virtio_device_disabled in
virtqueue_pop). Then I don't see why retry any more...
Thanks,
--
Peter Xu
[PATCH v12 06/13] virtio-iommu: Implement attach/detach command, Eric Auger, 2020/01/09
[PATCH v12 07/13] virtio-iommu: Implement map/unmap, Eric Auger, 2020/01/09
[PATCH v12 08/13] virtio-iommu: Implement translate, Eric Auger, 2020/01/09
[PATCH v12 09/13] virtio-iommu: Implement fault reporting, Eric Auger, 2020/01/09
[PATCH v12 10/13] virtio-iommu-pci: Add virtio iommu pci support, Eric Auger, 2020/01/09
[PATCH v12 11/13] hw/arm/virt: Add the virtio-iommu device tree mappings, Eric Auger, 2020/01/09
[PATCH v12 12/13] virtio-iommu: Support migration, Eric Auger, 2020/01/09
[PATCH v12 13/13] tests: Add virtio-iommu test, Eric Auger, 2020/01/09
Re: [PATCH v12 00/13] VIRTIO-IOMMU device, no-reply, 2020/01/09