mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Kevin Tian <kevin.tian@intel.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Shameerali Kolothum Thodi  <shameerali.kolothum.thodi@huawei.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Brett Creeley <brett.creeley@amd.com>,
	oushixiong <oushixiong@kylinos.cn>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency
Date: Mon, 23 Oct 2023 21:23:17 +0100	[thread overview]
Message-ID: <725697d0-ffac-4660-b601-bde4a821efd3@oracle.com> (raw)
In-Reply-To: <1aeb7767-428f-4fbe-8531-c408e580764f@app.fastmail.com>



On 23/10/2023 19:46, Arnd Bergmann wrote:
> On Mon, Oct 23, 2023, at 19:50, Joao Martins wrote:
>> On 23/10/2023 14:12, Jason Gunthorpe wrote:
>>> On Mon, Oct 23, 2023 at 01:37:28PM +0100, Joao Martins wrote:
>>
>> To be specific what I meant to move is the IOMMUFD_DRIVER kconfig part, not the
>> whole iommufd Kconfig [in the patch introducing the problem] e.g.
>>
>> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
>> index 2b12b583ef4b..5cc869db1b79 100644
>> --- a/drivers/iommu/Kconfig
>> +++ b/drivers/iommu/Kconfig
>> @@ -7,6 +7,10 @@ config IOMMU_IOVA
>>  config IOMMU_API
>>         bool
>>
>> +config IOMMUFD_DRIVER
>> +       bool
>> +       default n
>> +
>>  menuconfig IOMMU_SUPPORT
>>         bool "IOMMU Hardware Support"
>>         depends on MMU
>> diff --git a/drivers/iommu/iommufd/Kconfig b/drivers/iommu/iommufd/Kconfig
>> index 1fa543204e89..99d4b075df49 100644
>> --- a/drivers/iommu/iommufd/Kconfig
>> +++ b/drivers/iommu/iommufd/Kconfig
>> @@ -11,10 +11,6 @@ config IOMMUFD
>>
>>           If you don't know what to do here, say N.
>>
>> -config IOMMUFD_DRIVER
>> -       bool
>> -       default n
>> -
>>  if IOMMUFD
>>  config IOMMUFD_VFIO_CONTAINER
>>         bool "IOMMUFD provides the VFIO container /dev/vfio/vfio"
>>
>> (...) or in alternative, do similar to this patch except that it's:
>>
>> 	select IOMMUFD_DRIVER if IOMMU_SUPPORT
>>
>> In the mlx5/pds vfio drivers.
> 
> If I understand it right, we have two providers (AMD and
> Intel iommu) and two consumers (mlx5 and pds) for this
> interface, so we probably don't want to use 'select' for
> both sides here.
> 
It's not quite one consumes the other.

IOMMU drivers use iova-bitmap, and are providers of the IOMMU support to IOMMUFD
usage.

The mlx5/pds (and VFIO too if either is enabled) consume iova-bitmap (thus
select IOMMUFD_DRIVER where the code is now being moved under) but they aren't
tied to the IOMMU support of it.

This is what we are trying to capture in the kconfig and thus structured it
this way.

> As with CONFIG_IOMMU_API, two two logical options are
> to either have a hidden symbol selected by the providers
> that the consumers depend on, or have a user-visible
> symbol and use 'depends on IOMMUFD_DRIVER' for both
> the providers and the consumers.
> 
> Either way, I think the problem with the warning goes
> away.
> 
>> Perhaps the merging of IOMMU_API with IOMMU_SUPPORT should
>> be best done separately?
> 
> Right, that part should be improved as well, but it's
> not causing other problems at the moment.
> 
>      Arnd

      reply	other threads:[~2023-10-23 20:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 11:55 Arnd Bergmann
2023-10-23 12:04 ` Jason Gunthorpe
2023-10-23 12:37   ` Joao Martins
2023-10-23 12:55     ` Arnd Bergmann
2023-10-23 13:23       ` Jason Gunthorpe
2023-10-23 14:02         ` Arnd Bergmann
2023-10-23 14:19           ` Jason Gunthorpe
2023-10-23 14:35             ` Arnd Bergmann
2023-10-23 14:43               ` Jason Gunthorpe
2023-10-23 14:52                 ` Arnd Bergmann
2023-10-23 13:12     ` Jason Gunthorpe
2023-10-23 17:50       ` Joao Martins
2023-10-23 18:08         ` Jason Gunthorpe
2023-10-23 18:46         ` Arnd Bergmann
2023-10-23 20:23           ` Joao Martins [this message]

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=725697d0-ffac-4660-b601-bde4a821efd3@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=alex.williamson@redhat.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=brett.creeley@amd.com \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oushixiong@kylinos.cn \
    --cc=shameerali.kolothum.thodi@huawei.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

all inboxes | Powered by JetHome®