From: Ido Yariv <ido@wizery.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] i386: pci-assign: Fix MSI-X table size
Date: Mon, 20 Jun 2016 11:40:17 -0400 [thread overview]
Message-ID: <20160620154017.GA12442@WorkStation.localdomain> (raw)
In-Reply-To: <87a99e71-d9b8-4c73-cced-6edf11a485a6@redhat.com>
Hi Paolo,
On Mon, Jun 20, 2016 at 04:54:17PM +0200, Paolo Bonzini wrote:
> On 18/06/2016 22:42, Ido Yariv wrote:
> > The current code creates a whole page mmio region for the MSI-X table
> > size.
> >
> > However, the page containing the MSI-X table may contain other registers
> > not related to MSI-X. Creating an mmio region for the whole page masks
> > such registers and may break drivers in the guest OS.
> >
> > Since maximal number of entries is known, use that instead to deduce the
> > table size when setting up the mmio region.
> >
> > Signed-off-by: Ido Yariv <ido@wizery.com>
>
> I can take this patch, but I'd like to warn you that pci-assign is
> deprecated (and replaced by VFIO). I seem to recall VFIO does this
> correctly, but it would be great if you could check that.
Just gave it a quick shot and everything seems to be working fine with
VFIO, thanks!
> Also, I would prefer the mmap/munmap to keep using MSIX_PAGE_SIZE, just
> to limit the number of things that could break.
I believe there might be another issue with this. The number of entries
can be up to 2048, so the MSI-X table size can theoretically exceed one
page and take up to 8 pages.
We can just modify MSIX_PAGE_SIZE to 0x8000, but wouldn't it be better
to just map exactly what we need?
Cheers,
Ido.
next prev parent reply other threads:[~2016-06-20 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 20:42 [Qemu-devel] [PATCH] i386: pci-assign: Fix MSI-X table size Ido Yariv
2016-06-20 14:54 ` Paolo Bonzini
2016-06-20 15:40 ` Ido Yariv [this message]
2016-06-20 17:51 ` Alex Williamson
2016-06-21 4:10 ` Michael S. Tsirkin
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=20160620154017.GA12442@WorkStation.localdomain \
--to=ido@wizery.com \
--cc=alex.williamson@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).