From: Auger Eric <eric.auger@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: peter.maydell@linaro.org, kevin.tian@intel.com,
tnowicki@marvell.com, quintela@redhat.com, mst@redhat.com,
qemu-devel@nongnu.org, dgilbert@redhat.com,
bharatb.linux@gmail.com, qemu-arm@nongnu.org,
jean-philippe@linaro.org, eric.auger.pro@gmail.com
Subject: Re: [PATCH v12 09/13] virtio-iommu: Implement fault reporting
Date: Wed, 15 Jan 2020 17:36:50 +0100 [thread overview]
Message-ID: <ece76aa3-f9fd-2834-0313-9c27a3c71f36@redhat.com> (raw)
In-Reply-To: <20200115150442.GD233443@xz-x1>
Hi Peter,
On 1/15/20 4:04 PM, Peter Xu wrote:
> 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...
You're right. I will fix it.
Thanks
Eric
>
> Thanks,
>
next prev parent reply other threads:[~2020-01-15 16:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 14:43 [PATCH v12 00/13] VIRTIO-IOMMU device Eric Auger
2020-01-09 14:43 ` [PATCH v12 01/13] migration: Support QLIST migration Eric Auger
2020-01-09 14:43 ` [PATCH v12 02/13] virtio-iommu: Add skeleton Eric Auger
2020-01-13 19:53 ` Peter Xu
2020-01-09 14:43 ` [PATCH v12 03/13] virtio-iommu: Decode the command payload Eric Auger
2020-01-09 14:43 ` [PATCH v12 04/13] virtio-iommu: Add the iommu regions Eric Auger
2020-01-13 19:53 ` Peter Xu
2020-01-14 8:37 ` Auger Eric
2020-01-14 18:49 ` Peter Xu
2020-01-13 20:06 ` Peter Xu
2020-01-14 8:48 ` Auger Eric
2020-01-09 14:43 ` [PATCH v12 05/13] virtio-iommu: Endpoint and domains structs and helpers Eric Auger
2020-01-13 20:23 ` Peter Xu
2020-01-14 8:51 ` Auger Eric
2020-01-14 18:07 ` Peter Xu
2020-01-15 13:00 ` Auger Eric
2020-01-15 14:59 ` Peter Xu
2020-01-15 16:55 ` Auger Eric
2020-01-15 13:15 ` Auger Eric
2020-01-09 14:43 ` [PATCH v12 06/13] virtio-iommu: Implement attach/detach command Eric Auger
2020-01-09 14:43 ` [PATCH v12 07/13] virtio-iommu: Implement map/unmap Eric Auger
2020-01-14 18:55 ` Peter Xu
2020-01-09 14:43 ` [PATCH v12 08/13] virtio-iommu: Implement translate Eric Auger
2020-01-09 14:43 ` [PATCH v12 09/13] virtio-iommu: Implement fault reporting Eric Auger
2020-01-14 19:04 ` Peter Xu
2020-01-15 13:12 ` Auger Eric
2020-01-15 15:04 ` Peter Xu
2020-01-15 16:36 ` Auger Eric [this message]
2020-01-09 14:43 ` [PATCH v12 10/13] virtio-iommu-pci: Add virtio iommu pci support Eric Auger
2020-01-09 14:43 ` [PATCH v12 11/13] hw/arm/virt: Add the virtio-iommu device tree mappings Eric Auger
2020-01-09 14:43 ` [PATCH v12 12/13] virtio-iommu: Support migration Eric Auger
2020-01-14 19:07 ` Peter Xu
2020-02-10 12:33 ` Juan Quintela
2020-02-10 13:09 ` Auger Eric
2020-02-10 13:36 ` Auger Eric
2020-02-10 16:44 ` Juan Quintela
2020-01-09 14:43 ` [PATCH v12 13/13] tests: Add virtio-iommu test Eric Auger
2020-01-09 15:12 ` [PATCH v12 00/13] VIRTIO-IOMMU device no-reply
2020-01-09 16:07 ` Auger Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ece76aa3-f9fd-2834-0313-9c27a3c71f36@redhat.com \
--to=eric.auger@redhat.com \
--cc=bharatb.linux@gmail.com \
--cc=dgilbert@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=jean-philippe@linaro.org \
--cc=kevin.tian@intel.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=tnowicki@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).