From: Brett Creeley <bcreeley@amd.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
Brett Creeley <brett.creeley@amd.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"yishaih@nvidia.com" <yishaih@nvidia.com>,
"kevin.tian@intel.com" <kevin.tian@intel.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "shannon.nelson@amd.com" <shannon.nelson@amd.com>
Subject: Re: [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets
Date: Wed, 28 Feb 2024 10:16:16 -0800 [thread overview]
Message-ID: <d2e16738-377f-44dd-ae00-5c0c2c2da35a@amd.com> (raw)
In-Reply-To: <ead300c6e249429f92a4ce124fc0fd56@huawei.com>
On 2/28/2024 1:05 AM, Shameerali Kolothum Thodi wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
>> -----Original Message-----
>> From: Brett Creeley <brett.creeley@amd.com>
>> Sent: Wednesday, February 28, 2024 12:32 AM
>> To: jgg@ziepe.ca; yishaih@nvidia.com; Shameerali Kolothum Thodi
>> <shameerali.kolothum.thodi@huawei.com>; kevin.tian@intel.com;
>> alex.williamson@redhat.com; kvm@vger.kernel.org; linux-
>> kernel@vger.kernel.org
>> Cc: shannon.nelson@amd.com; brett.creeley@amd.com
>> Subject: [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets
>>
>> This small series contains a fix and readability improvements for
>> resets.
>>
>> v2:
>> - Split single patch into 2 patches
>> - Improve commit messages
>
> Just a query on the reset_done handler and the deferred_reset()
> logic in this driver. From a quick look, it doesn't look like you have
> a condition where a copy_to/from_user() is under state_mutex. So
> do you think we can get rid of the deferred_reset logic from this
> driver? Please see the discussion here,
> https://lore.kernel.org/kvm/20240220132459.GM13330@nvidia.com/
>
> For HiSilicon, we do have the lock taken for PRE_COPY, but that needs fixing
> and then can get rid of the deferred_reset. I will sent out a patch for
> that soon.
>
> Thanks,
> Shameer
Hi Shameer,
You are probably right that we can get rid of this logic, but the
current 2 patch series is very simple and I would prefer to keep it that
way. If you plan to make changes to the HiSilicon driver in the near
future, then I can use that as a reference in enhancing the pds-vfio-pci
driver.
Thanks,
Brett
>
>>
>> v1:
>> https://lore.kernel.org/kvm/20240126183225.19193-1-
>> brett.creeley@amd.com/
>>
>> Brett Creeley (2):
>> vfio/pds: Always clear the save/restore FDs on reset
>> vfio/pds: Refactor/simplify reset logic
>>
>> drivers/vfio/pci/pds/pci_drv.c | 2 +-
>> drivers/vfio/pci/pds/vfio_dev.c | 14 +++++++-------
>> drivers/vfio/pci/pds/vfio_dev.h | 7 ++++++-
>> 3 files changed, 14 insertions(+), 9 deletions(-)
>>
>> --
>> 2.17.1
>
next prev parent reply other threads:[~2024-02-28 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 0:32 [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets Brett Creeley
2024-02-28 0:32 ` [PATCH v2 vfio 1/2] vfio/pds: Always clear the save/restore FDs on reset Brett Creeley
2024-02-28 4:55 ` Tian, Kevin
2024-02-28 0:32 ` [PATCH v2 vfio 2/2] vfio/pds: Refactor/simplify reset logic Brett Creeley
2024-02-28 4:55 ` Tian, Kevin
2024-02-28 9:05 ` [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets Shameerali Kolothum Thodi
2024-02-28 18:16 ` Brett Creeley [this message]
2024-03-01 23:09 ` 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=d2e16738-377f-44dd-ae00-5c0c2c2da35a@amd.com \
--to=bcreeley@amd.com \
--cc=alex.williamson@redhat.com \
--cc=brett.creeley@amd.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shannon.nelson@amd.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