<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vfio, branch v4.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=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-08-08T22:16:23Z</updated>
<entry>
<title>vfio/pci: Fix NULL pointer oops in error interrupt setup handling</title>
<updated>2016-08-08T22:16:23Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2016-08-08T22:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8952a707556e04374d7b2fdb3a079d63ddf6f2f'/>
<id>urn:sha1:c8952a707556e04374d7b2fdb3a079d63ddf6f2f</id>
<content type='text'>
There are multiple cases in vfio_pci_set_ctx_trigger_single() where
we assume we can safely read from our data pointer without actually
checking whether the user has passed any data via the count field.
VFIO_IRQ_SET_DATA_NONE in particular is entirely broken since we
attempt to pull an int32_t file descriptor out before even checking
the data type.  The other data types assume the data pointer contains
one element of their type as well.

In part this is good news because we were previously restricted from
doing much sanitization of parameters because it was missed in the
past and we didn't want to break existing users.  Clearly DATA_NONE
is completely broken, so it must not have any users and we can fix
it up completely.  For DATA_BOOL and DATA_EVENTFD, we'll just
protect ourselves, returning error when count is zero since we
previously would have oopsed.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Reported-by: Chris Thompson &lt;the_cartographer@hotmail.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: check reset call return code during release</title>
<updated>2016-07-19T16:54:45Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0991bbdbf5b85bd14a26e783f087b0f2913c93b1'/>
<id>urn:sha1:0991bbdbf5b85bd14a26e783f087b0f2913c93b1</id>
<content type='text'>
Release call is ignoring the return code from reset call and can
potentially continue even though reset call failed.

If reset_required module parameter is set, this patch is going
to validate the return code and will cause stack dump with
WARN_ON and warn the user of failure.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: check reset call return code during open</title>
<updated>2016-07-19T16:54:45Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e99442323f33470677deeed35619313b05837f35'/>
<id>urn:sha1:e99442323f33470677deeed35619313b05837f35</id>
<content type='text'>
Open call is ignoring the return code from reset call and can
potentially continue even though reset call failed.

If reset_required module parameter is set, this patch is going
to validate the return code and will abort open if reset fails.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio, platform: make reset driver a requirement by default</title>
<updated>2016-07-19T16:26:46Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5add544d677d36386c3559cf5db1485b59c4d7d'/>
<id>urn:sha1:b5add544d677d36386c3559cf5db1485b59c4d7d</id>
<content type='text'>
The code was allowing platform devices to be used without a supporting
VFIO reset driver. The hardware can be left in some inconsistent state
after a guest machine abort.

The reset driver will put the hardware back to safe state and disable
interrupts before returning the control back to the host machine.

Adding a new reset_required kernel module option to platform VFIO drivers.
The default value is true for the DT and ACPI based drivers.
The reset requirement value for AMBA drivers is set to false and is
unchangeable to maintain the existing functionality.

New requirements are:
1. A reset function needs to be implemented by the corresponding driver
via DT/ACPI.
2. The reset function needs to be discovered via DT/ACPI.

The probe of the driver will fail if any of the above conditions are
not satisfied.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: call _RST method when using ACPI</title>
<updated>2016-07-19T16:26:44Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d30daa33ec1d035acfdfc7662d7a5360592af44c'/>
<id>urn:sha1:d30daa33ec1d035acfdfc7662d7a5360592af44c</id>
<content type='text'>
The device tree code checks for the presence of a reset driver and calls
the of_reset function pointer by looking up the reset driver as a module.

ACPI defines _RST method to perform device level reset. After the _RST
method is executed, the OS can resume using the device. _RST method is
expected to stop DMA transfers and IRQs.

This patch introduces two functions as vfio_platform_acpi_has_reset and
vfio_platform_acpi_call_reset. The has reset method is used to declare
reset capability via the ioctl flag VFIO_DEVICE_FLAGS_RESET. The call
reset function is used to execute the _RST ACPI method.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: add extra debug info argument to call reset</title>
<updated>2016-07-19T16:26:43Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5afec27474fdc52e9d80b359ce10fab59c85d131'/>
<id>urn:sha1:5afec27474fdc52e9d80b359ce10fab59c85d131</id>
<content type='text'>
Getting ready to bring out extra debug information to the caller
so that more verbose information can be printed when an error is
observed.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: add support for ACPI probe</title>
<updated>2016-07-19T16:26:41Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a12a9368e192d56175e49d69360d861025a0f6f7'/>
<id>urn:sha1:a12a9368e192d56175e49d69360d861025a0f6f7</id>
<content type='text'>
The code is using the compatible DT string to associate a reset driver
with the actual device itself. The compatible string does not exist on
ACPI based systems. HID is the unique identifier for a device driver
instead.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: determine reset capability</title>
<updated>2016-07-19T16:26:40Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc5542fb115a9576493831160e31d355b58541d7'/>
<id>urn:sha1:dc5542fb115a9576493831160e31d355b58541d7</id>
<content type='text'>
Creating a new function to determine if this driver supports reset
function or not. This is an attempt to abstract device tree calls
from the rest of the code.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: move reset call to a common function</title>
<updated>2016-07-19T16:26:38Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f084aa749537b818d5b234448e960a59836b39e3'/>
<id>urn:sha1:f084aa749537b818d5b234448e960a59836b39e3</id>
<content type='text'>
The reset call sequence seems to replicate itself multiple times
across the file. Grouping them together for maintenance reasons.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: rename reset function</title>
<updated>2016-07-19T16:26:36Z</updated>
<author>
<name>Sinan Kaya</name>
<email>okaya@codeaurora.org</email>
</author>
<published>2016-07-19T13:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7aef80cf3187b76373359ed539e382eb34ebfb5d'/>
<id>urn:sha1:7aef80cf3187b76373359ed539e382eb34ebfb5d</id>
<content type='text'>
Renaming the reset function to of_reset as it is only used
by the device tree based platforms.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Reviewed-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Reviewed-by: Baptiste Reynal &lt;b.reynal@virtualopensystems.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
</feed>
