From: Alex Williamson <alex.williamson@redhat.com>
To: Dave Airlie <airlied@gmail.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk
Date: Mon, 11 Nov 2013 15:32:17 -0700 [thread overview]
Message-ID: <1384209137.22415.57.camel@ul30vt.home> (raw)
In-Reply-To: <CAPM=9twfHpq-X4dDuD2UsaCLA7ST6JCP8iC=XNJaZC_thotKEQ@mail.gmail.com>
On Tue, 2013-11-12 at 07:55 +1000, Dave Airlie wrote:
> On Tue, Nov 12, 2013 at 7:43 AM, Alex Williamson
> <alex.williamson@redhat.com> wrote:
> > When MSI is enabled on Nvidia GeForce cards the driver seems to
> > acknowledge the interrupt by writing a 0xff byte to the MSI capability
> > ID register using the PCI config space mirror at offset 0x88000 from
> > BAR0. Without this, the device will only fire a single interrupt.
> > VFIO handles the PCI capability ID/next registers as virtual w/o write
> > support, so any write through config space is currently dropped. Add
> > a check for this and allow the write through the BAR window. The
> > registers are read-only anyway.
>
> This is only half the truth, I'm afraid if I'm right its much worse than that.
>
> At least on some GPUs the MSI ack is done via PCI config space itself,
> and on some its done via the mirror, and yes it matters on some cards
> which way it works.
I was hoping that wouldn't be the case since it seems fairly universal
that PCI config space access should be considered slow and avoided for
things like this. But, I suppose with MMConfig it's no worse than
device MMIO space.
On my GTX660 I did actually test both paths. The existing quirk
converts all accesses into the config space mirror into proper config
space accesses, so I changed the kernel to not drop the write. Then I
figured I'd rather solve this in QEMU using the mirror directly. So in
my case it didn't matter which path.
I'll keep this in mind though, I may want to enable kernel support for
this first and advertise it via a flag on the config space region, then
I can avoid doing a double write in QEMU and really breaking the state
machine. Thanks for the feedback,
Alex
next prev parent reply other threads:[~2013-11-11 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 21:43 [Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk Alex Williamson
2013-11-11 21:55 ` Dave Airlie
2013-11-11 22:32 ` Alex Williamson [this message]
2013-11-11 22:56 ` Dave Airlie
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=1384209137.22415.57.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=airlied@gmail.com \
--cc=qemu-devel@nongnu.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).