linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm-intel-fixes tree with the vfio-fixes tree
@ 2017-01-02 23:40 Stephen Rothwell
  2017-01-03  9:17 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2017-01-02 23:40 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Williamson
  Cc: linux-next, linux-kernel, Jike Song, Zhenyu Wang

Hi all,

Today's linux-next merge of the drm-intel-fixes tree got a conflict in:

  drivers/gpu/drm/i915/gvt/kvmgt.c

between commit:

  99e3123e3d72 ("vfio-mdev: Make mdev_device private and abstract interfaces")

from the vfio-fixes tree and commit:

  364fb6b789ff ("drm/i915/gvt/kvmgt: prevent double-release of vgpu")

from the drm-intel-fixes tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/gvt/kvmgt.c
index f8021a01df63,934963970288..000000000000
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@@ -497,10 -500,19 +500,19 @@@ static int intel_vgpu_open(struct mdev_
  		goto undo_iommu;
  	}
  
- 	return kvmgt_guest_init(mdev);
+ 	ret = kvmgt_guest_init(mdev);
+ 	if (ret)
+ 		goto undo_group;
+ 
+ 	atomic_set(&vgpu->vdev.released, 0);
+ 	return ret;
+ 
+ undo_group:
+ 	vfio_unregister_notifier(&mdev->dev, VFIO_GROUP_NOTIFY,
+ 					&vgpu->vdev.group_notifier);
  
  undo_iommu:
 -	vfio_unregister_notifier(&mdev->dev, VFIO_IOMMU_NOTIFY,
 +	vfio_unregister_notifier(mdev_dev(mdev), VFIO_IOMMU_NOTIFY,
  					&vgpu->vdev.iommu_notifier);
  out:
  	return ret;
@@@ -513,10 -526,16 +526,16 @@@ static void __intel_vgpu_release(struc
  	if (!handle_valid(vgpu->handle))
  		return;
  
- 	vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_IOMMU_NOTIFY,
+ 	if (atomic_cmpxchg(&vgpu->vdev.released, 0, 1))
+ 		return;
+ 
 -	ret = vfio_unregister_notifier(&vgpu->vdev.mdev->dev, VFIO_IOMMU_NOTIFY,
++	ret = vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_IOMMU_NOTIFY,
  					&vgpu->vdev.iommu_notifier);
- 	vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_GROUP_NOTIFY,
+ 	WARN(ret, "vfio_unregister_notifier for iommu failed: %d\n", ret);
+ 
 -	ret = vfio_unregister_notifier(&vgpu->vdev.mdev->dev, VFIO_GROUP_NOTIFY,
++	ret = vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_GROUP_NOTIFY,
  					&vgpu->vdev.group_notifier);
+ 	WARN(ret, "vfio_unregister_notifier for group failed: %d\n", ret);
  
  	info = (struct kvmgt_guest_info *)vgpu->handle;
  	kvmgt_guest_exit(info);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the drm-intel-fixes tree with the vfio-fixes tree
  2017-01-02 23:40 linux-next: manual merge of the drm-intel-fixes tree with the vfio-fixes tree Stephen Rothwell
@ 2017-01-03  9:17 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2017-01-03  9:17 UTC (permalink / raw)
  To: Stephen Rothwell, Daniel Vetter, Intel Graphics, DRI,
	Alex Williamson, Zhenyu Wang, Zhi Wang, igvt-g-dev
  Cc: Jike Song, linux-next, linux-kernel

On Tue, 03 Jan 2017, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> Today's linux-next merge of the drm-intel-fixes tree got a conflict in:
>
>   drivers/gpu/drm/i915/gvt/kvmgt.c
>
> between commit:
>
>   99e3123e3d72 ("vfio-mdev: Make mdev_device private and abstract interfaces")
>
> from the vfio-fixes tree and commit:
>
>   364fb6b789ff ("drm/i915/gvt/kvmgt: prevent double-release of vgpu")
>
> from the drm-intel-fixes tree.

Hi Stephen, while GVT-g is part of i915, it has its own mailing list and
maintainers, listed under "INTEL GVT-g DRIVERS (Intel GPU
Virtualization)" in MAINTAINERS. Please include them wrt linux-next
conflicts in drivers/gpu/drm/i915/gvt/. Added now.

Thanks,
Jani.


> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/i915/gvt/kvmgt.c
> index f8021a01df63,934963970288..000000000000
> --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
> +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
> @@@ -497,10 -500,19 +500,19 @@@ static int intel_vgpu_open(struct mdev_
> 		goto undo_iommu;
> 	}
> 
> - 	return kvmgt_guest_init(mdev);
> + 	ret = kvmgt_guest_init(mdev);
> + 	if (ret)
> + 		goto undo_group;
> + 
> + 	atomic_set(&vgpu->vdev.released, 0);
> + 	return ret;
> + 
> + undo_group:
> + 	vfio_unregister_notifier(&mdev->dev, VFIO_GROUP_NOTIFY,
> + 					&vgpu->vdev.group_notifier);
> 
>   undo_iommu:
>  -	vfio_unregister_notifier(&mdev->dev, VFIO_IOMMU_NOTIFY,
>  +	vfio_unregister_notifier(mdev_dev(mdev), VFIO_IOMMU_NOTIFY,
> 					&vgpu->vdev.iommu_notifier);
>   out:
> 	return ret;
> @@@ -513,10 -526,16 +526,16 @@@ static void __intel_vgpu_release(struc
> 	if (!handle_valid(vgpu->handle))
> 		return;
> 
> - 	vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_IOMMU_NOTIFY,
> + 	if (atomic_cmpxchg(&vgpu->vdev.released, 0, 1))
> + 		return;
> + 
>  -	ret = vfio_unregister_notifier(&vgpu->vdev.mdev->dev, VFIO_IOMMU_NOTIFY,
> ++	ret = vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_IOMMU_NOTIFY,
> 					&vgpu->vdev.iommu_notifier);
> - 	vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_GROUP_NOTIFY,
> + 	WARN(ret, "vfio_unregister_notifier for iommu failed: %d\n", ret);
> + 
>  -	ret = vfio_unregister_notifier(&vgpu->vdev.mdev->dev, VFIO_GROUP_NOTIFY,
> ++	ret = vfio_unregister_notifier(mdev_dev(vgpu->vdev.mdev), VFIO_GROUP_NOTIFY,
> 					&vgpu->vdev.group_notifier);
> + 	WARN(ret, "vfio_unregister_notifier for group failed: %d\n", ret);
> 
> 	info = (struct kvmgt_guest_info *)vgpu->handle;
> 	kvmgt_guest_exit(info);
> 
-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-03  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 23:40 linux-next: manual merge of the drm-intel-fixes tree with the vfio-fixes tree Stephen Rothwell
2017-01-03  9:17 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).