public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Cc: kvm@vger.kernel.org, alex.williamson@redhat.com,
	yishaih@nvidia.com, kevin.tian@intel.com, linuxarm@huawei.com,
	liulongfang@huawei.com, bcreeley@amd.com
Subject: Re: [PATCH] hisi_acc_vfio_pci: Remove the deferred_reset logic
Date: Tue, 5 Mar 2024 14:02:55 -0400	[thread overview]
Message-ID: <20240305180255.GK9225@ziepe.ca> (raw)
In-Reply-To: <20240229091152.56664-1-shameerali.kolothum.thodi@huawei.com>

On Thu, Feb 29, 2024 at 09:11:52AM +0000, Shameer Kolothum wrote:
> The deferred_reset logic was added to vfio migration drivers to prevent
> a circular locking dependency with respect to mm_lock and state mutex.
> This is mainly because of the copy_to/from_user() functions(which takes
> mm_lock) invoked under state mutex. But for HiSilicon driver, the only
> place where we now hold the state mutex for copy_to_user is during the
> PRE_COPY IOCTL. So for pre_copy, release the lock as soon as we have
> updated the data and perform copy_to_user without state mutex. By this,
> we can get rid of the deferred_reset logic.
> 
> Link: https://lore.kernel.org/kvm/20240220132459.GM13330@nvidia.com/
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> ---
>  .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c    | 48 +++++--------------
>  .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h    |  6 +--
>  2 files changed, 14 insertions(+), 40 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

  parent reply	other threads:[~2024-03-05 18:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29  9:11 [PATCH] hisi_acc_vfio_pci: Remove the deferred_reset logic Shameer Kolothum
2024-02-29 22:05 ` Brett Creeley
2024-03-04 20:27   ` Alex Williamson
2024-03-05  0:17     ` Brett Creeley
2024-03-01 17:21 ` Brett Creeley
2024-03-04  8:08 ` Tian, Kevin
2024-03-05 18:02 ` Jason Gunthorpe [this message]
2024-03-05 23:12 ` 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=20240305180255.GK9225@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=alex.williamson@redhat.com \
    --cc=bcreeley@amd.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --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