From: Don Dutile <ddutile@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: aafabbri@cisco.com, kvm@vger.kernel.org, B07421@freescale.com,
aik@ozlabs.ru, konrad.wilk@oracle.com, linux-pci@vger.kernel.org,
agraf@suse.de, qemu-devel@nongnu.org, chrisw@sous-sol.org,
B08248@freescale.com, iommu@lists.linux-foundation.org,
gregkh@linuxfoundation.org, avi@redhat.com, joerg.roedel@amd.com,
bhelgaas@google.com, benve@cisco.com, dwmw2@infradead.org,
linux-kernel@vger.kernel.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v2 09/13] vfio: x86 IOMMU implementation
Date: Fri, 25 May 2012 11:22:03 -0400 [thread overview]
Message-ID: <4FBFA39B.8080805@redhat.com> (raw)
In-Reply-To: <1337899615.4714.79.camel@ul30vt>
On 05/24/2012 06:46 PM, Alex Williamson wrote:
> On Thu, 2012-05-24 at 17:38 -0400, Don Dutile wrote:
>> On 05/22/2012 01:05 AM, Alex Williamson wrote:
>>> x86 is probably the wrong name for this VFIO IOMMU driver, but x86
>>> is the primary target for it. This driver support a very simple
>>> usage model using the existing IOMMU API. The IOMMU is expected to
>>> support the full host address space with no special IOVA windows,
>>> number of mappings restrictions, or unique processor target options.
>>>
>>> Signed-off-by: Alex Williamson<alex.williamson@redhat.com>
>>> ---
>>>
>>> Documentation/ioctl/ioctl-number.txt | 2
>>> drivers/vfio/Kconfig | 6
>>> drivers/vfio/Makefile | 2
>>> drivers/vfio/vfio.c | 7
>>> drivers/vfio/vfio_iommu_x86.c | 743 ++++++++++++++++++++++++++++++++++
>>> include/linux/vfio.h | 52 ++
>>> 6 files changed, 811 insertions(+), 1 deletions(-)
>>> create mode 100644 drivers/vfio/vfio_iommu_x86.c
>>>
>>> diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
>>> index 111e30a..9d1694e 100644
>>> --- a/Documentation/ioctl/ioctl-number.txt
>>> +++ b/Documentation/ioctl/ioctl-number.txt
>>> @@ -88,7 +88,7 @@ Code Seq#(hex) Include File Comments
>>> and kernel/power/user.c
>>> '8' all SNP8023 advanced NIC card
>>> <mailto:mcr@solidum.com>
>>> -';' 64-6F linux/vfio.h
>>> +';' 64-72 linux/vfio.h
>>> '@' 00-0F linux/radeonfb.h conflict!
>>> '@' 00-0F drivers/video/aty/aty128fb.c conflict!
>>> 'A' 00-1F linux/apm_bios.h conflict!
>>> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
>>> index 9acb1e7..bd88a30 100644
>>> --- a/drivers/vfio/Kconfig
>>> +++ b/drivers/vfio/Kconfig
>>> @@ -1,6 +1,12 @@
>>> +config VFIO_IOMMU_X86
>>> + tristate
>>> + depends on VFIO&& X86
>>> + default n
>>> +
>>> menuconfig VFIO
>>> tristate "VFIO Non-Privileged userspace driver framework"
>>> depends on IOMMU_API
>>> + select VFIO_IOMMU_X86 if X86
>>> help
>>> VFIO provides a framework for secure userspace device drivers.
>>> See Documentation/vfio.txt for more details.
>>
>> So a future refactoring that uses some chunk of this support
>> on a non-x86 machine could be a lot of useless renaming.
>>
>> Why not rename vfio_iommu_x86 to something like vfio_iommu_no_iova
>> and just make it conditionally compiled on X86 (as you've done above in Kconfig's)?
>> Then if another arch can use it, or refactors the file to use
>> some of it, and split x86 vs<other-arch> into separate per-arch files,
>> or per-iova schemes, it's more descriptive and less disruptive?
>
> Yep, the problem is how to concisely describe what we expect to support
> here. This file supports IOMMU API based usage of an IOMMU with
> effectively no DMA window or mapping constraints, optimized for static
> mapping of an address space. What's a good name for that? Maybe I
> should follow the example of others and just call it a Type 1 IOMMU
> implementation so the marketing material looks better! ;-P That may
> honestly be better than calling it x86. Thoughts? Thanks,
>
> Alex
>
I'll vote for 'type1' over 'x86' ....
Add a comment in the file what a 'type1 IOMMU' is.
Then others can dupe format for typeX.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-25 15:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 5:04 [Qemu-devel] [PATCH v2 00/13] IOMMU Groups + VFIO Alex Williamson
2012-05-22 5:04 ` [Qemu-devel] [PATCH v2 01/13] driver core: Add iommu_group tracking to struct device Alex Williamson
2012-05-22 5:04 ` [Qemu-devel] [PATCH v2 02/13] iommu: IOMMU Groups Alex Williamson
2012-05-22 5:04 ` [Qemu-devel] [PATCH v2 03/13] iommu: IOMMU groups for VT-d and AMD-Vi Alex Williamson
2012-05-24 21:01 ` Don Dutile
2012-05-24 21:49 ` Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 04/13] pci: Add PCI DMA source ID quirk Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 05/13] pci: Add ACS validation utility Alex Williamson
2012-05-24 21:30 ` Don Dutile
2012-05-24 22:35 ` Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 06/13] iommu: Make use of DMA quirking and ACS enabled check for groups Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 07/13] vfio: VFIO core Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 08/13] vfio: Add documentation Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 09/13] vfio: x86 IOMMU implementation Alex Williamson
2012-05-24 21:38 ` Don Dutile
2012-05-24 22:46 ` Alex Williamson
2012-05-25 15:22 ` Don Dutile [this message]
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 10/13] pci: export pci_user functions for use by other drivers Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 11/13] pci: Create common pcibios_err_to_errno Alex Williamson
2012-05-22 5:05 ` [Qemu-devel] [PATCH v2 12/13] pci: Misc pci_reg additions Alex Williamson
2012-05-24 21:49 ` Don Dutile
2012-05-24 22:17 ` Alex Williamson
2012-05-22 5:06 ` [Qemu-devel] [PATCH v2 13/13] vfio: Add PCI device driver Alex Williamson
2012-05-24 21:56 ` [Qemu-devel] [PATCH v2 00/13] IOMMU Groups + VFIO Don Dutile
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=4FBFA39B.8080805@redhat.com \
--to=ddutile@redhat.com \
--cc=B07421@freescale.com \
--cc=B08248@freescale.com \
--cc=aafabbri@cisco.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=benve@cisco.com \
--cc=bhelgaas@google.com \
--cc=chrisw@sous-sol.org \
--cc=david@gibson.dropbear.id.au \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joerg.roedel@amd.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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).