From: Alex Williamson <alex@shazbot.org>
To: zhaoguohan@kylinos.cn
Cc: "Michał Winiarski" <michal.winiarski@intel.com>,
kvm@vger.kernel.org, intel-xe@lists.freedesktop.org,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Yishai Hadas" <yishaih@nvidia.com>,
"Shameer Kolothum" <skolothumtho@nvidia.com>,
"Kevin Tian" <kevin.tian@intel.com>,
linux-kernel@vger.kernel.org, alex@shazbot.org
Subject: Re: [PATCH] vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done
Date: Fri, 24 Apr 2026 10:47:45 -0600 [thread overview]
Message-ID: <20260424104745.03cfcebe@shazbot.org> (raw)
In-Reply-To: <20260424091719.58800-1-zhaoguohan@kylinos.cn>
On Fri, 24 Apr 2026 17:17:19 +0800
zhaoguohan@kylinos.cn wrote:
> From: GuoHan Zhao <zhaoguohan@kylinos.cn>
>
> xe_vfio_pci_reset_done() sets deferred_reset and, when it manages to
> acquire state_mutex itself, hands the cleanup off to
> xe_vfio_pci_state_mutex_unlock().
>
> That helper already clears deferred_reset and runs xe_vfio_pci_reset()
> before dropping the mutex. Calling xe_vfio_pci_reset() again right
> afterwards repeats the reset handling unnecessarily.
>
> Fixes: 1b81ed612e12 ("vfio/xe: Reorganize the init to decouple migration from reset")
Change looks good to me, but the Fixes: attribution is wrong, this has
been present since the original code in 1f5556ec8b9e ("vfio/xe: Add
device specific vfio_pci driver variant for Intel graphics"). Thanks,
Alex
> Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
> ---
> drivers/vfio/pci/xe/main.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> index 4ecadbbfd86e..cbff5af385ef 100644
> --- a/drivers/vfio/pci/xe/main.c
> +++ b/drivers/vfio/pci/xe/main.c
> @@ -135,8 +135,6 @@ static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
> }
> spin_unlock(&xe_vdev->reset_lock);
> xe_vfio_pci_state_mutex_unlock(xe_vdev);
> -
> - xe_vfio_pci_reset(xe_vdev);
> }
>
> static const struct pci_error_handlers xe_vfio_pci_err_handlers = {
next prev parent reply other threads:[~2026-04-24 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 9:17 [PATCH] vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done zhaoguohan
2026-04-24 16:47 ` Alex Williamson [this message]
2026-04-27 1:21 ` [PATCH v2] " zhaoguohan
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=20260424104745.03cfcebe@shazbot.org \
--to=alex@shazbot.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.winiarski@intel.com \
--cc=skolothumtho@nvidia.com \
--cc=yishaih@nvidia.com \
--cc=zhaoguohan@kylinos.cn \
/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