From: Anthony Krowiak <akrowiak@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>,
alex.williamson@redhat.com, pbonzini@redhat.com,
yi.l.liu@intel.com, jgg@nvidia.com
Cc: cohuck@redhat.com, farman@linux.ibm.com, pmorel@linux.ibm.com,
borntraeger@linux.ibm.com, frankja@linux.ibm.com,
imbrenda@linux.ibm.com, david@redhat.com, jjherne@linux.ibm.com,
pasic@linux.ibm.com, zhenyuw@linux.intel.com,
zhi.a.wang@intel.com, seanjc@google.com, kevin.tian@intel.com,
linux-s390@vger.kernel.org, kvm@vger.kernel.org,
intel-gvt-dev@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] vfio: no need to pass kvm pointer during device open
Date: Mon, 6 Feb 2023 09:30:52 -0500 [thread overview]
Message-ID: <1bd635d4-3868-6c6e-48a7-9888a1f4770f@linux.ibm.com> (raw)
In-Reply-To: <20230203215027.151988-3-mjrosato@linux.ibm.com>
Tested-by: Tony Krowiak <akrowiak@linux.ibm.com>
On 2/3/23 4:50 PM, Matthew Rosato wrote:
> Nothing uses this value during vfio_device_open anymore so it's safe
> to remove it.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> drivers/vfio/group.c | 2 +-
> drivers/vfio/vfio.h | 3 +--
> drivers/vfio/vfio_main.c | 7 +++----
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/vfio/group.c b/drivers/vfio/group.c
> index 98621ac082f0..0e9036e2b9c4 100644
> --- a/drivers/vfio/group.c
> +++ b/drivers/vfio/group.c
> @@ -187,7 +187,7 @@ static int vfio_device_group_open(struct vfio_device *device)
> if (device->open_count == 0)
> vfio_device_group_get_kvm_safe(device);
>
> - ret = vfio_device_open(device, device->group->iommufd, device->kvm);
> + ret = vfio_device_open(device, device->group->iommufd);
>
> if (device->open_count == 0)
> vfio_device_put_kvm(device);
> diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h
> index 24d6cd285945..4f39ab549a80 100644
> --- a/drivers/vfio/vfio.h
> +++ b/drivers/vfio/vfio.h
> @@ -18,8 +18,7 @@ struct vfio_container;
>
> void vfio_device_put_registration(struct vfio_device *device);
> bool vfio_device_try_get_registration(struct vfio_device *device);
> -int vfio_device_open(struct vfio_device *device,
> - struct iommufd_ctx *iommufd, struct kvm *kvm);
> +int vfio_device_open(struct vfio_device *device, struct iommufd_ctx *iommufd);
> void vfio_device_close(struct vfio_device *device,
> struct iommufd_ctx *iommufd);
>
> diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
> index 28c47cd6a6b5..3a597e799918 100644
> --- a/drivers/vfio/vfio_main.c
> +++ b/drivers/vfio/vfio_main.c
> @@ -397,7 +397,7 @@ static bool vfio_assert_device_open(struct vfio_device *device)
> }
>
> static int vfio_device_first_open(struct vfio_device *device,
> - struct iommufd_ctx *iommufd, struct kvm *kvm)
> + struct iommufd_ctx *iommufd)
> {
> int ret;
>
> @@ -444,8 +444,7 @@ static void vfio_device_last_close(struct vfio_device *device,
> module_put(device->dev->driver->owner);
> }
>
> -int vfio_device_open(struct vfio_device *device,
> - struct iommufd_ctx *iommufd, struct kvm *kvm)
> +int vfio_device_open(struct vfio_device *device, struct iommufd_ctx *iommufd)
> {
> int ret = 0;
>
> @@ -453,7 +452,7 @@ int vfio_device_open(struct vfio_device *device,
>
> device->open_count++;
> if (device->open_count == 1) {
> - ret = vfio_device_first_open(device, iommufd, kvm);
> + ret = vfio_device_first_open(device, iommufd);
> if (ret)
> device->open_count--;
> }
next prev parent reply other threads:[~2023-02-06 14:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 21:50 [PATCH v4 0/2] vfio: fix deadlock between group lock and kvm lock Matthew Rosato
2023-02-03 21:50 ` [PATCH v4 1/2] " Matthew Rosato
2023-02-04 6:21 ` Liu, Yi L
2023-02-04 14:25 ` Alex Williamson
2023-02-06 3:52 ` Tian, Kevin
2023-02-06 14:30 ` Anthony Krowiak
2023-02-03 21:50 ` [PATCH v4 2/2] vfio: no need to pass kvm pointer during device open Matthew Rosato
2023-02-04 6:23 ` Liu, Yi L
2023-02-06 3:53 ` Tian, Kevin
2023-02-06 14:30 ` Anthony Krowiak [this message]
2023-02-09 21:03 ` [PATCH v4 0/2] vfio: fix deadlock between group lock and kvm lock Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1bd635d4-3868-6c6e-48a7-9888a1f4770f@linux.ibm.com \
--to=akrowiak@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jgg@nvidia.com \
--cc=jjherne@linux.ibm.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pmorel@linux.ibm.com \
--cc=seanjc@google.com \
--cc=yi.l.liu@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox