All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: pugs@cisco.com
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	kvm@vger.kernel.org, alex.williamson@redhat.com
Subject: [PATCH 0/2] vfio: virtualize INTX_DISABLE
Date: Fri, 05 Nov 2010 11:30:15 -0600	[thread overview]
Message-ID: <20101105171624.1638.33349.stgit@s20.home> (raw)

Tom,

Since we use INTX_DISABLE internally for PCI 2.3 devices, it's probably
not a good idea to allow vfio users direct access to it.  In trying to
virtualize it, I stumbled on some config space virtualization issues.
I think we want vconfig and the value written to hardware to be different
when there are virtualized bits, but we lump them together.  I think this
is why I've never been able to rely on the memory enable bit of config
space through vfio.  With this first patch, all virtualized bits that
are writable are sticky in vconfig.  Non-writable bits come from either
the old value or the physical hardware depending on whether it's
virtualized.  This means we can get rid of a lot of duplicated setting
and reading of vconfig, and only add code for more complicated
behaviors.  This is tricky code, to please double check that I'm not
doing something stupid.  Thanks,

Alex

---

Alex Williamson (2):
      vfio: Virtualize PCI_COMMAND_INTX_DISABLE
      vfio: Fix config space virtualization


 drivers/vfio/vfio_intrs.c      |   38 ++++++++----
 drivers/vfio/vfio_main.c       |   14 ++++
 drivers/vfio/vfio_pci_config.c |  131 ++++++++++++----------------------------
 include/linux/vfio.h           |    4 +
 4 files changed, 84 insertions(+), 103 deletions(-)

-- 

             reply	other threads:[~2010-11-05 17:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 17:30 Alex Williamson [this message]
2010-11-05 17:30 ` [PATCH 1/2] vfio: Fix config space virtualization Alex Williamson
2010-11-05 17:31 ` [PATCH 2/2] vfio: Virtualize PCI_COMMAND_INTX_DISABLE Alex Williamson
2010-11-10  0:59 ` [PATCH 0/2] vfio: virtualize INTX_DISABLE Tom Lyon
2010-11-10  3:07   ` 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=20101105171624.1638.33349.stgit@s20.home \
    --to=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pugs@cisco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.