All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Christoph Hellwig <hch@lst.de>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	Eric Auger <eric.auger@redhat.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>
Subject: RE: [PATCH v2 5/8] vfio: Change vfio_external_check_extension() to vfio_file_enforced_coherent()
Date: Fri, 22 Apr 2022 00:32:58 +0000	[thread overview]
Message-ID: <BN9PR11MB527616A86D88299C7E5F4B598CF79@BN9PR11MB5276.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BN9PR11MB5276CFD31471D4EE85DD705A8CF79@BN9PR11MB5276.namprd11.prod.outlook.com>

> From: Tian, Kevin
> Sent: Friday, April 22, 2022 8:13 AM
> 
> > From: Christoph Hellwig <hch@lst.de>
> > Sent: Thursday, April 21, 2022 1:41 PM
> >
> > I can see why a specific error might be nice for some cases and am
> > open to that, but as a simple transformation this already looks good:
> >
> 
> There is a slight semantics change together with patch7.
> 
> Before patch7 the container must be attached before calling
> KVM_DEV_VFIO_GROUP_ADD, otherwise vfio_group_get_external_user()
> will fail. In this case the result of cache coherency for a group is
> deterministic, either true or false.
> 
> After patch7 vfio_group_get_external_user() is not called. It's possible
> that KVM_DEV_VFIO_GROUP_ADD is called before a container is attached
> by the group. In this case cache coherency of the group cannot be
> determined at that point. I prefer to returning an error in this callback
> so KVM can still fail adding the group, instead of letting the inaccurate
> coherency info to bit the user in a much latter point...
> 

More accurately: s/cache coherency/enforced coherency/ in above.

  parent reply	other threads:[~2022-04-22  0:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 19:23 [PATCH v2 0/8] Remove vfio_group from the struct file facing VFIO API Jason Gunthorpe
2022-04-20 19:23 ` [PATCH v2 1/8] kvm/vfio: Move KVM_DEV_VFIO_GROUP_* ioctls into functions Jason Gunthorpe
2022-04-21 13:22   ` Cornelia Huck
2022-04-21 14:46   ` Yi Liu
2022-04-21 14:51   ` Jason Gunthorpe
2022-04-20 19:23 ` [PATCH v2 2/8] kvm/vfio: Store the struct file in the kvm_vfio_group Jason Gunthorpe
2022-04-21 14:46   ` Yi Liu
2022-04-20 19:23 ` [PATCH v2 3/8] vfio: Change vfio_external_user_iommu_id() to vfio_file_iommu_group() Jason Gunthorpe
2022-04-20 23:38   ` Tian, Kevin
2022-04-21  5:39   ` Christoph Hellwig
2022-04-21 14:57   ` Yi Liu
2022-04-22 17:05     ` Jason Gunthorpe
2022-04-23 12:53       ` Yi Liu
2022-04-20 19:23 ` [PATCH v2 4/8] vfio: Remove vfio_external_group_match_file() Jason Gunthorpe
2022-04-21  5:39   ` Christoph Hellwig
2022-04-21 14:50   ` Yi Liu
2022-04-20 19:23 ` [PATCH v2 5/8] vfio: Change vfio_external_check_extension() to vfio_file_enforced_coherent() Jason Gunthorpe
2022-04-20 23:49   ` Tian, Kevin
2022-04-21  5:41   ` Christoph Hellwig
2022-04-22  0:12     ` Tian, Kevin
     [not found]     ` <BN9PR11MB5276CFD31471D4EE85DD705A8CF79@BN9PR11MB5276.namprd11.prod.outlook.com>
2022-04-22  0:32       ` Tian, Kevin [this message]
2022-04-22 16:58         ` Jason Gunthorpe
2022-04-24  5:51           ` Tian, Kevin
2022-04-20 19:23 ` [PATCH v2 6/8] vfio: Change vfio_group_set_kvm() to vfio_file_set_kvm() Jason Gunthorpe
2022-04-20 23:51   ` Tian, Kevin
2022-04-21  5:41   ` Christoph Hellwig
2022-04-20 19:23 ` [PATCH v2 7/8] kvm/vfio: Remove vfio_group from kvm Jason Gunthorpe
2022-04-20 23:55   ` Tian, Kevin
2022-04-21  5:42   ` Christoph Hellwig
2022-04-20 19:23 ` [PATCH v2 8/8] vfio/pci: Use the struct file as the handle not the vfio_group Jason Gunthorpe
2022-04-21  0:05   ` Tian, Kevin
2022-04-21  5:43   ` Christoph Hellwig
2022-04-21 14:51 ` [PATCH v2 0/8] Remove vfio_group from the struct file facing VFIO API Yi Liu

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=BN9PR11MB527616A86D88299C7E5F4B598CF79@BN9PR11MB5276.namprd11.prod.outlook.com \
    --to=kevin.tian@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=hch@lst.de \
    --cc=jgg@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yi.l.liu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.