Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: alex.williamson@redhat.com, kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] vfio-pci: Towards VGA support
Date: Mon, 07 Jan 2013 15:07:08 -0700	[thread overview]
Message-ID: <20130107214605.8669.26237.stgit@bling.home> (raw)

vfio makes a nice interface to start looking at supporting VGA devices
assigned to virtual machines (ie. userspace drivers) because we can so
easily add additional ranges for a device.  In this patch we add
legacy MMIO (below 1MB) and I/O port (64k) to devices with PCI class
code VGA.  We can then use the kernel VGA arbiter service to change
chipset routing for each access to the VGA ranges defined in the PCI
spec.  The rest of the region space not used by VGA is left
inaccessible until we add future feature that needs some other
legacy range.

There's also a qemu userspace companion series to this which learns
how to look for this new feature flag and setup ranges.  Together
they get a step closer to supporting vfio-based VGA assignment, but
it doesn't yet work.  I'm posting in this broken state both for
archival purposes as well as the hope that someone has ideas of what
might be missing or be able to pick up and run with this code.

Some cards are able to get through execution of their VGA BIOS with
these patches, but none that I've seen sync the monitor to VGA text
mode from seabios.  With a hack in qemu for a card specific backdoor
on a Radeon HD5450 I've been able to get syslinux graphics mode to
work and Windows will use it during normal bootup.  I have no idea
what might be missing for VGA text mode.  Thanks,

Alex

---

Alex Williamson (1):
      vfio-pci: [NOT FOR COMMIT] Add support for legacy MMIO & I/O port towards VGA support


 drivers/vfio/pci/vfio_pci.c         |   74 ++++++++++++---
 drivers/vfio/pci/vfio_pci_private.h |    6 +
 drivers/vfio/pci/vfio_pci_rdwr.c    |  170 +++++++++++++++++++++++++++--------
 include/uapi/linux/vfio.h           |    3 +
 4 files changed, 197 insertions(+), 56 deletions(-)

             reply	other threads:[~2013-01-07 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 22:07 Alex Williamson [this message]
2013-01-07 22:07 ` [PATCH] vfio-pci: [NOT FOR COMMIT] Add support for legacy MMIO & I/O port towards VGA support 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=20130107214605.8669.26237.stgit@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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