kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Yi Liu <yi.l.liu@intel.com>
Cc: Ankit Agrawal <ankita@nvidia.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	Kevin Tian <kevin.tian@intel.com>,
	kvm@vger.kernel.org, Longfang Liu <liulongfang@huawei.com>,
	qat-linux@intel.com, virtualization@lists.linux.dev,
	Xin Zeng <xin.zeng@intel.com>, Yishai Hadas <yishaih@nvidia.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	patches@lists.linux.dev,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	Terrence Xu <terrence.xu@intel.com>,
	Yanting Jiang <yanting.jiang@intel.com>,
	Zhenzhong Duan <zhenzhong.duan@intel.com>
Subject: Re: [PATCH v2] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD
Date: Mon, 14 Jul 2025 11:29:04 -0300	[thread overview]
Message-ID: <20250714142904.GA2059966@nvidia.com> (raw)
In-Reply-To: <a8484641-34d9-40bf-af8a-e472afdab0cc@intel.com>

On Mon, Jul 14, 2025 at 09:12:30PM +0800, Yi Liu wrote:
> On 2025/7/10 23:30, Jason Gunthorpe wrote:
> > This was missed during the initial implementation. The VFIO PCI encodes
> > the vf_token inside the device name when opening the device from the group
> > FD, something like:
> > 
> >    "0000:04:10.0 vf_token=bd8d9d2b-5a5f-4f5a-a211-f591514ba1f3"
> > 
> > This is used to control access to a VF unless there is co-ordination with
> > the owner of the PF.
> > 
> > Since we no longer have a device name, pass the token directly through
> > VFIO_DEVICE_BIND_IOMMUFD using an optional field indicated by
> > VFIO_DEVICE_BIND_TOKEN.
> 
> two nits though I think the code is clear enough :)
> 
> s/Since we no longer have a device name/Since we no longer have a device
> name in the device cdev path/
> 
> s/VFIO_DEVICE_BIND_TOKEN/VFIO_DEVICE_BIND_FLAG_TOKEN/

Alex, can you fix this when applying the v3 version?

Jason

  reply	other threads:[~2025-07-14 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10 15:30 [PATCH v2] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD Jason Gunthorpe
2025-07-11  3:15 ` Tian, Kevin
2025-07-11 12:01 ` Shameerali Kolothum Thodi
2025-07-11 22:45   ` Jason Gunthorpe
2025-07-14 13:12 ` Yi Liu
2025-07-14 14:29   ` Jason Gunthorpe [this message]
2025-07-14 15:12     ` Alex Williamson
2025-07-14 16:08       ` Jason Gunthorpe

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=20250714142904.GA2059966@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=ankita@nvidia.com \
    --cc=brett.creeley@amd.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=nicolinc@nvidia.com \
    --cc=patches@lists.linux.dev \
    --cc=qat-linux@intel.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=terrence.xu@intel.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xin.zeng@intel.com \
    --cc=yanting.jiang@intel.com \
    --cc=yi.l.liu@intel.com \
    --cc=yishaih@nvidia.com \
    --cc=zhenzhong.duan@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;
as well as URLs for NNTP newsgroup(s).