xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Joby Poriyath <joby.poriyath@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, malcolm.crossley@citrix.com,
	keir@xen.org, xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v5] interrupts: allow guest to set/clear MSI-X mask bit
Date: Thu, 15 Aug 2013 15:45:13 +0100	[thread overview]
Message-ID: <20130815144513.GA17939@citrix.com> (raw)
In-Reply-To: <520D023C02000078000EC491@nat28.tlf.novell.com>

On Thu, Aug 15, 2013 at 03:30:52PM +0100, Jan Beulich wrote:
> >>> On 15.08.13 at 16:03, Joby Poriyath <joby.poriyath@citrix.com> wrote:
> > Guest needs the ability to enable and disable MSI-X interrupts
> > by setting the MSI-X control bit, for a passed-through device.
> > Guest is allowed to write MSI-X mask bit only if Xen *thinks*
> > that mask is clear (interrupts enabled). If the mask is set by
> > Xen (interrupts disabled), writes to mask bit by the guest is
> > ignored.
> > 
> > Currently, a write to MSI-X mask bit by the guest is silently
> > ignored.
> > 
> > A likely scenario is where we have a 82599 SR-IOV nic passed
> > through to a guest. From the guest if you do
> > 
> >   ifconfig <ETH_DEV> down
> >   ifconfig <ETH_DEV> up
> > 
> > the interrupts remain masked. On VF reset, the mask bit is set
> > by the controller. At this point, Xen is not aware that mask is set.
> > However, interrupts are enabled by VF driver by clearing the mask
> > bit by writing directly to BAR3 region containing the MSI-X table.
> > 
> > From dom0, we can verify that
> > interrupts are being masked using 'xl debug-keys M'.
> > 
> > Initially, guest was allowed to modify MSI-X bit.
> > Later this behaviour was changed.
> > See changeset 74c213c506afcd74a8556dd092995fd4dc38b225.
> > 
> > Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
> > ---
> 
> You should start getting used to describe the changes compared
> to at least the most recent previous revision here.

I'll do this for the next version of the patch.

> 
> > @@ -328,7 +358,8 @@ const struct hvm_mmio_handler msixtbl_mmio_handler = {
> >  static void add_msixtbl_entry(struct domain *d,
> >                                struct pci_dev *pdev,
> >                                uint64_t gtable,
> > -                              struct msixtbl_entry *entry)
> > +                              struct msixtbl_entry *entry,
> > +                              struct pirq *pirq)
> 
> Sill missing the const here (this is where Andrew had pointed it out
> initially, the other change above just is a necessary consequence).
> 

Somehow the compiler didn't catch the error. I'm on Debian 7.
I'll send the updated patch.

> Jan
> 

Joby

      reply	other threads:[~2013-08-15 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 14:03 [PATCH v5] interrupts: allow guest to set/clear MSI-X mask bit Joby Poriyath
2013-08-15 14:30 ` Jan Beulich
2013-08-15 14:45   ` Joby Poriyath [this message]

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=20130815144513.GA17939@citrix.com \
    --to=joby.poriyath@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=malcolm.crossley@citrix.com \
    --cc=xen-devel@lists.xenproject.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).