All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	"Tian, Kevin" <kevin.tian@intel.com>
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Cornelia Huck <cohuck@redhat.com>,
	"Raj, Ashok" <ashok.raj@intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>,
	"Zeng, Xin" <xin.zeng@intel.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v6 5/5] vfio/type1: Use mdev bus iommu_ops for IOMMU callbacks
Date: Thu, 12 Nov 2020 10:31:55 +0800	[thread overview]
Message-ID: <d171ae28-a99a-a47b-aeb1-3231391e8c82@linux.intel.com> (raw)
In-Reply-To: <5802fc4a-7dc0-eda7-4e7c-809bcec6bd90@linux.intel.com>

Hi Alex,

On 11/3/20 1:22 PM, Lu Baolu wrote:
> Hi Alex,
> 
> On 10/31/20 5:06 AM, Alex Williamson wrote:
>> On Fri, 30 Oct 2020 06:16:28 +0000
>> "Tian, Kevin" <kevin.tian@intel.com> wrote:
>>
>>>> From: Lu Baolu <baolu.lu@linux.intel.com>
>>>> Sent: Friday, October 30, 2020 12:58 PM
>>>>
>>>> With the IOMMU driver registering iommu_ops for the mdev_bus, the
>>>> IOMMU
>>>> operations on an mdev could be done in the same way as any normal 
>>>> device
>>>> (for example, PCI/PCIe). There's no need to distinguish an mdev from
>>>> others for iommu operations. Remove the unnecessary code.
>>>
>>> This is really a nice cleanup as the output of this change! :)
>>
>> It's easy to remove a bunch of code when the result is breaking
>> everyone else.  Please share with me how SR-IOV backed mdevs continue
>> to work on AMD platforms, or how they might work on ARM platforms, when
>> siov_iommu_ops (VT-d only) becomes the one and only provider of
>> iommu_ops on the mdev bus.  Hard NAK on this series.  Thanks,
> 
> I focused too much on a feature and forgot about university. I should
> apologize for this. Sorry about it!
> 
> Back to the original intention of this series. The aux domain was
> allocated in vfio/mdev, but it's also needed by the vDCM component of a
> device driver for mediated callbacks. Currently vfio/mdev or iommu core
> has no support for this.
> 
> We had a proposal when we first did aux-domain support. But was not
> discussed since there was no consumer at that time.
> 
> https://lore.kernel.org/linux-iommu/20181105073408.21815-7-baolu.lu@linux.intel.com/ 

Exposing iommu_domain outside of the vfio/iommu abstract seems not a
secure idea. I have posted a new proposal. Can you please help to
review?

https://lore.kernel.org/linux-iommu/20201112022407.2063896-1-baolu.lu@linux.intel.com/

Best regards.
baolu

> 
> 
> Does it look good to you? I can send patches of such solution for
> discussion if you think it's a right way.
> 
> Extending the iommu core for subdevice passthrough support sounds an
> interesting topic, but it will take much time before we reach a
> consensus. It sounds a good topic for the next year's LPC/MC :-).
> 
> Best regards,
> baolu

WARNING: multiple messages have this Message-ID (diff)
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	"Tian, Kevin" <kevin.tian@intel.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"Raj, Ashok" <ashok.raj@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Cornelia Huck <cohuck@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v6 5/5] vfio/type1: Use mdev bus iommu_ops for IOMMU callbacks
Date: Thu, 12 Nov 2020 10:31:55 +0800	[thread overview]
Message-ID: <d171ae28-a99a-a47b-aeb1-3231391e8c82@linux.intel.com> (raw)
In-Reply-To: <5802fc4a-7dc0-eda7-4e7c-809bcec6bd90@linux.intel.com>

Hi Alex,

