[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170817132514.49051ba0@w520.home>
Date: Thu, 17 Aug 2017 13:25:14 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Jike Song <jike.song@...el.com>, Neo Jia <cjia@...dia.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Eric Auger <eric.auger@...hat.com>,
Alexey Kardashevskiy <aik@...abs.ru>,
Robin Murphy <robin.murphy@....com>,
Joerg Roedel <joro@...tes.org>,
Kyle Mahlkuch <Kyle.Mahlkuch@....com>,
Vlad Tsyrklevich <vlad@...rklevich.net>,
"kvm-ppc@...r.kernel.org" <kvm-ppc@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Yongji Xie <elohimes@...il.com>,
Kirti Wankhede <kwankhede@...dia.com>,
Mauricio Faria de Oliveira <mauricfo@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Arvind Yadav <arvind.yadav.cs@...il.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
David Woodhouse <dwmw2@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Gibson <david@...son.dropbear.id.au>
Subject: Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X
table
On Thu, 17 Aug 2017 10:56:35 +0000
David Laight <David.Laight@...LAB.COM> wrote:
> From: Alex Williamson
> > Sent: 16 August 2017 17:56
> ...
> > Firmware pissing match... Processors running with 8k or less page size
> > fall within the recommendations of the PCI spec for register alignment
> > of MMIO regions of the device and this whole problem becomes less of an
> > issue.
>
> Actually if qemu is causing the MSI-X table accesses to fault, why doesn't
> it just lie to the guest about the physical address of the MSI-X table?
> Then mmio access to anything in the same physical page will just work.
That's an interesting idea, but now you need to add a BAR for the
virtualized vector table, but you'll also need to support extending a
BAR because there won't necessarily be a BAR available to add. Of
course PCI requires natural alignment of BARs, thus an extra few bytes
on the end doubles the BAR size. So also hope that if we need to
extend a BAR that there's a relatively small one available. In either
case you're changing the layout of the device from what the driver might
expect. We try pretty hard with device assignment to leave things in
the same place as they appear on bare metal, perhaps removing things,
but not actually moving things. It might work in the majority of
cases, but it seems a bit precarious overall. Thanks,
Alex
Powered by blists - more mailing lists