[git pull] IOMMU Fixes for Linux v4.12-rc4

2017-06-09 Thread Joerg Roedel
Hi Linus, The following changes since commit 5ed02dbb497422bf225783f46e6eadd237d23d6b: Linux 4.12-rc3 (2017-05-28 17:20:53 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.12-rc4 for you to fetch changes up to

Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Tom Lendacky
On 6/9/2017 1:46 PM, Andy Lutomirski wrote: On Thu, Jun 8, 2017 at 3:38 PM, Tom Lendacky wrote: On 6/8/2017 1:05 AM, Andy Lutomirski wrote: On Wed, Jun 7, 2017 at 12:14 PM, Tom Lendacky wrote: The cr3 register entry can contain the SME encryption bit that indicates the PGD is encrypted. T

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Boris Ostrovsky
>> >> PV guests don't go through Linux x86 early boot code. They start at >> xen_start_kernel() (well, xen-head.S:startup_xen(), really) and merge >> with baremetal path at x86_64_start_reservations() (for 64-bit). >> > > Ok, I don't think anything needs to be done then. The sme_me_mask is set >

Re: [PATCH 0/8] io-pgtable lock removal

2017-06-09 Thread Nate Watterson
Hi Robin, On 6/8/2017 7:51 AM, Robin Murphy wrote: Hi all, Here's the cleaned up nominally-final version of the patches everybody's keen to see. #1 is just a non-critical thing-I-spotted-in-passing fix, #2-#4 do some preparatory work (and bid farewell to everyone's least favourite bit of code,

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Andrew Cooper
On 09/06/17 19:43, Boris Ostrovsky wrote: > On 06/09/2017 02:36 PM, Tom Lendacky wrote: >>> basis, although (as far as I am aware) Xen as a whole would be able to >>> encompass itself and all of its PV guests inside one single SME >>> instance. >> Yes, that is correct. Thinking more about this, it

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Tom Lendacky
On 6/9/2017 1:43 PM, Boris Ostrovsky wrote: On 06/09/2017 02:36 PM, Tom Lendacky wrote: On 6/8/2017 5:01 PM, Andrew Cooper wrote: On 08/06/2017 22:17, Boris Ostrovsky wrote: On 06/08/2017 05:02 PM, Tom Lendacky wrote: On 6/8/2017 3:51 PM, Boris Ostrovsky wrote: What may be needed is making s

Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Andy Lutomirski
On Thu, Jun 8, 2017 at 3:38 PM, Tom Lendacky wrote: > On 6/8/2017 1:05 AM, Andy Lutomirski wrote: >> >> On Wed, Jun 7, 2017 at 12:14 PM, Tom Lendacky >> wrote: >>> >>> The cr3 register entry can contain the SME encryption bit that indicates >>> the PGD is encrypted. The encryption bit should not

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Boris Ostrovsky
On 06/09/2017 02:36 PM, Tom Lendacky wrote: > On 6/8/2017 5:01 PM, Andrew Cooper wrote: >> On 08/06/2017 22:17, Boris Ostrovsky wrote: >>> On 06/08/2017 05:02 PM, Tom Lendacky wrote: On 6/8/2017 3:51 PM, Boris Ostrovsky wrote: >>> What may be needed is making sure X86_FEATURE_SME is not se

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

2017-06-09 Thread Tom Lendacky
On 6/8/2017 5:01 PM, Andrew Cooper wrote: On 08/06/2017 22:17, Boris Ostrovsky wrote: On 06/08/2017 05:02 PM, Tom Lendacky wrote: On 6/8/2017 3:51 PM, Boris Ostrovsky wrote: What may be needed is making sure X86_FEATURE_SME is not set for PV guests. And that may be something that Xen will nee

Re: [PATCH v6 06/34] x86/mm: Add Secure Memory Encryption (SME) support

2017-06-09 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:14:16PM -0500, Tom Lendacky wrote: > Add support for Secure Memory Encryption (SME). This initial support > provides a Kconfig entry to build the SME support into the kernel and > defines the memory encryption mask that will be used in subsequent > patches to mark pages a

Re: [PATCH v6 05/34] x86/CPU/AMD: Handle SME reduction in physical address size

2017-06-09 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:14:04PM -0500, Tom Lendacky wrote: > When System Memory Encryption (SME) is enabled, the physical address > space is reduced. Adjust the x86_phys_bits value to reflect this > reduction. > > Signed-off-by: Tom Lendacky > --- > arch/x86/kernel/cpu/amd.c | 10 +++---

Re: Fwd: [PATCH v7 2/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74

2017-06-09 Thread Robin Murphy
On 09/06/17 12:38, Jayachandran C wrote: > On Fri, Jun 09, 2017 Robin Murphy wrote: >> >> On 30/05/17 13:03, Geetha sowjanya wrote: >>> From: Linu Cherian >>> >>> Cavium ThunderX2 SMMU implementation doesn't support page 1 register space >>> and PAGE0_REGS_ONLY option is enabled as an errata worka

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-09 Thread Robin Murphy
On 09/06/17 07:20, Tomasz Figa wrote: > On Fri, Jun 9, 2017 at 3:07 AM, Robin Murphy wrote: >> On 08/06/17 15:35, Tomasz Figa wrote: >>> On Thu, Jun 8, 2017 at 10:22 PM, Robin Murphy wrote: On 07/06/17 10:47, Tomasz Figa wrote: > Hi Yong, > > +Robin, Joerg, IOMMU ML > > P

Re: [PATCH 33/44] openrisc: remove arch-specific dma_supported implementation

2017-06-09 Thread Geert Uytterhoeven
Hi Christoph, On Thu, Jun 8, 2017 at 3:25 PM, Christoph Hellwig wrote: > This implementation is simply bogus - hexagon only has a simple openrisc? > direct mapped DMA implementation and thus doesn't care about the > address. > > Signed-off-by: Christoph Hellwig > --- > arch/openrisc/include/a

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 5:26 PM, Tuukka Toivonen wrote: > Hi Tomasz, > > Couple of small comments below. > > On Wednesday, June 07, 2017 17:35:13 Tomasz Figa wrote: >> >> +static void ipu3_mmu_domain_free(struct iommu_domain *dom) >> >> +{ >> >> + struct ipu3_mmu_domain *mmu_dom = >> >> +

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 8:16 PM, Sakari Ailus wrote: > Hi Tomasz, > > On Fri, Jun 09, 2017 at 02:59:10PM +0900, Tomasz Figa wrote: >> On Fri, Jun 9, 2017 at 1:43 AM, Sakari Ailus wrote: >> >> >> +static void ipu3_mmu_domain_free(struct iommu_domain *dom) >> >> >> +{ >> >> >> + struct ipu3_mm

Re: Fwd: [PATCH v7 2/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74

2017-06-09 Thread Jayachandran C
On Fri, Jun 09, 2017 Robin Murphy wrote: > > On 30/05/17 13:03, Geetha sowjanya wrote: > > From: Linu Cherian > > > > Cavium ThunderX2 SMMU implementation doesn't support page 1 register space > > and PAGE0_REGS_ONLY option is enabled as an errata workaround. > > This option when turned on, repla

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Sakari Ailus
Hi Tomasz, On Fri, Jun 09, 2017 at 02:59:10PM +0900, Tomasz Figa wrote: > On Fri, Jun 9, 2017 at 1:43 AM, Sakari Ailus wrote: > >> >> +static void ipu3_mmu_domain_free(struct iommu_domain *dom) > >> >> +{ > >> >> + struct ipu3_mmu_domain *mmu_dom = > >> >> + container_of(dom,

Re: [PATCH v6 04/34] x86/CPU/AMD: Add the Secure Memory Encryption CPU feature

2017-06-09 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:13:53PM -0500, Tom Lendacky wrote: > Update the CPU features to include identifying and reporting on the > Secure Memory Encryption (SME) feature. SME is identified by CPUID > 0x801f, but requires BIOS support to enable it (set bit 23 of > MSR_K8_SYSCFG). Only show

Re: [PATCH v7 2/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74

2017-06-09 Thread Robin Murphy
On 30/05/17 13:03, Geetha sowjanya wrote: > From: Linu Cherian > > Cavium ThunderX2 SMMU implementation doesn't support page 1 register space > and PAGE0_REGS_ONLY option is enabled as an errata workaround. > This option when turned on, replaces all page 1 offsets used for > EVTQ_PROD/CONS, PRIQ_

Re: [PATCH v7 3/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126

2017-06-09 Thread Will Deacon
Hi Geetha, On Tue, May 30, 2017 at 05:33:41PM +0530, Geetha sowjanya wrote: > From: Geetha Sowjanya > > Cavium ThunderX2 SMMU doesn't support MSI and also doesn't have unique irq > lines for gerror, eventq and cmdq-sync. > > This patch addresses the issue by checking if any interrupt sources ar

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tuukka Toivonen
Hi Tomasz, Couple of small comments below. On Wednesday, June 07, 2017 17:35:13 Tomasz Figa wrote: > >> +static void ipu3_mmu_domain_free(struct iommu_domain *dom) > >> +{ > >> + struct ipu3_mmu_domain *mmu_dom = > >> + container_of(dom, struct ipu3_mmu_domain, domain); > >> +