<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/vfio/vfio.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-12-19T17:17:13Z</updated>
<entry>
<title>vfio: Convert control interface to misc driver</title>
<updated>2013-12-19T17:17:13Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2013-12-19T17:17:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d10999016f4164e9b80f1b3dece3842087cfa3bb'/>
<id>urn:sha1:d10999016f4164e9b80f1b3dece3842087cfa3bb</id>
<content type='text'>
This change allows us to support module auto loading using devname
support in userspace tools.  With this, /dev/vfio/vfio will always
be present and opening it will cause the vfio module to load.  This
should avoid needing to configure the system to statically load
vfio in order to get libvirt to correctly detect support for it.

Suggested-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Add O_CLOEXEC flag to vfio device fd</title>
<updated>2013-08-22T16:33:41Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2013-08-22T16:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d042fbdbb2df46c9185942a0c6fe280906ba70c'/>
<id>urn:sha1:5d042fbdbb2df46c9185942a0c6fe280906ba70c</id>
<content type='text'>
Add the default O_CLOEXEC flag for device file descriptors.  This is
generally considered a safer option as it allows the user a race free
option to decide whether file descriptors are inherited across exec,
with the default avoiding file descriptor leaks.

Reported-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: use get_unused_fd_flags(0) instead of get_unused_fd()</title>
<updated>2013-08-22T16:20:05Z</updated>
<author>
<name>Yann Droneaud</name>
</author>
<published>2013-08-22T16:20:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5d550703d2c2f0f9fc5fd4a249efa8984dc9353'/>
<id>urn:sha1:a5d550703d2c2f0f9fc5fd4a249efa8984dc9353</id>
<content type='text'>
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().

Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.

In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.

This patch replaces calls to get_unused_fd() with equivalent call to
get_unused_fd_flags(0) to preserve current behavor for existing code.

The hard coded flag value (0) should be reviewed on a per-subsystem basis,
and, if possible, set to O_CLOEXEC.

Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: add external user support</title>
<updated>2013-08-05T16:52:36Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2013-08-05T16:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cdd97821322352b94bb92f271b4466ad38a2468'/>
<id>urn:sha1:6cdd97821322352b94bb92f271b4466ad38a2468</id>
<content type='text'>
VFIO is designed to be used via ioctls on file descriptors
returned by VFIO.

However in some situations support for an external user is required.
The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to
use the existing VFIO groups for exclusive access in real/virtual mode
on a host to avoid passing map/unmap requests to the user space which
would made things pretty slow.

The protocol includes:

1. do normal VFIO init operation:
	- opening a new container;
	- attaching group(s) to it;
	- setting an IOMMU driver for a container.
When IOMMU is set for a container, all groups in it are
considered ready to use by an external user.

2. User space passes a group fd to an external user.
The external user calls vfio_group_get_external_user()
to verify that:
	- the group is initialized;
	- IOMMU is set for it.
If both checks passed, vfio_group_get_external_user()
increments the container user counter to prevent
the VFIO group from disposal before KVM exits.

3. The external user calls vfio_external_user_iommu_id()
to know an IOMMU ID. PPC64 KVM uses it to link logical bus
number (LIOBN) with IOMMU ID.

4. When the external KVM finishes, it calls
vfio_group_put_external_user() to release the VFIO group.
This call decrements the container user counter.
Everything gets released.

The "vfio: Limit group opens" patch is also required for the consistency.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Ignore sprurious notifies</title>
<updated>2013-07-24T22:36:40Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2013-06-10T22:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c64019302bbb0b445484d870e674ab34a19a18a1'/>
<id>urn:sha1:c64019302bbb0b445484d870e674ab34a19a18a1</id>
<content type='text'>
Remove debugging WARN_ON if we get a spurious notify for a group that
no longer exists.  No reports of anyone hitting this, but it would
likely be a race and not a bug if they did.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Don't overreact to DEL_DEVICE</title>
<updated>2013-07-24T22:36:00Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2013-06-10T22:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de9c7602ca25f52bbfeb52e7d85765fe70b92dce'/>
<id>urn:sha1:de9c7602ca25f52bbfeb52e7d85765fe70b92dce</id>
<content type='text'>
BUS_NOTIFY_DEL_DEVICE triggers IOMMU drivers to remove devices from
their iommu group, but there's really nothing we can do about it at
this point.  If the device is in use, then the vfio sub-driver will
block the device_del from completing until it's released.  If the
device is not in use or not owned by a vfio sub-driver, then we
really don't care that it's being removed.

The current code can be triggered just by unloading an sr-iov driver
(ex. igb) while the VFs are attached to vfio-pci because it makes an
incorrect assumption about the ordering of driver remove callbacks
vs the DEL_DEVICE notification.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'vfio-v3.11' of git://github.com/awilliam/linux-vfio</title>
<updated>2013-07-10T21:50:08Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-07-10T21:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15a49b9a90c86c6cb7f270a699d2ae7468862c28'/>
<id>urn:sha1:15a49b9a90c86c6cb7f270a699d2ae7468862c28</id>
<content type='text'>
Pull vfio updates from Alex Williamson:
 "Largely hugepage support for vfio/type1 iommu and surrounding cleanups
  and fixes"

* tag 'vfio-v3.11' of git://github.com/awilliam/linux-vfio:
  vfio/type1: Fix leak on error path
  vfio: Limit group opens
  vfio/type1: Fix missed frees and zero sized removes
  vfio: fix documentation
  vfio: Provide module option to disable vfio_iommu_type1 hugepage support
  vfio: hugepage support for vfio_iommu_type1
  vfio: Convert type1 iommu to use rbtree
</content>
</entry>
<entry>
<title>vfio: Limit group opens</title>
<updated>2013-06-25T22:06:54Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2013-06-25T22:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d6768c61b39a2184bc11bb0342e4f7f35642bcc'/>
<id>urn:sha1:6d6768c61b39a2184bc11bb0342e4f7f35642bcc</id>
<content type='text'>
vfio_group_fops_open attempts to limit concurrent sessions by
disallowing opens once group-&gt;container is set.  This really doesn't
do what we want and allow for inconsistent behavior, for instance a
group can be opened twice, then a container set giving the user two
file descriptors to the group.  But then it won't allow more to be
opened.  There's not much reason to have the group opened multiple
times since most access is through devices or the container, so
complete what the original code intended and only allow a single
instance.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>powerpc/vfio: Implement IOMMU driver for VFIO</title>
<updated>2013-06-20T06:55:14Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2013-05-21T03:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ffd229c02731a91d08ca21e76b503c5bbb5c095'/>
<id>urn:sha1:5ffd229c02731a91d08ca21e76b503c5bbb5c095</id>
<content type='text'>
VFIO implements platform independent stuff such as
a PCI driver, BAR access (via read/write on a file descriptor
or direct mapping when possible) and IRQ signaling.

The platform dependent part includes IOMMU initialization
and handling.  This implements an IOMMU driver for VFIO
which does mapping/unmapping pages for the guest IO and
provides information about DMA window (required by a POWER
guest).

Cc: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Acked-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>vfio: fix crash on rmmod</title>
<updated>2013-06-05T14:54:16Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2013-06-05T14:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a6aa279d3d17af73a029fa40654e92f4e75e8bb'/>
<id>urn:sha1:9a6aa279d3d17af73a029fa40654e92f4e75e8bb</id>
<content type='text'>
devtmpfs_delete_node() calls devnode() callback with mode==NULL but
vfio still tries to write there.

The patch fixes this.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
</feed>
