Re: [PATCH v3 0/6] Remove x86-specific code from generic headers

2019-07-19 Thread Lendacky, Thomas
On 7/18/19 2:44 PM, Thiago Jung Bauermann wrote: > > Lendacky, Thomas writes: > >> On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: >>> Hello, >>> >>> This version is mostly about splitting up patch 2/3 into three separate >>> patches, as sugg

Re: [PATCH v3 0/6] Remove x86-specific code from generic headers

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Hello, > > This version is mostly about splitting up patch 2/3 into three separate > patches, as suggested by Christoph Hellwig. Two other changes are a fix in > patch 1 which wasn't selecting ARCH_HAS_MEM_ENCRYPT for s390 spotted by > Janani and

Re: [PATCH v3 5/6] fs/core/vmcore: Move sev_active() reference to x86 arch code

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Secure Encrypted Virtualization is an x86-specific feature, so it shouldn't > appear in generic kernel code because it forces non-x86 architectures to > define the sev_active() function, which doesn't make a lot of sense. > > To solve this proble

Re: [PATCH v3 4/6] x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Now that generic code doesn't reference them, move sme_active() and > sme_me_mask to x86's . > > Also remove the export for sme_active() since it's only used in files that > won't be built as modules. sme_me_mask on the other hand is used in > ar

Re: [PATCH v3 3/6] dma-mapping: Remove dma_check_mask()

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > sme_active() is an x86-specific function so it's better not to call it from > generic code. Christoph Hellwig mentioned that "There is no reason why we > should have a special debug printk just for one specific reason why there > is a requirement

Re: [PATCH v3 2/6] swiotlb: Remove call to sme_active()

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > sme_active() is an x86-specific function so it's better not to call it from > generic code. > > There's no need to mention which memory encryption feature is active, so > just use a more generic message. Besides, other architectures will have > d

Re: [PATCH 3/3] fs/core/vmcore: Move sev_active() reference to x86 arch code

2019-07-15 Thread Lendacky, Thomas
On 7/15/19 9:30 AM, Christoph Hellwig wrote: > On Mon, Jul 15, 2019 at 04:03:17PM +0200, Halil Pasic wrote: >>> I thought about that but couldn't put my finger on a general concept. >>> Is it "guest with memory inaccessible to the host"? >>> >> >> Well, force_dma_unencrypted() is a much better name

Re: [PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-17 Thread Lendacky, Thomas
On 12/16/2018 05:41 PM, Tom Lendacky wrote: > On 12/15/2018 04:55 AM, Christoph Hellwig wrote: >> The mail seems to be so oddly encoded so that git-am fails on it. Can >> you resend as plain text? > > Hmmm... not sure what happened with that, but yeah, looking at the message > source shows someth

[RESEND PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-17 Thread Lendacky, Thomas
The dma_direct_supported() function intends to check the DMA mask against specific values. However, the phys_to_dma() function includes the SME encryption mask, which defeats the intended purpose of the check. This results in drivers that support less than 48-bit DMA (SME encryption mask is bit 47)

Re: [PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-16 Thread Lendacky, Thomas
On 12/15/2018 04:55 AM, Christoph Hellwig wrote: > The mail seems to be so oddly encoded so that git-am fails on it. Can > you resend as plain text? Hmmm... not sure what happened with that, but yeah, looking at the message source shows something strange went on. Let me take a look and I'll try t

[PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-13 Thread Lendacky, Thomas
The dma_direct_supported() function intends to check the DMA mask against specific values. However, the phys_to_dma() function includes the SME encryption mask, which defeats the intended purpose of the check. This results in drivers that support less than 48-bit DMA (SME encryption mask is bit 47)

Re: [PATCH] dma-direct: Fix return value of dma_direct_supported

2018-12-13 Thread Lendacky, Thomas
On 10/04/2018 10:13 AM, Alexander Duyck wrote: > On Thu, Oct 4, 2018 at 4:25 AM Robin Murphy wrote: >> >> On 04/10/18 00:48, Alexander Duyck wrote: >>> It appears that in commit 9d7a224b463e ("dma-direct: always allow dma mask >>> <= physiscal memory size") the logic of the test was changed from a