Re: [RFC PATCH v2 07/20] x86: Provide general kernel support for memory encryption

2016-09-05 Thread Borislav Petkov
On Mon, Aug 22, 2016 at 05:36:46PM -0500, Tom Lendacky wrote: > Adding general kernel support for memory encryption includes: > - Modify and create some page table macros to include the Secure Memory > Encryption (SME) memory encryption mask > - Update kernel boot support to call an SME routine t

Re: [PATCH v4 05/15] drivers: platform: add fwnode base platform devices retrieval

2016-09-05 Thread Lorenzo Pieralisi
On Mon, Sep 05, 2016 at 09:19:43PM +0800, Hanjun Guo wrote: > On 2016/8/15 23:23, Lorenzo Pieralisi wrote: > >The platform device kernel API does not provide functions to > >retrieve a platform device through the corresponding struct > >device fwnode pointer. > > > >Implement the fwnode platform_de

Re: [PATCH v4 05/15] drivers: platform: add fwnode base platform devices retrieval

2016-09-05 Thread Hanjun Guo
On 2016/8/15 23:23, Lorenzo Pieralisi wrote: The platform device kernel API does not provide functions to retrieve a platform device through the corresponding struct device fwnode pointer. Implement the fwnode platform_device look-up in drivers core code by using the bus_find_device() API and a

[PATCH] iommu/arm-smmu: Fix polling of command queue

2016-09-05 Thread Jean-Philippe Brucker
When the SMMUv3 driver attempts to send a command, it adds an entry to the command queue. This is a circular buffer, where both the producer and consumer have a wrap bit. When producer.index == consumer.index and producer.wrap == consumer.wrap, the list is empty. When producer.index == consumer.ind

Re: [PATCH v4 04/15] drivers: acpi: iort: add support for IOMMU fwnode registration

2016-09-05 Thread Hanjun Guo
On 2016/8/15 23:23, Lorenzo Pieralisi wrote: The ACPI IORT table provide entries for IOMMU (aka SMMU in ARM world) components that allow creating the kernel data structures required to probe and initialize the IOMMU devices. This patch provides support in the IORT kernel code to register IOMMU c

Re: [PATCH v4 03/15] drivers: acpi: iort: introduce linker section for IORT entries probing

2016-09-05 Thread Hanjun Guo
On 2016/8/15 23:23, Lorenzo Pieralisi wrote: Since commit e647b532275b ("ACPI: Add early device probing infrastructure") the kernel has gained the infrastructure that allows adding linker script section entries to execute ACPI driver callbacks (ie probe routines) for all subsystems that register

Re: [PATCH v4 01/15] drivers: iommu: add FWNODE_IOMMU fwnode type

2016-09-05 Thread Hanjun Guo
On 2016/8/15 23:23, Lorenzo Pieralisi wrote: On systems booting with a device tree, every struct device is associated with a struct device_node, that represents its DT representation. The device node can be used in generic kernel contexts (eg IRQ translation, IOMMU streamid mapping), to retrieve

[PATCH 1/2] iommu/vt-d: Split up get_domain_for_dev function

2016-09-05 Thread Joerg Roede
From: Joerg Roedel Split out the search for an already existing domain and the context mapping of the device to the new domain. This allows to map possible RMRR regions into the domain before it is context mapped. Signed-off-by: Joerg Roedel --- drivers/iommu/intel-iommu.c | 76 ++

[PATCH 2/2] iommu/vt-d: Make sure RMRRs are mapped before domain goes public

2016-09-05 Thread Joerg Roede
From: Joerg Roedel When a domain is allocated through the get_valid_domain_for_dev path, it will be context-mapped before the RMRR regions are mapped in the page-table. This opens a short time window where device-accesses to these regions fail and causing DMAR faults. Fix this by mapping the RMR

Re: [PATCH v2] iommu/ipmmu-vmsa: Fix wrong error handle of ipmmu_add_device

2016-09-05 Thread Joerg Roedel
On Wed, Aug 24, 2016 at 10:23:51AM +0800, Shawn Lin wrote: > Let's fix the error handle of ipmmu_add_device > when failing to find utlbs, otherwise we take a > risk of pontential memleak. > > Signed-off-by: Shawn Lin > > --- > > Changes in v2: > - use error-out path > > drivers/iommu/ipmmu-vm

Re: [PATCHv9 6/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-09-05 Thread Robin Murphy
Hi Laurent, On 05/09/16 10:52, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Wednesday 10 Aug 2016 13:22:19 Niklas Söderlund wrote: >> Enable slave transfers to a device behind a IPMMU by mapping the slave >> addresses using the dma-mapping API. >> >> Signed-off-by: Ni

Re: [PATCHv9 4/6] arm: dma-mapping: add {map, unmap}_resource for iommu ops

2016-09-05 Thread Laurent Pinchart
Hello Niklas and Russell, On Tuesday 23 Aug 2016 17:31:36 Niklas Söderlund wrote: > Hi Russell, > > If you have the time can you please have a look at this patch? This > series have been out for some time now and Vinod is willing to take it > through the dmaengine tree but a ACK is needed on this

Re: [PATCHv9 6/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-09-05 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Wednesday 10 Aug 2016 13:22:19 Niklas Söderlund wrote: > Enable slave transfers to a device behind a IPMMU by mapping the slave > addresses using the dma-mapping API. > > Signed-off-by: Niklas Söderlund > --- > drivers/dma/sh/rcar-dmac.c | 82 +

Re: [PATCHv9 3/6] dma-mapping: add dma_{map,unmap}_resource

2016-09-05 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Wednesday 10 Aug 2016 13:22:16 Niklas Söderlund wrote: > Map/Unmap a device MMIO resource from a physical address. If no dma_map_ops > method is available the operation is a no-op. > > Signed-off-by: Niklas Söderlund Acked-by: Laurent Pinchart > --- >

Re: [PATCH v4 00/15] ACPI IORT ARM SMMU v3 support

2016-09-05 Thread Hanjun Guo
On 2016/8/15 23:23, Lorenzo Pieralisi wrote: This patch series is v4 of a previous posting: https://lkml.org/lkml/2016/7/20/248 v3 -> v4 - Added single mapping API (for IORT named components) Thanks, and it works for my platform msi patch set too :) - Fixed arm_smmu_iort_xla

Re: [PATCHv9 2/6] dma-debug: add support for resource mappings

2016-09-05 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Wednesday 10 Aug 2016 13:22:15 Niklas Söderlund wrote: > A MMIO mapped resource can not be represented by a struct page so a new > debug type is needed to handle this. This patch add such type and > functionality to add/remove entries and how to translate th

Re: [RFC PATCH v2 07/20] x86: Provide general kernel support for memory encryption

2016-09-05 Thread Borislav Petkov
On Mon, Aug 22, 2016 at 05:36:46PM -0500, Tom Lendacky wrote: > Adding general kernel support for memory encryption includes: > - Modify and create some page table macros to include the Secure Memory > Encryption (SME) memory encryption mask > - Update kernel boot support to call an SME routine t