<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/vfio, branch v5.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v5.10</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2020-11-03T18:07:40Z</updated>
<entry>
<title>vfio/pci: Bypass IGD init in case of -ENODEV</title>
<updated>2020-11-03T18:07:40Z</updated>
<author>
<name>Fred Gao</name>
<email>fred.gao@intel.com</email>
</author>
<published>2020-11-02T18:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e4eccb853664de7bcf9518fb658f35e748bf1f68'/>
<id>urn:sha1:e4eccb853664de7bcf9518fb658f35e748bf1f68</id>
<content type='text'>
Bypass the IGD initialization when -ENODEV returns,
that should be the case if opregion is not available for IGD
or within discrete graphics device's option ROM,
or host/lpc bridge is not found.

Then use of -ENODEV here means no special device resources found
which needs special care for VFIO, but we still allow other normal
device resource access.

Cc: Zhenyu Wang &lt;zhenyuw@linux.intel.com&gt;
Cc: Xiong Zhang &lt;xiong.y.zhang@intel.com&gt;
Cc: Hang Yuan &lt;hang.yuan@linux.intel.com&gt;
Cc: Stuart Summers &lt;stuart.summers@intel.com&gt;
Signed-off-by: Fred Gao &lt;fred.gao@intel.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: platform: fix reference leak in vfio_platform_open</title>
<updated>2020-11-03T18:07:40Z</updated>
<author>
<name>Zhang Qilong</name>
<email>zhangqilong3@huawei.com</email>
</author>
<published>2020-10-31T03:03:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=bb742ad01961a3b9d1f9d19375487b879668b6b2'/>
<id>urn:sha1:bb742ad01961a3b9d1f9d19375487b879668b6b2</id>
<content type='text'>
pm_runtime_get_sync() will increment pm usage counter even it
failed. Forgetting to call pm_runtime_put will result in
reference leak in vfio_platform_open, so we should fix it.

Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Acked-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/pci: Implement ioeventfd thread handler for contended memory lock</title>
<updated>2020-11-03T18:07:40Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2020-11-02T22:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=38565c93c8a1306dc5f245572a545fbea908ac41'/>
<id>urn:sha1:38565c93c8a1306dc5f245572a545fbea908ac41</id>
<content type='text'>
The ioeventfd is called under spinlock with interrupts disabled,
therefore if the memory lock is contended defer code that might
sleep to a thread context.

Fixes: bc93b9ae0151 ("vfio-pci: Avoid recursive read-lock usage")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=209253#c1
Reported-by: Ian Pilcher &lt;arequipeno@gmail.com&gt;
Tested-by: Ian Pilcher &lt;arequipeno@gmail.com&gt;
Tested-by: Justin Gatzen &lt;justin.gatzen@gmail.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/fsl-mc: Make vfio_fsl_mc_irqs_allocate static</title>
<updated>2020-11-03T18:07:40Z</updated>
<author>
<name>Diana Craciun</name>
<email>diana.craciun@oss.nxp.com</email>
</author>
<published>2020-10-26T16:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8e91cb3812121aca8369d6c4e717ddd072280d0f'/>
<id>urn:sha1:8e91cb3812121aca8369d6c4e717ddd072280d0f</id>
<content type='text'>
Fixed compiler warning:
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous
prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
       ^
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static'
if the function is not intended to be used outside of this translation unit
int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Diana Craciun &lt;diana.craciun@oss.nxp.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/fsl-mc: prevent underflow in vfio_fsl_mc_mmap()</title>
<updated>2020-11-03T18:07:19Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-10-23T11:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=69848cd6f0c1fb4f82ab255b730343a215ded013'/>
<id>urn:sha1:69848cd6f0c1fb4f82ab255b730343a215ded013</id>
<content type='text'>
My static analsysis tool complains that the "index" can be negative.
There are some checks in do_mmap() which try to prevent underflows but
I don't know if they are sufficient for this situation.  Either way,
making "index" unsigned is harmless so let's do it just to be safe.

Fixes: 67247289688d ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Diana Craciun &lt;diana.craciun@oss.nxp.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/fsl-mc: return -EFAULT if copy_to_user() fails</title>
<updated>2020-11-02T22:00:06Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-10-23T11:34:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=09699e56dee946a16767021af97411ed6f4b3e6b'/>
<id>urn:sha1:09699e56dee946a16767021af97411ed6f4b3e6b</id>
<content type='text'>
The copy_to_user() function returns the number of bytes remaining to be
copied, but this code should return -EFAULT.