On 11/3/20 1:22 PM, Lu Baolu wrote:
> Hi Alex,
> 
> On 10/31/20 5:06 AM, Alex Williamson wrote:
>> On Fri, 30 Oct 2020 06:16:28 +0000
>> "Tian, Kevin" <kevin.tian@intel.com> wrote:
>>
>>>> From: Lu Baolu <baolu.lu@linux.intel.com>
>>>> Sent: Friday, October 30, 2020 12:58 PM
>>>>
>>>> With the IOMMU driver registering iommu_ops for the mdev_bus, the
>>>> IOMMU
>>>> operations on an mdev could be done in the same way as any normal 
>>>> device
>>>> (for example, PCI/PCIe). There's no need to distinguish an mdev from
>>>> others for iommu operations. Remove the unnecessary code.
>>>
>>> This is really a nice cleanup as the output of this change! :)
>>
>> It's easy to remove a bunch of code when the result is breaking
>> everyone else.  Please share with me how SR-IOV backed mdevs continue
>> to work on AMD platforms, or how they might work on ARM platforms, when
>> siov_iommu_ops (VT-d only) becomes the one and only provider of
>> iommu_ops on the mdev bus.  Hard NAK on this series.  Thanks,
> 
> I focused too much on a feature and forgot about university. I should
> apologize for this. Sorry about it!
> 
> Back to the original intention of this series. The aux domain was
> allocated in vfio/mdev, but it's also needed by the vDCM component of a
> device driver for mediated callbacks. Currently vfio/mdev or iommu core
> has no support for this.
> 
> We had a proposal when we first did aux-domain support. But was not
> discussed since there was no consumer at that time.
> 
> https://lore.kernel.org/linux-iommu/20181105073408.21815-7-baolu.lu@linux.intel.com/ 

Exposing iommu_domain outside of the vfio/iommu abstract seems not a
secure idea. I have posted a new proposal. Can you please help to
review?

https://lore.kernel.org/linux-iommu/20201112022407.2063896-1-baolu.lu@linux.intel.com/

Best regards.
baolu

> 
> 
> Does it look good to you? I can send patches of such solution for
> discussion if you think it's a right way.
> 
> Extending the iommu core for subdevice passthrough support sounds an
> interesting topic, but it will take much time before we reach a
> consensus. It sounds a good topic for the next year's LPC/MC :-).
> 
> Best regards,
> baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-11-12  5:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  4:58 [PATCH v6 0/5] iommu aux-domain APIs extensions Lu Baolu
2020-10-30  4:58 ` Lu Baolu
2020-10-30  4:58 ` [PATCH v6 1/5] vfio/mdev: Register mdev bus earlier during boot Lu Baolu
2020-10-30  4:58   ` Lu Baolu
2020-10-30 17:02   ` Alex Williamson
2020-10-30 17:02     ` Alex Williamson
2020-10-30  4:58 ` [PATCH v6 2/5] iommu: Use bus iommu ops for aux related callback Lu Baolu
2020-10-30  4:58   ` Lu Baolu
2020-10-30  5:55   ` Tian, Kevin
2020-10-30  5:55     ` Tian, Kevin
2020-10-30 10:47     ` Jean-Philippe Brucker
2020-10-30 10:47       ` Jean-Philippe Brucker
2020-10-30  4:58 ` [PATCH v6 3/5] iommu/vt-d: Make some static functions global Lu Baolu
2020-10-30  4:58   ` Lu Baolu
2020-10-30  4:58 ` [PATCH v6 4/5] iommu/vt-d: Add iommu_ops support for subdevice bus Lu Baolu
2020-10-30  4:58   ` Lu Baolu
2020-10-30  6:13   ` Tian, Kevin
2020-10-30  6:13     ` Tian, Kevin
2020-10-30 20:56   ` Alex Williamson
2020-10-30 20:56     ` Alex Williamson
2020-10-30  4:58 ` [PATCH v6 5/5] vfio/type1: Use mdev bus iommu_ops for IOMMU callbacks Lu Baolu
2020-10-30  4:58   ` Lu Baolu
2020-10-30  6:16   ` Tian, Kevin
2020-10-30  6:16     ` Tian, Kevin
2020-10-30 21:06     ` Alex Williamson
2020-10-30 21:06       ` Alex Williamson
2020-11-03  5:22       ` Lu Baolu
2020-11-03  5:22         ` Lu Baolu
2020-11-12  2:31         ` Lu Baolu [this message]
2020-11-12  2:31           ` Lu Baolu

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=d171ae28-a99a-a47b-aeb1-3231391e8c82@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=cohuck@redhat.com \
    --cc=dave.jiang@intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=xin.zeng@intel.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.