Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b779157d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'vfio-v4.2-rc1' of git://github.com/awilliam/linux-vfio

Pull VFIO updates from Alex Williamson:

 - fix race with device reference versus driver release (Alex Williamson)

 - add reset hooks and Calxeda xgmac reset for vfio-platform (Eric Auger)

 - enable vfio-platform for ARM64 (Eric Auger)

 - tag Baptiste Reynal as vfio-platform sub-maintainer (Alex Williamson)

* tag 'vfio-v4.2-rc1' of git://github.com/awilliam/linux-vfio:
  MAINTAINERS: Add vfio-platform sub-maintainer
  VFIO: platform: enable ARM64 build
  VFIO: platform: Calxeda xgmac reset module
  VFIO: platform: populate the reset function on probe
  VFIO: platform: add reset callback
  VFIO: platform: add reset struct and lookup table
  vfio/pci: Fix racy vfio_device_get_from_dev() call
parents 4a10a917 a714ea5f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -10786,6 +10786,12 @@ F: drivers/vfio/
F:	include/linux/vfio.h
F:	include/uapi/linux/vfio.h

VFIO PLATFORM DRIVER
M:	Baptiste Reynal <b.reynal@virtualopensystems.com>
L:	kvm@vger.kernel.org
S:	Maintained
F:	drivers/vfio/platform/

VIDEOBUF2 FRAMEWORK
M:	Pawel Osciak <pawel@osciak.com>
M:	Marek Szyprowski <m.szyprowski@samsung.com>
+9 −7
Original line number Diff line number Diff line
@@ -1056,19 +1056,21 @@ struct vfio_devices {
static int vfio_pci_get_devs(struct pci_dev *pdev, void *data)
{
	struct vfio_devices *devs = data;
	struct pci_driver *pci_drv = ACCESS_ONCE(pdev->driver);

	if (pci_drv != &vfio_pci_driver)
		return -EBUSY;
	struct vfio_device *device;

	if (devs->cur_index == devs->max_index)
		return -ENOSPC;

	devs->devices[devs->cur_index] = vfio_device_get_from_dev(&pdev->dev);
	if (!devs->devices[devs->cur_index])
	device = vfio_device_get_from_dev(&pdev->dev);
	if (!device)
		return -EINVAL;

	devs->cur_index++;
	if (pci_dev_driver(pdev) != &vfio_pci_driver) {
		vfio_device_put(device);
		return -EBUSY;
	}

	devs->devices[devs->cur_index++] = device;
	return 0;
}

+3 −1
Original line number Diff line number Diff line
config VFIO_PLATFORM
	tristate "VFIO support for platform devices"
	depends on VFIO && EVENTFD && ARM
	depends on VFIO && EVENTFD && (ARM || ARM64)
	select VFIO_VIRQFD
	help
	  Support for platform devices with VFIO. This is required to make
@@ -18,3 +18,5 @@ config VFIO_AMBA
	  framework.

	  If you don't know what to do here, say N.

source "drivers/vfio/platform/reset/Kconfig"
+2 −0
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
vfio-platform-y := vfio_platform.o vfio_platform_common.o vfio_platform_irq.o

obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
obj-$(CONFIG_VFIO_PLATFORM) += reset/

vfio-amba-y := vfio_amba.o

obj-$(CONFIG_VFIO_AMBA) += vfio-amba.o
obj-$(CONFIG_VFIO_AMBA) += reset/
+7 −0
Original line number Diff line number Diff line
config VFIO_PLATFORM_CALXEDAXGMAC_RESET
	tristate "VFIO support for calxeda xgmac reset"
	depends on VFIO_PLATFORM
	help
	  Enables the VFIO platform driver to handle reset for Calxeda xgmac

	  If you don't know what to do here, say N.
Loading