[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130326180454.27467.7011.stgit@bling.home>
Date: Tue, 26 Mar 2013 12:16:56 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: alex.williamson@...hat.com, shangw@...ux.vnet.ibm.com
Cc: benh@...nel.crashing.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Subject: [PATCH 0/2] vfio-pci: Enable devices using unassigned config space
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(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists