From: Alex Williamson <alex.williamson@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"shashidhar.patil@gmail.com" <shashidhar.patil@gmail.com>
Subject: Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table
Date: Tue, 31 Jan 2012 14:06:13 -0700 [thread overview]
Message-ID: <1328043973.6937.146.camel@bling.home> (raw)
In-Reply-To: <20120131201939.GA6178@redhat.com>
On Tue, 2012-01-31 at 22:19 +0200, Michael S. Tsirkin wrote:
> On Tue, Jan 31, 2012 at 08:16:31PM +0100, Jan Kiszka wrote:
> > On 2012-01-31 20:12, Michael S. Tsirkin wrote:
> > > On Tue, Jan 31, 2012 at 12:07:39PM -0700, Alex Williamson wrote:
> > >> On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote:
> > >>> On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson wrote:
> > >>>> Per the PCI spec, all vectors should be masked at handoff.
> > >>>>
> > >>>> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > >>>> ---
> > >>>>
> > >>>> hw/device-assignment.c | 20 +++++++++++++++++++-
> > >>>> 1 files changed, 19 insertions(+), 1 deletions(-)
> > >>>>
> > >>>> diff --git a/hw/device-assignment.c b/hw/device-assignment.c
> > >>>> index af614d3..6efa219 100644
> > >>>> --- a/hw/device-assignment.c
> > >>>> +++ b/hw/device-assignment.c
> > >>>> @@ -1462,6 +1462,22 @@ static const MemoryRegionOps msix_mmio_ops = {
> > >>>> },
> > >>>> };
> > >>>>
> > >>>> +static void msix_reset(AssignedDevice *dev)
> > >>>> +{
> > >>>> + MSIXTableEntry *entry;
> > >>>> + int i;
> > >>>> +
> > >>>> + if (!dev->msix_table) {
> > >>>> + return;
> > >>>> + }
> > >>>> +
> > >>>> + memset(dev->msix_table, 0, 0x1000);
> > >>>> +
> > >>>> + for (i = 0, entry = dev->msix_table; i < dev->msix_max; i++, entry++) {
> > >>>> + entry->ctrl = 0x1; /* Masked */
> > >>>
> > >>> This is broken for BE hosts.
> > >>
> > >> Show me a BE host that even remotely works with this device assignment
> > >> implementation. Thanks,
> > >>
> > >> Alex
> > >
> > > I don't get it. Yes lots of cleanup is needed but why add more broken
> > > code?
> >
> > At some point, we will just do this via the PCI core, and that will have
> > to do it correctly anyway. This code here is supposed to be removed again.
> >
> > Jan
>
> Either we say this is all dead code, then
> let's just fix bugs until it is rewritten.
> To fix the bug, all we need is patch 9, maybe 6 and 7.
>
> Or there is intent to maintain it going forward
> then, methinks, it needs to be brought up to
> some minimal standards.
There's minimal standards and then there's endian neutrality and non-x86
support for a piece of code that, I think, is probably never going to
see qemu.git. There's a big gap between those. I'd love for us to move
to vfio, but for now we're stuck with this and I'll try to update it and
make it a little better each time. Looking out for big endian hosts
isn't high on my priority list for this code though. Thanks,
Alex
next prev parent reply other threads:[~2012-01-31 21:06 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-28 14:21 [PATCH 0/9] pci-assign: 64bit MMIO + better MSI-X table support Alex Williamson
2012-01-28 14:21 ` [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest Alex Williamson
2012-01-31 12:40 ` Avi Kivity
2012-01-31 12:45 ` Jan Kiszka
2012-01-31 12:51 ` Avi Kivity
2012-01-31 12:57 ` Jan Kiszka
2012-01-31 13:10 ` Avi Kivity
2012-01-31 13:21 ` Jan Kiszka
2012-01-31 13:33 ` Avi Kivity
2012-01-31 21:08 ` Alex Williamson
2012-01-31 21:14 ` Michael S. Tsirkin
2012-02-01 9:03 ` Avi Kivity
2012-02-01 10:03 ` Michael S. Tsirkin
2012-02-01 13:55 ` Alex Williamson
2012-02-01 15:18 ` Michael S. Tsirkin
2012-02-01 15:24 ` Alex Williamson
2012-01-28 14:21 ` [PATCH 2/9] pci-assign: Fix warnings with DEBUG enabled Alex Williamson
2012-01-28 14:21 ` [PATCH 3/9] pci-assign: Update MSI-X MMIO to Memory API Alex Williamson
2012-01-31 12:45 ` Avi Kivity
2012-01-31 21:13 ` Alex Williamson
2012-02-01 4:22 ` Alex Williamson
2012-02-01 9:04 ` Avi Kivity
2012-02-01 13:56 ` Alex Williamson
2012-01-28 14:21 ` [PATCH 4/9] pci-assign: Use struct for MSI-X table Alex Williamson
2012-01-31 17:40 ` Michael S. Tsirkin
2012-01-31 19:05 ` Alex Williamson
2012-01-31 20:00 ` Michael S. Tsirkin
2012-01-31 21:17 ` Alex Williamson
2012-01-31 21:24 ` Michael S. Tsirkin
2012-01-31 21:30 ` Alex Williamson
2012-01-28 14:22 ` [PATCH 5/9] pci-assign: Only calculate maximum MSI-X vector entries once Alex Williamson
2012-01-31 20:18 ` Michael S. Tsirkin
2012-01-31 20:31 ` Alex Williamson
2012-01-31 20:56 ` Michael S. Tsirkin
2012-01-28 14:22 ` [PATCH 6/9] pci-assign: Proper initialization for MSI-X table Alex Williamson
2012-01-31 17:40 ` Michael S. Tsirkin
2012-01-31 19:07 ` Alex Williamson
2012-01-31 19:12 ` Michael S. Tsirkin
2012-01-31 19:16 ` Jan Kiszka
2012-01-31 20:19 ` Michael S. Tsirkin
2012-01-31 21:06 ` Alex Williamson [this message]
2012-01-28 14:22 ` [PATCH 7/9] pci-assign: Allocate entries for all MSI-X vectors Alex Williamson
2012-01-28 14:22 ` [PATCH 8/9] pci-assign: Use MSIX_PAGE_SIZE Alex Williamson
2012-01-28 14:22 ` [PATCH 9/9] pci-assign: Update MSI-X config based on table writes Alex Williamson
2012-01-31 12:50 ` Avi Kivity
2012-01-30 10:11 ` [PATCH 0/9] pci-assign: 64bit MMIO + better MSI-X table support Jan Kiszka
2012-01-30 13:44 ` Alex Williamson
2012-01-31 12:52 ` Avi Kivity
2012-01-31 12:56 ` Jan Kiszka
2012-02-06 15:55 ` Shashidhar Patil
2012-02-06 17:29 ` Alex Williamson
2012-02-09 16:23 ` Shashidhar Patil
2012-02-09 17:23 ` Alex Williamson
2012-02-12 16:30 ` Shashidhar Patil
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=1328043973.6937.146.camel@bling.home \
--to=alex.williamson@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=shashidhar.patil@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 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).