For some reason the vfio_mdev shim mdev_driver has its own module and
kconfig. As the next patch requires access to it from mdev.ko merge the
two modules together and remove VFIO_MDEV_DEVICE.
A later patch deletes this driver entirely.
Signed-off-by: Jason Gunthorpe
---
Documentation/s390/vfio
ove indirections to call bus_register()/bus_unregister()
- Reflow long doc lines
v1: https://lore.kernel.org/r/0-v1-d88406ed308e+418-vfio3_...@nvidia.com
Jason Gunthorpe (10):
driver core: Do not continue searching for drivers if deferred probe
is used
driver core: Pull required checks into dri
On Fri, Jun 11, 2021 at 02:40:41PM +0200, Cornelia Huck wrote:
> On Mon, Jun 07 2021, Jason Gunthorpe wrote:
>
> > For some reason the vfio_mdev shim mdev_driver has its own module and
> > kconfig. As the next patch requires access to it from mdev.ko merge the
> > two mod
On Mon, Jun 14, 2021 at 08:04:03PM +0530, Kirti Wankhede wrote:
> Jason,
>
> I couldn't find patch 1,2,4 and 5 of these series. Can you please keep
> k...@vger.kernel.org cc for all patches?
It is an error, sorry
> Also it will be helpful if you can add version prefix, eg. 'v3' for this
> series
On Mon, Jun 14, 2021 at 05:08:40PM +0200, Christoph Hellwig wrote:
> @@ -679,8 +666,6 @@ static int really_probe(struct device *dev, struct
> device_driver *drv)
> dev->pm_domain->dismiss(dev);
> pm_runtime_reinit(dev);
> dev_pm_set_driver_flags(dev, 0);
> - if (prob
On Tue, Jun 15, 2021 at 07:50:21AM +0200, Christoph Hellwig wrote:
> On Tue, Jun 15, 2021 at 07:21:57AM +0200, Greg Kroah-Hartman wrote:
> > This looks much better as far as the driver core changes go, thank you
> > for doing this.
> >
> > I'm guessing there will be at least one more revision of t
On Tue, Jun 15, 2021 at 01:35:49PM -0600, Alex Williamson wrote:
> On Tue, 15 Jun 2021 15:35:09 +0200
> Christoph Hellwig wrote:
>
> > This is my alternative take on this series from Jason:
> >
> > https://lore.kernel.org/dri-devel/87czsszi9i@redhat.com/T/
> >
> > The mdev/vfio parts are ex
On Tue, Jun 15, 2021 at 04:11:29PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 15, 2021 at 03:35:16PM +0200, Christoph Hellwig wrote:
> > From: Jason Gunthorpe
> >
> > This allows a mdev driver to opt out of using vfio_mdev.c, instead the
> > driver will provide
On Fri, Oct 01, 2021 at 02:52:41PM -0300, Jason Gunthorpe wrote:
> This addresses Cornelia's remark on the earlier patch that ccw has a
> confusing lifecycle. While it doesn't seem like the original attempt was
> functionally wrong, the result can be made better with a lo
On Mon, Sep 13, 2021 at 01:40:34PM -0400, Eric Farman wrote:
> On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote:
> > This addresses Cornelia's remark on the earlier patch that ccw has a
> > confusing lifecycle. While it doesn't seem like the original attempt
>
On Mon, Sep 13, 2021 at 04:31:54PM -0400, Eric Farman wrote:
> > I rebased it and fixed it up here:
> >
> > https://github.com/jgunthorpe/linux/tree/vfio_ccw
> >
> > Can you try again?
>
> That does address the crash, but then why is it processing a BROKEN
> event? Seems problematic.
The stuff
On Tue, Sep 14, 2021 at 05:50:25PM +0200, Cornelia Huck wrote:
> On Fri, Sep 10 2021, Christoph Hellwig wrote:
>
> > On Thu, Sep 09, 2021 at 04:38:41PM -0300, Jason Gunthorpe wrote:
> >> +
> >> + private = kzalloc(sizeof(*private), GFP_KERNEL |
On Fri, Sep 17, 2021 at 01:59:16PM +0200, Cornelia Huck wrote:
> > ret = cio_cancel_halt_clear(sch, &iretry);
> > -
> > if (ret == -EIO) {
> > pr_err("vfio_ccw: could not quiesce subchannel
> > 0.%x.%04x!\n",
> >sch->schid.ssi
On Mon, Sep 20, 2021 at 02:19:18PM +0200, Cornelia Huck wrote:
> On Thu, Sep 09 2021, Jason Gunthorpe wrote:
>
> > The subchannel should be left in a quiescent state unless the VFIO device
> > FD is opened. When the FD is opened bring the chanel to active and allow
> > th
On Mon, Sep 20, 2021 at 08:02:29PM +0200, Cornelia Huck wrote:
> On Thu, Sep 09 2021, Jason Gunthorpe wrote:
>
> > Many of the mdev drivers use a simple counter for keeping track of the
> > available instances. Move this code to the core code and store the counter
> > in
On Fri, Sep 24, 2021 at 04:37:43PM -0400, Eric Farman wrote:
> > @@ -528,6 +534,7 @@ static int __init vfio_ccw_sch_init(void)
> >
> > static void __exit vfio_ccw_sch_exit(void)
> > {
> > + mdev_unregister_driver(&vfio_ccw_mdev_driver);
>
> Wouldn't it be better to mirror the unwind-init cas
On Fri, Sep 24, 2021 at 04:45:02PM -0400, Eric Farman wrote:
> On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote:
> > Having a mdev pointer floating about in addition to a struct
> > vfio_device
> > is confusing. It is only used for three things:
> >
> >
On Tue, Sep 28, 2021 at 02:35:06PM +, Wang, Zhi A wrote:
> Yes. I was thinking of the possibility of putting off some work later so
> that we don't need to make a lot of changes. GVT-g needs to take a
> snapshot of GPU registers as the initial virtual states for other vGPUs,
> which require
On Wed, Sep 29, 2021 at 06:27:16PM +, Wang, Zhi A wrote:
> On 9/28/21 3:05 PM, Jason Gunthorpe wrote:
> > On Tue, Sep 28, 2021 at 02:35:06PM +, Wang, Zhi A wrote:
> >
> >> Yes. I was thinking of the possibility of putting off some work later so
> >> th
On Fri, Oct 01, 2021 at 02:04:04PM +0300, Jani Nikula wrote:
> On Fri, 27 Aug 2021, Jason Gunthorpe wrote:
> > On Fri, Aug 27, 2021 at 03:12:36PM +, kernel test robot wrote:
> >> tree: https://github.com/awilliam/linux-vfio.git next
> >> head: ea870730d83fc
mdev_device should only be used in functions assigned to ops callbacks,
interior functions should use the struct vfio_ccw_private instead of
repeatedly trying to get it from the mdev.
Reviewed-by: Christoph Hellwig
Reviewed-by: Cornelia Huck
Reviewed-by: Eric Farman
Signed-off-by: Jason
sch_shutdown() now simply tries to close and
leaves the device BROKEN (though arguably the bus should take care to
quiet down the subchannel HW during shutdown, not the drivers)
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 74 ++-
drivers/s390/cio/vf
mdev_device point at the private, and container_of is used to get it
back from the vfio_device.
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 21 --
drivers/s390/cio/vfio_ccw_ops.c | 107 +---
drivers/s390/cio/vfio_ccw_private.h | 5
Since the ccw_io_region was split out of the private the allocation no
longer needs the GFP_DMA. Remove it.
Reported-by: Christoph Hellwig
Fixes: c98e16b2fa12 ("s390/cio: Convert ccw_io_region to pointer")
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 2
Makes the code easier to understand what is memory lifecycle and what is
other stuff.
Reviewed-by: Eric Farman
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 137 ++--
1 file changed, 78 insertions(+), 59 deletions(-)
diff --git a/drivers/s390
cw_private is allocated/freed during probe/remove of the
mdev like any other vfio_device struct.
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 67 ++---
drivers/s390/cio/vfio_ccw_ops.c | 40 +++--
drivers/s390/cio/vfio_ccw_priv
Every driver just emits a static string, simply feed it through the ops
and provide a standard sysfs show function.
Signed-off-by: Jason Gunthorpe
---
.../driver-api/vfio-mediated-device.rst | 4 ++-
drivers/gpu/drm/i915/gvt/kvmgt.c | 9 +--
drivers/s390/cio
vfio_ccw will need it.
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/vfio.c | 3 ++-
include/linux/vfio.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 08b27b64f0f935..44adf112e3b5dd 100644
--- a/drivers/vfio/vfio.c
+++ b
it.
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_drv.c | 6 ++--
drivers/s390/cio/vfio_ccw_fsm.c | 48 +
drivers/s390/cio/vfio_ccw_ops.c | 16 --
drivers/s390/cio/vfio_ccw_private.h | 2 --
include/linux/mdev.h|
dev_device_create()
v2: https://lore.kernel.org/r/0-v2-7d3a384024cf+2060-ccw_mdev_...@nvidia.com
- Clean up the lifecycle in ccw with 7 new patches
- Rebase
v1: https://lore.kernel.org/all/7-v2-7667f42c9bad+935-vfio3_...@nvidia.com
Jason Gunthorpe (10):
vfio/ccw: Remove unneeded GFP_DMA
vfio/ccw: Use fu
for their mtypes which is fixed at registration time. The core
provides a standard sysfs attribute to return the available_instances.
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
.../driver-api/vfio-mediated-device.rst | 4 +-
drivers/s390/cio/vfio_ccw_drv.c
On Tue, Jul 20, 2021 at 07:12:26PM +0300, Diana Craciun OSS wrote:
> On 7/15/2021 3:20 AM, Jason Gunthorpe wrote:
> > FSL uses the internal reflck to implement the open_device() functionality,
> > conversion to the core code is straightforward.
> >
> > The decision on
On Tue, Jul 20, 2021 at 07:23:35PM +0300, Diana Craciun OSS wrote:
> I have tested the changes and everything works as expected.
Great, thanks, I added a Tested-by for you
Jason
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.fr
ot;)
Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()")
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4
samples/vfio-mdev/mdpy.c | 4
2 files changed, 8 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c
these really want the new open/close_device() semantics just change
the function over.
Reviewed-by: Zhenyu Wang
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
drivers/gpu/drm/i915/gvt/kvmgt.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm
ned-off-by: Jason Gunthorpe
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 153 --
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 6 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 -
3 files changed, 27 insertions(+), 139 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_f
Compared to mbochs_remove() two cases are missing from the
vfio_register_group_dev() unwind. Add them in.
Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()")
Reported-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 7 +
ucturing corrects a call to pci_dev_driver() without holding the
device_lock() and removes a hard wiring to &vfio_pci_driver.
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 110 ++--
drivers/vfio/vfio.c | 10
include/linux/vfio.h
Platform simply wants to run some code when the device is first
opened/last closed. Use the core framework and locking for this. Aside
from removing a bit of code this narrows the locking scope from a global
lock.
Signed-off-by: Yishai Hadas
Signed-off-by: Jason Gunthorpe
---
drivers/vfio
ev open_device if there is no op
- Fix style for else {}
- Spelling fix for singleton
- Acquire cur_mem under lock
- Always use error unwind flow for vfio_pci_check_all_devices_bound()
v1: https://lore.kernel.org/r/0-v1-eaf3ccbba33c+1add0-vfio_reflck_...@nvidia.com
Jason Gunthorpe (12):
vfi
Nothing uses this anymore, delete it.
Signed-off-by: Yishai Hadas
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/mdev/vfio_mdev.c | 22 --
drivers/vfio/vfio.c | 14 +-
include/linux/mdev.h | 7 ---
include/linux/vfio.h | 4
.
Since these really want the new open/close_device() semantics just change
the functions over.
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_ops.c | 8
drivers/s390/crypto/vfio_ap_ops.c | 8
2 files changed, 8 insertions(+), 8
o group
vfio_devices into sets.
This implementation uses xarray instead of searching through the driver
core structures, which simplifies the somewhat tricky locking in this
area.
Following patches convert all the drivers.
Signed-off-by: Yishai Hadas
Signed-off-by: Jason Gunthorpe
---
drive
-by: Max Gurtovoy
Signed-off-by: Jason Gunthorpe
---
Documentation/driver-api/vfio.rst| 4 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc.c| 7 ++---
drivers/vfio/mdev/vfio_mdev.c| 13 +++---
drivers/vfio/pci/vfio_pci.c | 6 +++--
drivers/vfio
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index fb81d11029e8a5..39002b07e692ac 100644
--- a/samples/vfio-mdev/mbochs.c
+++ b/samples/vfio-mdev
The core code no longer requires these ops to be defined, so delete these
empty functions and leave the op as NULL. mtty's functions only log a
pointless message, delete that entirely.
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
samples/vfio
ed by what devices
pci_reset_bus() touches, which is either the entire bus or only the slot.
Rely on the core code to do everything reflck was doing and delete reflck
entirely.
Signed-off-by: Yishai Hadas
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c
_driver().
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 201 +++-
1 file changed, 84 insertions(+), 117 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index fbc20f6d2dd412..d751d38f2175b6 100644
--- a/drivers/
On Tue, Jul 20, 2021 at 04:01:27PM -0600, Alex Williamson wrote:
> On Tue, 20 Jul 2021 14:42:48 -0300
> Jason Gunthorpe wrote:
>
> > Compared to mbochs_remove() two cases are missing from the
> > vfio_register_group_dev() unwind. Add them in.
> >
> > Fixes: 68
On Sun, Jul 18, 2021 at 02:09:12PM +0300, Leon Romanovsky wrote:
> @@ -386,12 +414,14 @@ static struct scatterlist *get_next_sg(struct sg_table
> *table,
> return ERR_PTR(-ENOMEM);
> sg_init_table(new_sg, alloc_size);
> if (cur) {
> + if (total_nents)
> +
On Thu, Jul 22, 2021 at 02:07:51PM +0100, Christoph Hellwig wrote:
> On Thu, Jul 22, 2021 at 10:00:40AM -0300, Jason Gunthorpe wrote:
> > this is better:
> >
> >struct sg_append_table state;
> >
> >sg_append_init(&state, sgt, gfp_mask)
On Fri, Jul 23, 2021 at 09:44:35AM +0200, Christoph Hellwig wrote:
> On Tue, Jul 20, 2021 at 02:42:52PM -0300, Jason Gunthorpe wrote:
> > .write = vfio_fsl_mc_write,
> > @@ -625,13 +526,15 @@ static int vfio_fsl_mc_probe(struct fsl_mc_device
> > *mc_dev)
> >
On Fri, Jul 23, 2021 at 09:45:21AM +0200, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig
>
> On Tue, Jul 20, 2021 at 02:42:53PM -0300, Jason Gunthorpe wrote:
> > Platform simply wants to run some code when the device is first
> > opene
On Fri, Jul 23, 2021 at 09:47:49AM +0200, Christoph Hellwig wrote:
> > @@ -2020,12 +2004,17 @@ static int vfio_pci_probe(struct pci_dev *pdev,
> > const struct pci_device_id *id)
> > INIT_LIST_HEAD(&vdev->vma_list);
> > init_rwsem(&vdev->memory_lock);
> >
> > - ret = vfio_pci_reflck_at
On Fri, Jul 23, 2021 at 02:29:03PM +0200, Christoph Hellwig wrote:
> On Fri, Jul 23, 2021 at 09:22:27AM -0300, Jason Gunthorpe wrote:
> > > But do we even need the else part? Assingning &mc_dev->dev is
> > > equivalent to the default per-device set anyway, isn
On Fri, Jul 23, 2021 at 10:05:43AM +0200, Christoph Hellwig wrote:
> On Tue, Jul 20, 2021 at 02:42:55PM -0300, Jason Gunthorpe wrote:
> > Keep track of all the vfio_devices that have been added to the device set
> > and use this list in vfio_pci_try_bus_reset() instead of
On Fri, Jul 23, 2021 at 10:12:08AM +0200, Christoph Hellwig wrote:
> On Tue, Jul 20, 2021 at 02:42:56PM -0300, Jason Gunthorpe wrote:
> > Like vfio_pci_try_bus_reset() this code wants to reset all of the devices
> > in the "reset group" which is the same mem
On Fri, Jul 23, 2021 at 09:39:14AM +0200, Christoph Hellwig wrote:
> This looks unessecarily complicated. We can just try to load first
> and then store it under the same lock, e.g.:
Yes indeed, I went with this:
int vfio_assign_device_set(struct vfio_device *device, void *set_id)
{
uns
On Thu, Jul 22, 2021 at 01:26:36PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > https://github.com/intel/gvt-linux/blob/topic/gvt-xengt/drivers/gpu/drm/i915/gvt/xengt.c
>
> > But it's hard for some customers to contribute their own "hypervisor"
> > module to the upstream Linux kernel. I am thinking
On Wed, Jul 28, 2021 at 01:38:58PM +, Wang, Zhi A wrote:
> I guess those APIs you were talking about are KVM-only. For other
> hypervisors, e.g. Xen, ARCN cannot use the APIs you mentioned. Not
> sure if you have already noticed that VFIO is KVM-only right now.
There is very little hard conne
- Spelling fix for singleton
- Acquire cur_mem under lock
- Always use error unwind flow for vfio_pci_check_all_devices_bound()
v1: https://lore.kernel.org/r/0-v1-eaf3ccbba33c+1add0-vfio_reflck_...@nvidia.com
Jason Gunthorpe (12):
vfio/samples: Remove module get/put
vfio/mbochs: Fix mis
ed by what devices
pci_reset_bus() touches, which is either the entire bus or only the slot.
Rely on the core code to do everything reflck was doing and delete reflck
entirely.
Signed-off-by: Yishai Hadas
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/
o group
vfio_devices into sets.
This implementation uses xarray instead of searching through the driver
core structures, which simplifies the somewhat tricky locking in this
area.
Following patches convert all the drivers.
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia Huck
Signed-off-by: Jaso
ned-off-by: Jason Gunthorpe
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 154 --
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 6 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 -
3 files changed, 28 insertions(+), 139 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_f
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index 5ac65894fcd38c..6974626ec1c5d0 100644
--- a/samples/vfio-mdev/mbochs.c
Platform simply wants to run some code when the device is first
opened/last closed. Use the core framework and locking for this. Aside
from removing a bit of code this narrows the locking scope from a global
lock.
Signed-off-by: Jason Gunthorpe
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia
ot;)
Reported-by: Cornelia Huck
Co-developed-by: Alex Williamson
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index e
-by: Max Gurtovoy
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
Documentation/driver-api/vfio.rst| 4 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc.c| 7 ++---
drivers/vfio/mdev/vfio_mdev.c| 13 +++---
drivers/vfio
.
Since these really want the new open/close_device() semantics just change
the functions over.
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_ops.c | 8
drivers/s390/crypto/vfio_ap_ops.c | 8
2 files changed, 8 insertions(+), 8
ucturing corrects a call to pci_dev_driver() without holding the
device_lock() and removes a hard wiring to &vfio_pci_driver.
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 148 +++-
1 file changed, 62 insertions(+), 86 deletions(-)
diff --g
The core code no longer requires these ops to be defined, so delete these
empty functions and leave the op as NULL. mtty's functions only log a
pointless message, delete that entirely.
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by:
these really want the new open/close_device() semantics just change
the function over.
Reviewed-by: Zhenyu Wang
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/gpu/drm/i915/gvt/kvmgt.c | 8
1 file changed, 4 insertions(+), 4 deletions
ot;)
Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()")
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4
samples/vfio-mdev/mdpy.c | 4
2 files changed, 8 deletions(-)
diff --git
Nothing uses this anymore, delete it.
Signed-off-by: Yishai Hadas
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/mdev/vfio_mdev.c | 22 --
drivers/vfio/vfio.c | 14 +-
include/linux/mdev.h | 7 ---
include
river().
Reviewed-off-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 215 +++-
1 file changed, 91 insertions(+), 124 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index a1ae9a83a38621..72
On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote:
> Acked-by: Zhenyu Wang
>
> Thanks a lot for this effort!
Great, do we have a submission plan for this? how much does it clash
with my open_device/etc patch? ie does the whole thing have to go
through the vfio tree?
Thanks,
Jason
On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote:
> On Wed, 28 Jul 2021 21:49:18 -0300
> Jason Gunthorpe wrote:
>
> > Keep track of all the vfio_devices that have been added to the device set
> > and use this list in vfio_pci_try_bus_reset() instead of trying
On Tue, Aug 03, 2021 at 10:52:25AM -0600, Alex Williamson wrote:
> On Tue, 3 Aug 2021 13:41:52 -0300
> Jason Gunthorpe wrote:
> > On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote:
> > > I think the vfio_pci_find_reset_target() function needs to be re-worked
On Thu, Aug 05, 2021 at 11:33:11AM -0600, Alex Williamson wrote:
> > +static int vfio_pci_is_device_in_set(struct pci_dev *pdev, void *data)
> > +{
> > + struct vfio_device_set *dev_set = data;
> > + struct vfio_device *cur;
> > +
> > + lockdep_assert_held(&dev_set->lock);
> > +
> > + list_
o group
vfio_devices into sets.
This implementation uses xarray instead of searching through the driver
core structures, which simplifies the somewhat tricky locking in this
area.
Following patches convert all the drivers.
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph
ot;)
Reported-by: Cornelia Huck
Co-developed-by: Alex Williamson
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-
-by: Max Gurtovoy
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
Documentation/driver-api/vfio.rst| 4 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc.c| 7 ++---
drivers/vfio/mdev/vfio_mdev.c| 13 +++---
drivers/vfio
ing it inside vfio_pci_dev_set_try_reset().
This restructuring corrects a call to pci_dev_driver() without holding the
device_lock() and removes a hard wiring to &vfio_pci_driver.
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 182 +---
1 file chang
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index 7b2e12fe70827c..c313ab4d1f4e4e 100644
--- a/samples/vfio-mdev/mbochs.c
mbochs
- Return 0 from mdev open_device if there is no op
- Fix style for else {}
- Spelling fix for singleton
- Acquire cur_mem under lock
- Always use error unwind flow for vfio_pci_check_all_devices_bound()
v1: https://lore.kernel.org/r/0-v1-eaf3ccbba33c+1add0-vfio_reflck_...@nvidia.com
Jason G
these really want the new open/close_device() semantics just change
the function over.
Reviewed-by: Zhenyu Wang
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/gpu/drm/i915/gvt/kvmgt.c | 8
1 file changed, 4 insertions(+), 4 deletions
ned-off-by: Jason Gunthorpe
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 156 --
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 6 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 -
3 files changed, 29 insertions(+), 140 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_f
i_dev_driver().
Reviewed-off-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/vfio_pci.c | 213 +++-
1 file changed, 89 insertions(+), 124 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 0147f04c91b2
Hellwig
Signed-off-by: Jason Gunthorpe
Signed-off-by: Yishai Hadas
---
drivers/vfio/platform/vfio_platform_common.c | 95 ---
drivers/vfio/platform/vfio_platform_private.h | 1 -
2 files changed, 40 insertions(+), 56 deletions(-)
diff --git a/drivers/vfio/platform
ed by what devices
pci_reset_bus() touches, which is either the entire bus or only the slot.
Rely on the core code to do everything reflck was doing and delete reflck
entirely.
Signed-off-by: Yishai Hadas
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/pci/
.
Since these really want the new open/close_device() semantics just change
the functions over.
Reviewed-by: Cornelia Huck
Signed-off-by: Jason Gunthorpe
---
drivers/s390/cio/vfio_ccw_ops.c | 8
drivers/s390/crypto/vfio_ap_ops.c | 8
2 files changed, 8 insertions(+), 8
ot;)
Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()")
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
samples/vfio-mdev/mbochs.c | 4
samples/vfio-mdev/mdpy.c | 4
2 files changed, 8 deletions(-)
diff --git
The core code no longer requires these ops to be defined, so delete these
empty functions and leave the op as NULL. mtty's functions only log a
pointless message, delete that entirely.
Signed-off-by: Yishai Hadas
Reviewed-by: Cornelia Huck
Reviewed-by: Christoph Hellwig
Signed-off-by:
Nothing uses this anymore, delete it.
Signed-off-by: Yishai Hadas
Reviewed-by: Christoph Hellwig
Signed-off-by: Jason Gunthorpe
---
drivers/vfio/mdev/vfio_mdev.c | 22 --
drivers/vfio/vfio.c | 14 +-
include/linux/mdev.h | 7 ---
include
On Thu, Jul 29, 2021 at 12:39:12PM +0300, Leon Romanovsky wrote:
> +/**
> + * __sg_free_table - Free a previously mapped sg table
> + * @table: The sg table header to use
> + * @max_ents:The maximum number of entries per single scatterlist
> + * @total_ents: The total number of entr
On Fri, Aug 20, 2021 at 12:54:25PM -0300, Jason Gunthorpe wrote:
> On Thu, Jul 29, 2021 at 12:39:12PM +0300, Leon Romanovsky wrote:
>
> > +/**
> > + * __sg_free_table - Free a previously mapped sg table
> > + * @table: The sg table header to use
> > + * @max_en
On Thu, Jul 29, 2021 at 12:39:10PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky
>
> Changelog:
> v3:
> * Rewrote to new API suggestion
> * Split for more patches
> v2: https://lore.kernel.org/lkml/cover.1626605893.git.leo...@nvidia.com
> * Changed implementation of first patch, based
On Mon, Aug 23, 2021 at 02:09:37PM +0300, Maor Gottlieb wrote:
>
> On 8/20/2021 6:54 PM, Jason Gunthorpe wrote:
> > On Thu, Jul 29, 2021 at 12:39:12PM +0300, Leon Romanovsky wrote:
> >
> > > +/**
> > > + * __sg_free_table - Free a previously mapped sg table
On Mon, Aug 23, 2021 at 04:45:45PM +0300, Maor Gottlieb wrote:
>
> On 8/23/2021 3:45 PM, Jason Gunthorpe wrote:
> > On Mon, Aug 23, 2021 at 02:09:37PM +0300, Maor Gottlieb wrote:
> > > On 8/20/2021 6:54 PM, Jason Gunthorpe wrote:
> > > > On Thu, Jul 29, 2021 at
On Tue, Aug 24, 2021 at 05:25:30PM +0300, Maor Gottlieb wrote:
> @@ -514,11 +531,13 @@ struct scatterlist
> *sg_alloc_append_table_from_pages(struct sg_table *sgt,
> offset = 0;
> cur_page = j;
> }
> - sgt->nents += added_nents;
> + sgt_append->sgt.nents +
1 - 100 of 496 matches
Mail list logo