Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Dave Hansen
On 04/18/2017 02:17 PM, Tom Lendacky wrote: > @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void *from, > unsigned long vaddr, > __phys_addr_symbol(__phys_reloc_hide((unsigned long)(x))) > > #ifndef __va > -#define __va(x) ((void *)((unsigned >

Re: [PATCH v5 32/32] x86/mm: Add support to make use of Secure Memory Encryption

2017-04-24 Thread Tom Lendacky
On 4/18/2017 4:22 PM, Tom Lendacky wrote: Add support to check if SME has been enabled and if memory encryption should be activated (checking of command line option based on the configuration of the default state). If memory encryption is to be activated, then the encryption mask is set and the

Re: [PATCH v5 07/32] x86/mm: Add support to enable SME in early boot processing

2017-04-24 Thread Tom Lendacky
On 4/21/2017 9:55 AM, Borislav Petkov wrote: On Tue, Apr 18, 2017 at 04:17:35PM -0500, Tom Lendacky wrote: Add support to the early boot code to use Secure Memory Encryption (SME). Since the kernel has been loaded into memory in a decrypted state, support is added to encrypt the kernel in place

Re: [PATCH v5 07/32] x86/mm: Add support to enable SME in early boot processing

2017-04-24 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:17:35PM -0500, Tom Lendacky wrote: > Add support to the early boot code to use Secure Memory Encryption (SME). > Since the kernel has been loaded into memory in a decrypted state, support > is added to encrypt the kernel in place and update the early pagetables

Re: [PATCH v5 31/32] x86: Add sysfs support for Secure Memory Encryption

2017-04-24 Thread Dave Hansen
On 04/18/2017 02:22 PM, Tom Lendacky wrote: > Add sysfs support for SME so that user-space utilities (kdump, etc.) can > determine if SME is active. > > A new directory will be created: > /sys/kernel/mm/sme/ > > And two entries within the new directory: > /sys/kernel/mm/sme/active >

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

2017-04-24 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:17:11PM -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 > --- >

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

2017-04-24 Thread Borislav Petkov
On Thu, Apr 20, 2017 at 12:29:20PM -0500, Tom Lendacky wrote: > Hmmm... and actually if cpu_has(X86_FEATURE_SME) is true then it's a > given that extended_cpuid_level >= 0x801f. So this can be > simplified to just: > > if (cpu_has(c, X86_FEATURE_SME)) { > ... the rest of

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

2017-04-24 Thread Tom Lendacky
On 4/20/2017 11:59 AM, Borislav Petkov wrote: On Tue, Apr 18, 2017 at 04:17:11PM -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

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Tom Lendacky
On 4/24/2017 10:57 AM, Dave Hansen wrote: On 04/24/2017 08:53 AM, Tom Lendacky wrote: On 4/21/2017 4:52 PM, Dave Hansen wrote: On 04/18/2017 02:17 PM, Tom Lendacky wrote: @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Tom Lendacky
On 4/21/2017 4:52 PM, Dave Hansen wrote: On 04/18/2017 02:17 PM, Tom Lendacky wrote: @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr, __phys_addr_symbol(__phys_reloc_hide((unsigned long)(x))) #ifndef __va -#define __va(x)

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Dave Hansen
On 04/24/2017 08:53 AM, Tom Lendacky wrote: > On 4/21/2017 4:52 PM, Dave Hansen wrote: >> On 04/18/2017 02:17 PM, Tom Lendacky wrote: >>> @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void >>> *from, unsigned long vaddr, >>> __phys_addr_symbol(__phys_reloc_hide((unsigned

Re: [PATCH v4 1/3] kexec: Move vmcoreinfo out of the kernel's .bss section

2017-04-24 Thread Michael Holzheu
Am Thu, 20 Apr 2017 19:39:32 +0800 schrieb Xunlei Pang : > As Eric said, > "what we need to do is move the variable vmcoreinfo_note out > of the kernel's .bss section. And modify the code to regenerate > and keep this information in something like the control page. > >