<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vfio, branch v3.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-01-15T17:45:26Z</updated>
<entry>
<title>vfio-pci: Fix buffer overfill</title>
<updated>2013-01-15T17:45:26Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2013-01-15T17:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec1287e511320a2c9a02640b7ac02d5d79f56f08'/>
<id>urn:sha1:ec1287e511320a2c9a02640b7ac02d5d79f56f08</id>
<content type='text'>
A read from a range hidden from the user (ex. MSI-X vector table)
attempts to fill the user buffer up to the end of the excluded range
instead of up to the requested count.  Fix it.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>vfio-pci: Enable device before attempting reset</title>
<updated>2012-12-07T20:43:51Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-12-07T20:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a92c5091a42c565ede818fdf204c4f60004d0d8'/>
<id>urn:sha1:9a92c5091a42c565ede818fdf204c4f60004d0d8</id>
<content type='text'>
Devices making use of PM reset are getting incorrectly identified as
not supporting reset because pci_pm_reset() fails unless the device is
in D0 power state.  When first attached to vfio_pci devices are
typically in an unknown power state.  We can fix this by explicitly
setting the power state or simply calling pci_enable_device() before
attempting a pci_reset_function().  We need to enable the device
anyway, so move this up in our vfio_pci_enable() function, which also
simplifies the error path a bit.

Note that pci_disable_device() does not explicitly set the power
state, so there's no need to re-order vfio_pci_disable().

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>VFIO: fix out of order labels for error recovery in vfio_pci_init()</title>
<updated>2012-12-07T20:43:51Z</updated>
<author>
<name>Jiang Liu</name>
<email>liuj97@gmail.com</email>
</author>
<published>2012-12-07T20:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05bf3aac930752408bf38a3f070061fc5f1b9c73'/>
<id>urn:sha1:05bf3aac930752408bf38a3f070061fc5f1b9c73</id>
<content type='text'>
The two labels for error recovery in function vfio_pci_init() is out of
order, so fix it.

Signed-off-by: Jiang Liu &lt;jiang.liu@huawei.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>VFIO: use ACCESS_ONCE() to guard access to dev-&gt;driver</title>
<updated>2012-12-07T20:43:50Z</updated>
<author>
<name>Jiang Liu</name>
<email>liuj97@gmail.com</email>
</author>
<published>2012-12-07T20:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de2b3eeafb555d7b623c9f34e399b39105ca527f'/>
<id>urn:sha1:de2b3eeafb555d7b623c9f34e399b39105ca527f</id>
<content type='text'>
Comments from dev_driver_string(),
/* dev-&gt;driver can change to NULL underneath us because of unbinding,
 * so be careful about accessing it.
 */

So use ACCESS_ONCE() to guard access to dev-&gt;driver field.

Signed-off-by: Jiang Liu &lt;jiang.liu@huawei.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>VFIO: unregister IOMMU notifier on error recovery path</title>
<updated>2012-12-07T20:43:50Z</updated>
<author>
<name>Jiang Liu</name>
<email>liuj97@gmail.com</email>
</author>
<published>2012-12-07T20:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9df7b25ab71cee770826d1e7983eb8b6715543d6'/>
<id>urn:sha1:9df7b25ab71cee770826d1e7983eb8b6715543d6</id>
<content type='text'>
On error recovery path in function vfio_create_group(), it should
unregister the IOMMU notifier for the new VFIO group. Otherwise it may
cause invalid memory access later when handling bus notifications.

Signed-off-by: Jiang Liu &lt;jiang.liu@huawei.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio-pci: Re-order device reset</title>
<updated>2012-12-07T20:43:50Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-12-07T20:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2007722a606bf9f195217f7afd2fbee4bc202c42'/>
<id>urn:sha1:2007722a606bf9f195217f7afd2fbee4bc202c42</id>
<content type='text'>
Move the device reset to the end of our disable path, the device
should already be stopped from pci_disable_device().  This also allows
us to manipulate the save/restore to avoid the save/reset/restore +
save/restore that we had before.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: simplify kmalloc+copy_from_user to memdup_user</title>
<updated>2012-12-07T20:43:49Z</updated>
<author>
<name>Fengguang Wu</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2012-12-07T20:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a1f7041ddd59ec3aceb042892f811cc76e05288'/>
<id>urn:sha1:3a1f7041ddd59ec3aceb042892f811cc76e05288</id>
<content type='text'>
Generated by: coccinelle/api/memdup_user.cocci

Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Fix PCI INTx disable consistency</title>
<updated>2012-10-10T15:10:32Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-10-10T15:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=899649b7d4ead76c19e39251ca886eebe3f811a8'/>
<id>urn:sha1:899649b7d4ead76c19e39251ca886eebe3f811a8</id>
<content type='text'>
The virq_disabled flag tracks the userspace view of INTx masking
across interrupt mode changes, but we're not consistently applying
this to the interrupt and masking handler notion of the device.
Currently if the user sets DisINTx while in MSI or MSIX mode, then
returns to INTx mode (ex. rebooting a qemu guest), the hardware has
DisINTx+, but the management of INTx thinks it's enabled, making it
impossible to actually clear DisINTx.  Fix this by updating the
handler state when INTx is re-enabled.

Cc: stable@vger.kernel.org
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Move PCI INTx eventfd setting earlier</title>
<updated>2012-10-10T15:10:32Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-10-10T15:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9dbdfd23b7638d054f3b0e70c64dfb9f297f2a9f'/>
<id>urn:sha1:9dbdfd23b7638d054f3b0e70c64dfb9f297f2a9f</id>
<content type='text'>
We need to be ready to recieve an interrupt as soon as we call
request_irq, so our eventfd context setting needs to be moved
earlier.  Without this, an interrupt from our device or one
sharing the interrupt line can pass a NULL into eventfd_signal
and oops.

Cc: stable@vger.kernel.org
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: Fix PCI mmap after b3b9c293</title>
<updated>2012-10-10T15:10:31Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-10-10T15:10:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34002f54d2bd8e8ac04f0da0847f71a8a06a5d38'/>
<id>urn:sha1:34002f54d2bd8e8ac04f0da0847f71a8a06a5d38</id>
<content type='text'>
Our mmap path mistakely relied on vma-&gt;vm_pgoff to get set in
remap_pfn_range.  After b3b9c293, that path only applies to
copy-on-write mappings.  Set it in our own code.

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