Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253858
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release |
| Date | 2015-10-22 16:20 +0200 |
| Message-ID | <qmoSL-4U2-23@gated-at.bofh.it> (permalink) |
| References | <qmkFs-6UJ-7@gated-at.bofh.it> <qmlia-7Vb-9@gated-at.bofh.it> <qmo6o-3GO-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday 22 October 2015 15:26:55 Eric Auger wrote: > >> @@ -181,6 +182,8 @@ static int vfio_platform_open(void *device_data) > >> if (ret) > >> goto err_irq; > >> > >> + vfio_platform_get_reset(vdev); > >> + > >> if (vdev->reset) > >> vdev->reset(vdev); > >> > > > > This needs some error handling to ensure that the open() fails > > if there is no reset handler. > > Is that really what we want? The code was meant to allow the use case > where the VFIO platform driver would be used without such reset module. > > I think the imperious need for a reset module depends on the device and > more importantly depends on the IOMMU mapping. With QEMU VFIO > integration this is needed because the whole VM memory is IOMMU mapped > but in a simpler user-space driver context, we might live without. > > Any thought? I would think we need a reset driver for any device that can start DMA, otherwise things can go wrong as soon as you attach it to a different domain while there is ongoing DMA. Maybe we could just allow devices to be attached without a reset handler, but then disallow DMA on them? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 6/6] vfio: platform: move get/put reset at open/release Eric Auger <eric.auger@linaro.org> - 2015-10-22 11:50 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Arnd Bergmann <arnd@arndb.de> - 2015-10-22 12:30 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Eric Auger <eric.auger@linaro.org> - 2015-10-22 13:50 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Arnd Bergmann <arnd@arndb.de> - 2015-10-22 14:10 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Eric Auger <eric.auger@linaro.org> - 2015-10-22 14:30 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Eric Auger <eric.auger@linaro.org> - 2015-10-22 15:30 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Arnd Bergmann <arnd@arndb.de> - 2015-10-22 16:20 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Eric Auger <eric.auger@linaro.org> - 2015-10-22 16:30 +0200
Re: [PATCH v2 6/6] vfio: platform: move get/put reset at open/release Alex Williamson <alex.williamson@redhat.com> - 2015-10-22 17:50 +0200
csiph-web