From: Auger Eric <eric.auger@redhat.com>
To: Bharat Bhushan <bharat.bhushan@nxp.com>,
"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
"marc.zyngier@arm.com" <marc.zyngier@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"jason@lakedaemon.net" <jason@lakedaemon.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"drjones@redhat.com" <drjones@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pranav.sawargaonkar@gmail.com" <pranav.sawargaonkar@gmail.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"punit.agrawal@arm.com" <punit.agrawal@arm.com>,
Diana Madalina Craciun <diana.craciun@nxp.com>,
"gpkulkarni@gmail.com" <gpkulkarni@gmail.com>,
"shankerd@codeaurora.org" <shankerd@codeaurora.org>,
"geethasowjanya.akula@gmail.com" <geethasowjanya.akula@gmail.com>
Subject: Re: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions
Date: Thu, 12 Jan 2017 08:40:17 +0100 [thread overview]
Message-ID: <bcadbebb-2e1d-9977-da56-817acd9f3dfb@redhat.com> (raw)
In-Reply-To: <AM5PR0401MB254547FE747461B3332721FC9A790@AM5PR0401MB2545.eurprd04.prod.outlook.com>
Hi Bharat,
On 12/01/2017 04:59, Bharat Bhushan wrote:
>
>
>> -----Original Message-----
>> From: Eric Auger [mailto:eric.auger@redhat.com]
>> Sent: Wednesday, January 11, 2017 3:12 PM
>> To: eric.auger@redhat.com; eric.auger.pro@gmail.com;
>> christoffer.dall@linaro.org; marc.zyngier@arm.com;
>> robin.murphy@arm.com; alex.williamson@redhat.com;
>> will.deacon@arm.com; joro@8bytes.org; tglx@linutronix.de;
>> jason@lakedaemon.net; linux-arm-kernel@lists.infradead.org
>> Cc: kvm@vger.kernel.org; drjones@redhat.com; linux-
>> kernel@vger.kernel.org; pranav.sawargaonkar@gmail.com;
>> iommu@lists.linux-foundation.org; punit.agrawal@arm.com; Diana Madalina
>> Craciun <diana.craciun@nxp.com>; gpkulkarni@gmail.com;
>> shankerd@codeaurora.org; Bharat Bhushan <bharat.bhushan@nxp.com>;
>> geethasowjanya.akula@gmail.com
>> Subject: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and
>> IOVA reserved regions
>>
>> Following LPC discussions, we now report reserved regions through the
>> iommu-group sysfs reserved_regions attribute file.
>>
>> Reserved regions are populated through the IOMMU get_resv_region
>> callback (former get_dm_regions), now implemented by amd-iommu, intel-
>> iommu and arm-smmu:
>> - the intel-iommu reports the [0xfee00000 - 0xfeefffff] MSI window
>> as a reserved region and RMRR regions as direct-mapped regions.
>> - the amd-iommu reports device direct mapped regions, the MSI region
>> and HT regions.
>> - the arm-smmu reports the MSI window (arbitrarily located at
>> 0x8000000 and 1MB large).
>>
>> Unsafe interrupt assignment is tested by enumerating all MSI irq domains
>> and checking MSI remapping is supported in the above hierarchy.
>> This check is done in case we detect the iommu translates MSI (an
>> IOMMU_RESV_MSI window exists). Otherwise the IRQ remapping capability
>> is checked at IOMMU level. Obviously this is a defensive IRQ safety
>> assessment: Assuming there are several MSI controllers in the system and at
>> least one does not implement IRQ remapping, the assignment will be
>> considered as unsafe (even if this controller is not acessible from the
>> assigned devices).
>>
>> The series first patch stems from Robin's branch:
>> http://linux-arm.org/git?p=linux-
>> rm.git;a=shortlog;h=refs/heads/iommu/misc
>>
>> Best Regards
>>
>> Eric
>>
>> Git: complete series available at
>> https://github.com/eauger/linux/tree/v4.10-rc3-reserved-v8
>
> This series is tested on NXP platform, if you want you can add my tested by
> Tested-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Thank you for this!
Best Regards
Eric
>
> Thanks
> -Bharat
>
>>
>> istory:
>>
>> PATCHv7 -> PATCHv8
>> - take into account Marc's comments and apply his R-b
>> - remove iommu_group_remove_file call in iommu_group_release
>> - add Will's A-b
>> - removed [PATCH v7 01/19] iommu/dma: Implement PCI allocation
>> optimisation and updated iommu/dma: Allow MSI-only cookies
>> as per Robin's indications
>>
>> PATCHv6 -> PATCHv7:
>> - iommu/dma: Implement PCI allocation optimisation was added to apply
>> iommu/dma: Allow MSI-only cookies
>> - report Intel RMRR as direct-mapped regions
>> - report the type in the iommu group sysfs reserved_regions file
>> - do not merge regions of different types when building the list
>> of reserved regions
>> - intgeration Robin's "iommu/dma: Allow MSI-only cookies" last
>> version
>> - update Documentation/ABI/testing/sysfs-kernel-iommu_groups
>> - rename IOMMU_RESV_NOMAP into IOMMU_RESV_RESERVED
>>
>> PATCHv5 -> PATCHv6
>> - Introduce IRQ_DOMAIN_FLAG_MSI as suggested by Marc
>> - irq_domain_is_msi, irq_domain_is_msi_remap,
>> irq_domain_hierarchical_is_msi_remap,
>> - set IRQ_DOMAIN_FLAG_MSI in msi_create_irq_domain
>> - fix compil issue on i386
>> - rework test at VFIO level
>>
>> RFCv4 -> PATCHv5
>> - fix IRQ security assessment by looking at irq domain parents
>> - check DOMAIN_BUS_FSL_MC_MSI irq domains
>> - AMD MSI and HT regions are exposed in iommu group sysfs
>>
>> RFCv3 -> RFCv4:
>> - arm-smmu driver does not register PCI host bridge windows as
>> reserved regions anymore
>> - Implement reserved region get/put callbacks also in arm-smmuv3
>> - take the iommu_group lock on iommu_get_group_resv_regions
>> - add a type field in iommu_resv_region instead of using prot
>> - init the region list_head in iommu_alloc_resv_region, also
>> add type parameter
>> - iommu_insert_resv_region manage overlaps and sort reserved
>> windows
>> - address IRQ safety assessment by enumerating all the MSI irq
>> domains and checking the MSI_REMAP flag
>> - update Documentation/ABI/testing/sysfs-kernel-iommu_groups
>>
>> RFC v2 -> v3:
>> - switch to an iommu-group sysfs API
>> - use new dummy allocator provided by Robin
>> - dummy allocator initialized by vfio-iommu-type1 after enumerating
>> the reserved regions
>> - at the moment ARM MSI base address/size is left unchanged compared
>> to v2
>> - we currently report reserved regions and not usable IOVA regions as
>> requested by Alex
>>
>> RFC v1 -> v2:
>> - fix intel_add_reserved_regions
>> - add mutex lock/unlock in vfio_iommu_type1
>>
>>
>> Eric Auger (17):
>> iommu: Rename iommu_dm_regions into iommu_resv_regions
>> iommu: Add a new type field in iommu_resv_region
>> iommu: iommu_alloc_resv_region
>> iommu: Only map direct mapped regions
>> iommu: iommu_get_group_resv_regions
>> iommu: Implement reserved_regions iommu-group sysfs file
>> iommu/vt-d: Implement reserved region get/put callbacks
>> iommu/amd: Declare MSI and HT regions as reserved IOVA regions
>> iommu/arm-smmu: Implement reserved region get/put callbacks
>> iommu/arm-smmu-v3: Implement reserved region get/put callbacks
>> irqdomain: Add irq domain MSI and MSI_REMAP flags
>> genirq/msi: Set IRQ_DOMAIN_FLAG_MSI on MSI domain creation
>> irqdomain: irq_domain_check_msi_remap
>> irqchip/gicv3-its: Sets IRQ_DOMAIN_FLAG_MSI_REMAP
>> vfio/type1: Allow transparent MSI IOVA allocation
>> vfio/type1: Check MSI remapping at irq domain level
>> iommu/arm-smmu: Do not advertise IOMMU_CAP_INTR_REMAP anymore
>>
>> Robin Murphy (1):
>> iommu/dma: Allow MSI-only cookies
>>
>> .../ABI/testing/sysfs-kernel-iommu_groups | 12 ++
>> drivers/iommu/amd_iommu.c | 54 ++++---
>> drivers/iommu/arm-smmu-v3.c | 30 +++-
>> drivers/iommu/arm-smmu.c | 30 +++-
>> drivers/iommu/dma-iommu.c | 119 +++++++++++---
>> drivers/iommu/intel-iommu.c | 92 ++++++++---
>> drivers/iommu/iommu.c | 177 +++++++++++++++++++--
>> drivers/irqchip/irq-gic-v3-its.c | 1 +
>> drivers/vfio/vfio_iommu_type1.c | 37 ++++-
>> include/linux/dma-iommu.h | 6 +
>> include/linux/iommu.h | 46 ++++--
>> include/linux/irqdomain.h | 36 +++++
>> kernel/irq/irqdomain.c | 36 +++++
>> kernel/irq/msi.c | 4 +-
>> 14 files changed, 587 insertions(+), 93 deletions(-)
>>
>> --
>> 1.9.1
>
next prev parent reply other threads:[~2017-01-12 7:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 9:41 [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions Eric Auger
[not found] ` <1484127714-3263-1-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-11 9:41 ` [PATCH v8 01/18] iommu/dma: Allow MSI-only cookies Eric Auger
2017-01-17 11:59 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 02/18] iommu: Rename iommu_dm_regions into iommu_resv_regions Eric Auger
[not found] ` <1484127714-3263-3-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 12:08 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 03/18] iommu: Add a new type field in iommu_resv_region Eric Auger
2017-01-11 9:41 ` [PATCH v8 04/18] iommu: iommu_alloc_resv_region Eric Auger
[not found] ` <1484127714-3263-5-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 12:12 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 05/18] iommu: Only map direct mapped regions Eric Auger
[not found] ` <1484127714-3263-6-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 12:13 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 06/18] iommu: iommu_get_group_resv_regions Eric Auger
[not found] ` <1484127714-3263-7-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 12:14 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 07/18] iommu: Implement reserved_regions iommu-group sysfs file Eric Auger
2017-01-11 9:41 ` [PATCH v8 08/18] iommu/vt-d: Implement reserved region get/put callbacks Eric Auger
2017-01-11 9:41 ` [PATCH v8 09/18] iommu/amd: Declare MSI and HT regions as reserved IOVA regions Eric Auger
2017-01-11 9:41 ` [PATCH v8 10/18] iommu/arm-smmu: Implement reserved region get/put callbacks Eric Auger
[not found] ` <1484127714-3263-11-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 13:20 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 11/18] iommu/arm-smmu-v3: " Eric Auger
[not found] ` <1484127714-3263-12-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 14:13 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 13/18] genirq/msi: Set IRQ_DOMAIN_FLAG_MSI on MSI domain creation Eric Auger
[not found] ` <1484127714-3263-14-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-18 8:36 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 15/18] irqchip/gicv3-its: Sets IRQ_DOMAIN_FLAG_MSI_REMAP Eric Auger
2017-01-11 9:41 ` [PATCH v8 16/18] vfio/type1: Allow transparent MSI IOVA allocation Eric Auger
[not found] ` <1484127714-3263-17-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-13 23:04 ` Alex Williamson
2017-01-11 9:41 ` [PATCH v8 17/18] vfio/type1: Check MSI remapping at irq domain level Eric Auger
[not found] ` <1484127714-3263-18-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-13 23:04 ` Alex Williamson
2017-01-11 9:41 ` [PATCH v8 18/18] iommu/arm-smmu: Do not advertise IOMMU_CAP_INTR_REMAP anymore Eric Auger
2017-01-18 11:46 ` Tomasz Nowicki
2017-01-12 3:59 ` [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions Bharat Bhushan
2017-01-12 7:40 ` Auger Eric [this message]
2017-01-13 13:59 ` Tomasz Nowicki
[not found] ` <e1e6d9cf-5fb8-e118-3a47-4c6be77c21a3-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
2017-01-16 9:07 ` Auger Eric
2017-01-18 13:02 ` Auger Eric
2017-01-11 9:41 ` [PATCH v8 12/18] irqdomain: Add irq domain MSI and MSI_REMAP flags Eric Auger
2017-01-18 8:35 ` Tomasz Nowicki
2017-01-11 9:41 ` [PATCH v8 14/18] irqdomain: irq_domain_check_msi_remap Eric Auger
[not found] ` <1484127714-3263-15-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 13:40 ` Tomasz Nowicki
2017-01-17 13:53 ` Auger Eric
[not found] ` <f5aacc54-ca8e-cb09-461a-6105346b18b9-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-17 14:06 ` Tomasz Nowicki
2017-01-18 8:40 ` Tomasz Nowicki
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=bcadbebb-2e1d-9977-da56-817acd9f3dfb@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bharat.bhushan@nxp.com \
--cc=christoffer.dall@linaro.org \
--cc=diana.craciun@nxp.com \
--cc=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=geethasowjanya.akula@gmail.com \
--cc=gpkulkarni@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jason@lakedaemon.net \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=pranav.sawargaonkar@gmail.com \
--cc=punit.agrawal@arm.com \
--cc=robin.murphy@arm.com \
--cc=shankerd@codeaurora.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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