From: Jason Gunthorpe <jgg@nvidia.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
liulongfang <liulongfang@huawei.com>,
Yishai Hadas <yishaih@nvidia.com>,
Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH v2] vfio/pci: Remove vfio_device_get_from_dev()
Date: Wed, 4 May 2022 15:47:31 -0300 [thread overview]
Message-ID: <20220504184731.GA98226@nvidia.com> (raw)
In-Reply-To: <ea998a76810f4f96943de33b01252ae9@huawei.com>
On Wed, May 04, 2022 at 03:15:35PM +0000, Shameerali Kolothum Thodi wrote:
> > Further, since the drvdata holds a positive refcount on the vfio_device
> > any access of the drvdata, under the driver_lock, from a driver callback
>
> device_lock() ? (v1 discussion says it's a typo).
Yes, I fixed it
> > needs no further protection or refcounting.
> >
> > Thus the remark in the vfio_device_get_from_dev() comment does not apply
> > here, VFIO PCI drivers all call vfio_unregister_group_dev() from their
> > remove callbacks under the driver lock and cannot race with the remaining
> > callers.
>
> May be we can also mention the removal of vfio_group_get_from_dev() as well
> in the commit.
It is in the subject :)
Thanks,
Jason
prev parent reply other threads:[~2022-05-04 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 23:42 [PATCH v2] vfio/pci: Remove vfio_device_get_from_dev() Jason Gunthorpe
2022-05-04 14:13 ` Kirti Wankhede
2022-05-04 15:15 ` Shameerali Kolothum Thodi
2022-05-04 18:47 ` Jason Gunthorpe [this message]
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=20220504184731.GA98226@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=yishaih@nvidia.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