From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, Ian.Campbell@citrix.com, xen-devel@lists.xen.org,
Joby Poriyath <joby.poriyath@citrix.com>,
malcolm.crossley@citrix.com
Subject: Re: [PATCH v2] interrupts: allow guest to set and clear MSI-X mask bit
Date: Tue, 6 Aug 2013 10:52:58 +0100 [thread overview]
Message-ID: <5200C77A.2020404@citrix.com> (raw)
In-Reply-To: <5200D00202000078000E98A6@nat28.tlf.novell.com>
On 06/08/13 09:29, Jan Beulich wrote:
>>>> On 05.08.13 at 18:03, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 05/08/13 12:49, Jan Beulich wrote:
>>> But a proper solution would of course be preferred. That may involve
>>> notifying Xen of the reset from the PF driver.
>> That is making the assumption that the PF driver is even aware that the
>> reset has occurred. If the PF driver can get at the reset information,
>> I still cant see Xen specific hooks being accepted upstream.
> You sort of contradict your earlier statement here that "the VF
> requests the PF to reset itself" (where you probably meant "it",
> as the VF is hardly allowed to cause a reset of the PF): Such an
> operation should imo be visible to the PF driver.
>
> And then, even if the reset is being done, shouldn't the interrupt
> setup occur _after_ the reset? Which would make Xen clear the
> flag...
The observed behaviour is this: On startup, the VF driver issues this
backchannel reset of itself (the VF) which, amongst other things, sets
the mask bit. It leaves the MSI/MSI-X addr and data fields alone, but
on further consideration, relying on this behaviour might not be a good
idea. The VF is then expected to re-enable the interrupt at its
convenience.
There are no obvious hooks in the PF driver to receive notification of
these backchannel resets.
~Andrew
>
>> Fundamentally, given that only the VM is in a position to actually know
>> about the state of the mask bit (As we cant possibly have Xen polling
>> for the state), then the guest has to have access to the mask bit.
> No, that continues to not be an option as long as Xen uses the mask
> bit itself. Once again, the obvious immediate solution would appear
> to be to carry out the write with the OR of both the guest intended
> and the hypervisor required mask bits, thus allowing the bit to get
> cleared immediately if Xen doesn't need it to be set (and the clearing
> would happen subsequently if Xen needs the flag to be set at the
> point of the guest write). This requires associating back the table
> entry to the IRQ in question (if any), in order to look at
> irq_desc->msi_desc->msi_attrib.masked.
>
> Jan
>
next prev parent reply other threads:[~2013-08-06 9:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 15:07 [PATCH v2] interrupts: allow guest to set and clear MSI-X mask bit Joby Poriyath
2013-07-19 15:23 ` Konrad Rzeszutek Wilk
2013-07-19 16:07 ` Joby Poriyath
2013-07-19 16:38 ` Malcolm Crossley
2013-07-23 10:54 ` Joby Poriyath
2013-07-23 13:21 ` Andrew Cooper
2013-07-23 13:28 ` Konrad Rzeszutek Wilk
2013-07-23 17:59 ` Joby Poriyath
2013-08-05 10:44 ` Jan Beulich
2013-08-05 11:01 ` Andrew Cooper
2013-08-05 11:49 ` Jan Beulich
2013-08-05 16:03 ` Andrew Cooper
2013-08-06 8:29 ` Jan Beulich
2013-08-06 9:52 ` Andrew Cooper [this message]
2013-08-06 10:17 ` Jan Beulich
2013-08-06 10:17 ` Pasi Kärkkäinen
2013-08-06 13:11 ` Pasi Kärkkäinen
2013-08-13 17:37 ` Joby Poriyath
2013-08-14 10:11 ` Jan Beulich
2013-08-13 17:08 ` Joby Poriyath
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=5200C77A.2020404@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=joby.poriyath@citrix.com \
--cc=keir@xen.org \
--cc=malcolm.crossley@citrix.com \
--cc=xen-devel@lists.xen.org \
/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).