LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: alex.williamson@redhat.com, kvm@vger.kernel.org
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] vfio-pci: Misc enhancements
Date: Wed, 04 Mar 2015 13:02:37 -0700	[thread overview]
Message-ID: <20150304194711.26766.75450.stgit@gimli.home> (raw)

Each of these patches stands on it's own, but they all touch the
same file and therefore build on each other to some extent.  The first
patch allows vfio-pci to accept a list of IDs as a module parameter,
exactly like pci-stub.  This is really useful to get vfio-pci bound to
devices that are intended to be used exclusively by userspace without
more complex scripts (particuarly with modprobe.d softdep, pre
loading).

The 2nd patch allows a module option to disable VGA access if vfio-pci
is configured with VGA support.  By itself this doesn't do much, but
with patch 5, we add a VGA arbiter client that will opt-out devices
from arbitration if the user cannot access VGA regions of the device.
If you have extra GPUs in your system exclusively for use via vfio-pci
and don't depend on VGA resource access, this opt-out can allow host
graphics to enable DRI2 support as if the additional GPUs weren't
there.  This depends on https://lkml.org/lkml/2015/2/24/430 or else
vga arbiter support gets ugly (still looking for an Ack there).

The other interesting feature here is idle power management.  It's
possible that there are extra devices in a host that are used
exclusively via vfio-pci and that those devices are not used 100% of
the time.  To be power conscious we can put devices into a low power
state when they're not actively being used.  This doesn't always save
much, or necessarily any power, but we can at least try.

I'll also note that the last patch makes use of pci_bus_max_busnr()
which seems to be in flux with some current upstream patches.  I don't
really care if we use pci_bus_max_busnr() or some replacement for it,
so long as pci-core allows a way to determine the bus number range
below a bridge so I can determine if there's more than one VGA device
below it.  Comments welcome.  Thanks,

Alex

---

Alex Williamson (5):
      vfio-pci: Allow PCI IDs to be specified as module options
      vfio-pci: Add module option to disable VGA region access
      vfio-pci: Remove warning if try-reset fails
      vfio-pci: Move idle devices to D3hot power state
      vfio-pci: Add VGA arbiter client


 drivers/vfio/pci/vfio_pci.c |  174 +++++++++++++++++++++++++++++++++++++++----
 1 file changed, 157 insertions(+), 17 deletions(-)

             reply	other threads:[~2015-03-04 20:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 20:02 Alex Williamson [this message]
2015-03-04 20:02 ` [PATCH 1/5] vfio-pci: Allow PCI IDs to be specified as module options Alex Williamson
2015-03-04 20:49   ` Bandan Das
2015-03-04 22:18     ` Alex Williamson
2015-03-04 22:32       ` Bandan Das
2015-03-04 23:01         ` Alex Williamson
2015-03-06 22:11   ` Bjorn Helgaas
2015-03-11 20:14     ` Alex Williamson
2015-03-11 20:20       ` Bjorn Helgaas
2015-03-04 20:02 ` [PATCH 2/5] vfio-pci: Add module option to disable VGA region access Alex Williamson
2015-03-04 20:02 ` [PATCH 3/5] vfio-pci: Remove warning if try-reset fails Alex Williamson
2015-03-04 20:03 ` [PATCH 4/5] vfio-pci: Move idle devices to D3hot power state Alex Williamson
2015-03-04 20:03 ` [PATCH 5/5] vfio-pci: Add VGA arbiter client 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=20150304194711.26766.75450.stgit@gimli.home \
    --to=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --subject='Re: [PATCH 0/5] vfio-pci: Misc enhancements' \
    /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

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).