From: Alex Williamson <alex.williamson@redhat.com>
To: alex.williamson@redhat.com, shangw@linux.vnet.ibm.com
Cc: benh@kernel.crashing.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org
Subject: [PATCH 0/2] vfio-pci: Enable devices using unassigned config space
Date: Tue, 26 Mar 2013 12:16:56 -0600 [thread overview]
Message-ID: <20130326180454.27467.7011.stgit@bling.home> (raw)
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(-)
next reply other threads:[~2013-03-26 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 18:16 Alex Williamson [this message]
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
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=20130326180454.27467.7011.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shangw@linux.vnet.ibm.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