Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread Borislav Petkov
On Tue, Jul 03, 2018 at 10:17:19AM +0800, lijiang wrote: > for example, the elfcorehdr. In fact, the elfcorehdr and notes You mean this? ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos) { - return read_from_oldmem(buf, count, ppos, 0); + return read_from_oldm

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > Currently tag is being assigned but not used, it is missing from > the dev_err message, so add it in. > > Cleans up clang warning: > warning: variable 'tag' set but not used [-Wunused-but-set-variable] [] > diff --git a/drivers/iommu/amd_iommu

RE: [RFC PATCH] iommu/vt-d: Exclude known RMRRs from reserved ranges

2018-07-03 Thread Shameerali Kolothum Thodi
Hi Alex, > -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: 08 June 2018 03:56 > To: Alex Williamson > Cc: dw...@infradead.org; iommu@lists.linux-foundation.org; > k...@vger.kernel.org; linux-ker...@vger.kernel.org; Shameerali Kolothum > Thodi > Subject: RE: [

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread lijiang
在 2018年07月03日 10:17, lijiang 写道: > 在 2018年07月02日 18:14, Borislav Petkov 写道: >> On Mon, Jul 02, 2018 at 03:26:35PM +0800, Lianbo Jiang wrote: >>> @@ -131,7 +132,8 @@ static void __ioremap_check_mem(resource_size_t addr, >>> unsigned long size, >>> * caller shouldn't need to know that small detail

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread Borislav Petkov
On Tue, Jul 03, 2018 at 06:58:14PM +0800, lijiang wrote: > For kdump, the elf header finally use the crash kernel reserved memory, it is > not an old memory. Lamme repeat my suggestion: So beef up the logic in __ioremap_caller() to figure out based on the address whether to access the memory enc

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread lijiang
在 2018年07月03日 17:39, Borislav Petkov 写道: > On Tue, Jul 03, 2018 at 10:17:19AM +0800, lijiang wrote: >> for example, the elfcorehdr. In fact, the elfcorehdr and notes > > You mean this? > > ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos) > { > - return read_from_ol

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread lijiang
在 2018年07月03日 19:14, Borislav Petkov 写道: > On Tue, Jul 03, 2018 at 06:58:14PM +0800, lijiang wrote: >> For kdump, the elf header finally use the crash kernel reserved memory, it >> is not an old memory. > > Lamme repeat my suggestion: > > So beef up the logic in __ioremap_caller() to figure out

Re: [RFC PATCH] iommu/vt-d: Exclude known RMRRs from reserved ranges

2018-07-03 Thread David Woodhouse
On Thu, 2018-06-07 at 09:01 -0600, Alex Williamson wrote: > > > intel_iommu_get_resv_regions is used not just for IOMMU API. I'm > > afraid doing so will make RMRR completely ignored, even in normal > > DMA API path... > > Well, I'm a bit stuck then, we have existing IOMMU API users that > ignore

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Gary R Hook
On 07/03/2018 01:40 AM, Colin King wrote: From: Colin Ian King Currently tag is being assigned but not used, it is missing from the dev_err message, so add it in. Cleans up clang warning: warning: variable 'tag' set but not used [-Wunused-but-set-variable] Fixes: e7f63ffc1bf1 ("iommu/amd: Upd

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Gary R Hook
On 07/03/2018 05:07 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: Currently tag is being assigned but not used, it is missing from the dev_err message, so add it in. Cleans up clang warning: warning: variable 'tag' set but not used [-Wunused-but-set-variable] []

[PATCH] dma-mapping: Relax warnings for per-device areas

2018-07-03 Thread Robin Murphy
The reasons why dma_free_attrs() should not be called from IRQ context are not necessarily obvious and somewhat buried in the development history, so let's start by documenting the warning itself to help anyone who does happen to hit it and wonder what the deal is. However, this check turns out to

Re: [PATCH 1/7 v5] Docs: dt: add fsl-mc iommu-map device-tree binding

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: The existing IOMMU bindings cannot be used to specify the relationship between fsl-mc devices and IOMMUs. This patch adds a generic binding for mapping fsl-mc devices to IOMMUs, using iommu-map property. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring

Re: [PATCH 2/7 v5] iommu: of: make of_pci_map_rid() available for other devices too

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no functional change done in the API.

Re: [PATCH 3/7 v5] iommu: support iommu configuration for fsl-mc devices

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: With of_pci_map_rid available for all the busses, use the function for configuration of devices on fsl-mc bus FWIW I had a quick hack at factoring out the commonality with of_pci_iommu_init(), at which point I reckon this change is easier to follow as-is

Re: [PATCH 4/7 v5] iommu: arm-smmu: Add support for the fsl-mc bus

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. Signed-off-by: Nipun Gupta --- drivers/iommu/arm-smmu.c | 7 +++ drivers/iommu/iommu.c| 21 + inclu

Re: [PATCH 5/7 v5] bus: fsl-mc: support dma configure for devices on fsl-mc bus

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: This patch adds support of dma configuration for devices on fsl-mc bus using 'dma_configure' callback for busses. Also, directly calling arch_setup_dma_ops is removed from the fsl-mc bus. Looks like this is the final arch_setup_dma_ops offender, yay! Sign

Re: [PATCH 6/7 v5] bus: fsl-mc: set coherent dma mask for devices on fsl-mc bus

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: of_dma_configure() API expects coherent_dma_mask to be correctly set in the devices. This patch does the needful. Reviewed-by: Robin Murphy Signed-off-by: Nipun Gupta --- drivers/bus/fsl-mc/fsl-mc-bus.c | 1 + 1 file changed, 1 insertion(+) diff --g

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Hook, Gary
On 7/3/2018 10:55 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: On 07/03/2018 05:07 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: Currently tag is being assigned but not used, it is missing from the dev_err message, so add it in. Cl

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Colin Ian King
On 03/07/18 17:21, Hook, Gary wrote: > On 7/3/2018 10:55 AM, Joe Perches wrote: >> On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: >>> On 07/03/2018 05:07 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > Currently tag is being assigned but not used, it is

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Hook, Gary
On 7/3/2018 11:24 AM, Colin Ian King wrote: On 03/07/18 17:21, Hook, Gary wrote: On 7/3/2018 10:55 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: On 07/03/2018 05:07 AM, Joe Perches wrote: On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: Currently tag is bei

Re: [PATCH 7/7 v5] arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc

2018-07-03 Thread Robin Murphy
On 20/05/18 14:49, Nipun Gupta wrote: fsl-mc bus support the new iommu-map property. Comply to this binding for fsl_mc bus. Signed-off-by: Nipun Gupta Reviewed-by: Laurentiu Tudor --- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 11:27 -0500, Hook, Gary wrote: > On 7/3/2018 11:24 AM, Colin Ian King wrote: > > On 03/07/18 17:21, Hook, Gary wrote: > > > On 7/3/2018 10:55 AM, Joe Perches wrote: > > > > On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: > > > > > On 07/03/2018 05:07 AM, Joe Perches wrot

Re: [PATCH] dma-mapping: Relax warnings for per-device areas

2018-07-03 Thread Fredrik Noring
Thank you Robin, On Tue, Jul 03, 2018 at 02:08:30PM +0100, Robin Murphy wrote: > The reasons why dma_free_attrs() should not be called from IRQ context > are not necessarily obvious and somewhat buried in the development > history, so let's start by documenting the warning itself to help anyone >

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: > On 07/03/2018 05:07 AM, Joe Perches wrote: > > On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > > > Currently tag is being assigned but not used, it is missing from > > > the dev_err message, so add it in. > > > > > > Cleans up clang wa

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 18:57 +0200, Walter Harms wrote: > It is only cosmetics but even the author got lost about the loose bracket. > I would suggest to remove all the brackets or if needed to move the [ in the > message. We have enought memory this days. My suggestion would be to remove the separ