From: Yi Liu <yi.l.liu@intel.com>
To: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>,
David Woodhouse <dwmw2@infradead.org>,
Konstantin Belousov <kib@kib.kiev.ua>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>, Le Tan <tamlokveer@gmail.com>,
"jhb@freebsd.org" <jhb@freebsd.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eduardo Habkost <eduardo@habkost.net>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait
Date: Wed, 16 Jul 2025 12:01:44 +0800 [thread overview]
Message-ID: <1d00dc9f-7647-4aa5-9ca5-987a06ce4292@intel.com> (raw)
In-Reply-To: <d84bdcab-3d2e-4731-a9aa-b8094fbaf7e8@eviden.com>
On 2025/7/15 20:27, CLEMENT MATHIEU--DRIF wrote:
>
>
> On 15/07/2025 10:27 am, David Woodhouse wrote:
>> On Tue, 2025-07-15 at 06:11 +0000, CLEMENT MATHIEU--DRIF wrote:
>>>
>>>
>>> On 14/07/2025 11:22 pm, Konstantin Belousov wrote:
>>>>
>>>> On Mon, Jul 14, 2025 at 05:41:22PM +0100, David Woodhouse wrote:
>>>>> On 14 July 2025 15:28:09 GMT+01:00, Yi Liu <yi.l.liu@intel.com>
>>>>> wrote:
>>>>>> Hi David,
>>>>>>
>>>>>> On 2025/7/14 16:00, David Woodhouse wrote:
>>>>>>> From: David Woodhouse <dwmw@amazon.co.uk>
>>>>>>>
>>
>>>>>> I think this "if branch" can be moved just after the inv_desc non-zero
>>>>>> reserved bit checking. Hence you don't need a ret at all. :)
>>>>>
>>>>> We want to return false if the memory write fails, and the
>>>>> interrupt has to happen afterwards.
>>>
>>> Per spec: "Hardware behavior is undefined if the Status Address
>>> specified is not an address route-able to memory"
>>>
>>> Do we want to trigger the interrupt even when the DMA fails?
>>
>> Yes, we do. That's a quality of implementation issue. Just because the
>> behaviour is 'undefined' and theoretically gives us permission to do
>> whatever we like to the guest, we should still be as sensible as
>> possible.
>
Personally, I'm fine with generating the interrupt even the status write
failed. But to avoid potential conflict, I've also raised this question to
the VT-d spec owner. Haven't got a clear answer yet. To further understand
this, may I ask some dumb questions here. Why FreeBSD set both SW and IF
flag. What is the usage model here. Would software consider that all the QI
descriptors prior to this specific wait descriptor has succeeded when
either the interrupt got invoked or the expected status is written back?
Regards,
Yi Liu
next prev parent reply other threads:[~2025-07-16 3:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 8:00 [PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait David Woodhouse
2025-07-14 14:28 ` Yi Liu
2025-07-14 16:41 ` David Woodhouse
2025-07-14 21:22 ` Konstantin Belousov via
2025-07-15 6:11 ` CLEMENT MATHIEU--DRIF
2025-07-15 8:27 ` David Woodhouse
2025-07-15 12:27 ` CLEMENT MATHIEU--DRIF
2025-07-16 4:01 ` Yi Liu [this message]
2025-07-16 4:05 ` Konstantin Belousov
2025-07-16 9:23 ` Yi Liu
2025-07-16 9:36 ` Konstantin Belousov via
2025-07-15 12:35 ` Yi Liu
2025-07-15 13:59 ` CLEMENT MATHIEU--DRIF
2025-07-22 12:04 ` David Woodhouse
2025-08-01 15:09 ` Liu, Yi L
2025-08-02 5:38 ` Michael Tokarev
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=1d00dc9f-7647-4aa5-9ca5-987a06ce4292@intel.com \
--to=yi.l.liu@intel.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=dwmw2@infradead.org \
--cc=eduardo@habkost.net \
--cc=jasowang@redhat.com \
--cc=jhb@freebsd.org \
--cc=kib@kib.kiev.ua \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=tamlokveer@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.