Fixes: df747bcd5b21 ("vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Diana Craciun &lt;diana.craciun@oss.nxp.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/type1: Use the new helper to find vfio_group</title>
<updated>2020-11-02T21:58:29Z</updated>
<author>
<name>Zenghui Yu</name>
<email>yuzenghui@huawei.com</email>
</author>
<published>2020-10-22T12:24:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=572f64c71e0fe30089699b22ce0ca3d4bf452ce9'/>
<id>urn:sha1:572f64c71e0fe30089699b22ce0ca3d4bf452ce9</id>
<content type='text'>
When attaching a new group to the container, let's use the new helper
vfio_iommu_find_iommu_group() to check if it's already attached. There
is no functional change.

Also take this chance to add a missing blank line.

Signed-off-by: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'vfio-v5.10-rc1' of git://github.com/awilliam/linux-vfio</title>
<updated>2020-10-22T20:00:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-10-22T20:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fc996db970a33c74d3db3ee63532b15187258027'/>
<id>urn:sha1:fc996db970a33c74d3db3ee63532b15187258027</id>
<content type='text'>
Pull VFIO updates from Alex Williamson:

 - New fsl-mc vfio bus driver supporting userspace drivers of objects
   within NXP's DPAA2 architecture (Diana Craciun)

 - Support for exposing zPCI information on s390 (Matthew Rosato)

 - Fixes for "detached" VFs on s390 (Matthew Rosato)

 - Fixes for pin-pages and dma-rw accesses (Yan Zhao)

 - Cleanups and optimize vconfig regen (Zenghui Yu)

 - Fix duplicate irq-bypass token registration (Alex Williamson)

* tag 'vfio-v5.10-rc1' of git://github.com/awilliam/linux-vfio: (30 commits)
  vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages
  vfio/pci: Clear token on bypass registration failure
  vfio/fsl-mc: fix the return of the uninitialized variable ret
  vfio/fsl-mc: Fix the dead code in vfio_fsl_mc_set_irq_trigger
  vfio/fsl-mc: Fixed vfio-fsl-mc driver compilation on 32 bit
  MAINTAINERS: Add entry for s390 vfio-pci
  vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO
  vfio/fsl-mc: Add support for device reset
  vfio/fsl-mc: Add read/write support for fsl-mc devices
  vfio/fsl-mc: trigger an interrupt via eventfd
  vfio/fsl-mc: Add irq infrastructure for fsl-mc devices
  vfio/fsl-mc: Added lock support in preparation for interrupt handling
  vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions
  vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call
  vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl
  vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind
  vfio: Introduce capability definitions for VFIO_DEVICE_GET_INFO
  s390/pci: track whether util_str is valid in the zpci_dev
  s390/pci: stash version in the zpci_dev
  vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices
  ...
</content>
</entry>
<entry>
<title>vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages</title>
<updated>2020-10-20T16:12:17Z</updated>
<author>
<name>Xiaoyang Xu</name>
<email>xuxiaoyang2@huawei.com</email>
</author>
<published>2020-10-16T09:35:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2e6cfd496f5b57034cf2aec738799571b5a52124'/>
<id>urn:sha1:2e6cfd496f5b57034cf2aec738799571b5a52124</id>
<content type='text'>
pfn is not added to pfn_list when vfio_add_to_pfn_list fails.
vfio_unpin_page_external will exit directly without calling
vfio_iova_put_vfio_pfn.  This will lead to a memory leak.

Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices")
Signed-off-by: Xiaoyang Xu &lt;xuxiaoyang2@huawei.com&gt;
[aw: simplified logic, add Fixes]
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Clear token on bypass registration failure</title>
<updated>2020-10-19T13:13:55Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2020-10-19T13:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=852b1beecb6ff9326f7ca4bc0fe69ae860ebdb9e'/>
<id>urn:sha1:852b1beecb6ff9326f7ca4bc0fe69ae860ebdb9e</id>
<content type='text'>
The eventfd context is used as our irqbypass token, therefore if an
eventfd is re-used, our token is the same.  The irqbypass code will
return an -EBUSY in this case, but we'll still attempt to unregister
the producer, where if that duplicate token still exists, results in
removing the wrong object.  Clear the token of failed producers so
that they harmlessly fall out when unregistered.

Fixes: 6d7425f109d2 ("vfio: Register/unregister irq_bypass_producer")
Reported-by: guomin chen &lt;guomin_chen@sina.com&gt;
Tested-by: guomin chen &lt;guomin_chen@sina.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
</feed>
