The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] vfio-pci: Enable devices using unassigned config space
@ 2013-03-26 18:16 Alex Williamson
  2013-03-26 18:17 ` [PATCH 1/2] vfio-pci: Use byte granularity in config map Alex Williamson
  2013-03-26 18:17 ` [PATCH 2/2] vfio-pci: Enable raw access to unassigned config space Alex Williamson
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Williamson @ 2013-03-26 18:16 UTC (permalink / raw)
  To: alex.williamson, shangw; +Cc: benh, linux-kernel, kvm

Gavin Shan reported that be2net devices don't work under vfio-pci
because they attempt to make use of device registers hidden among the
gaps in PCI config space.  I imagine this is a violation of the PCI
specification, but if we want to allow such devices to work we need
to enable access.  In reality, config space registers are no different
from MMIO or I/O port registers, which are already unregulated.

The trouble is that we map config space regions using a byte per dword
because everything in config space is dword aligned... everything
except the length.  This leads to a latent bug where capabilities that
do not end at a dword boundary get rounded down, preventing access to
those last few bytes.  Therefore, we first need to enable byte
granularity of config space, then add an accessor for unassigned
regions.

Gavin, I'd appreciate if you're able to test this against the be2net
to verify that it resolves the problem.  Thanks,

Alex

---

Alex Williamson (2):
      vfio-pci: Use byte granularity in config map
      vfio-pci: Enable raw access to unassigned config space


 drivers/vfio/pci/vfio_pci_config.c |  166 ++++++++++++++++++++----------------
 1 file changed, 93 insertions(+), 73 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-27  3:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 18:16 [PATCH 0/2] vfio-pci: Enable devices using unassigned config space Alex Williamson
2013-03-26 18:17 ` [PATCH 1/2] vfio-pci: Use byte granularity in config map Alex Williamson
     [not found]   ` <20130327023525.GA19001@shangw.(null)>
2013-03-27  3:23     ` Alex Williamson
2013-03-26 18:17 ` [PATCH 2/2] vfio-pci: Enable raw access to unassigned config space Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox