Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Andy Lutomirski
On Wed, Apr 27, 2016 at 8:31 AM, Borislav Petkov wrote: > On Wed, Apr 27, 2016 at 08:12:56AM -0700, Andy Lutomirski wrote: >> I think there are some errata > > Isn't that addressed by the first branch of the if-test in pat_init(): > > if ((c->x86_vendor == X86_VENDOR_INTEL) && >

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Borislav Petkov
On Wed, Apr 27, 2016 at 08:12:56AM -0700, Andy Lutomirski wrote: > I think there are some errata Isn't that addressed by the first branch of the if-test in pat_init(): if ((c->x86_vendor == X86_VENDOR_INTEL) && (((c->x86 == 0x6) && (c->x86_model <= 0xd)) || ((c->x

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Andy Lutomirski
On Wed, Apr 27, 2016 at 8:05 AM, Tom Lendacky wrote: > On 04/27/2016 09:47 AM, Andy Lutomirski wrote: >> On Wed, Apr 27, 2016 at 7:44 AM, Tom Lendacky >> wrote: >>> On 04/27/2016 09:33 AM, Andy Lutomirski wrote: On Tue, Apr 26, 2016 at 3:56 PM, Tom Lendacky wrote: > For AMD proce

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Tom Lendacky
On 04/27/2016 09:47 AM, Andy Lutomirski wrote: > On Wed, Apr 27, 2016 at 7:44 AM, Tom Lendacky wrote: >> On 04/27/2016 09:33 AM, Andy Lutomirski wrote: >>> On Tue, Apr 26, 2016 at 3:56 PM, Tom Lendacky >>> wrote: For AMD processors that support PAT, set the write-protect cache mode (_P

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Andy Lutomirski
On Wed, Apr 27, 2016 at 7:44 AM, Tom Lendacky wrote: > On 04/27/2016 09:33 AM, Andy Lutomirski wrote: >> On Tue, Apr 26, 2016 at 3:56 PM, Tom Lendacky >> wrote: >>> For AMD processors that support PAT, set the write-protect cache mode >>> (_PAGE_CACHE_MODE_WP) entry to the actual write-protect v

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Tom Lendacky
On 04/27/2016 09:33 AM, Andy Lutomirski wrote: > On Tue, Apr 26, 2016 at 3:56 PM, Tom Lendacky wrote: >> For AMD processors that support PAT, set the write-protect cache mode >> (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). > > What's the purpose of using the WP memory type

Re: [RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-27 Thread Andy Lutomirski
On Tue, Apr 26, 2016 at 3:56 PM, Tom Lendacky wrote: > For AMD processors that support PAT, set the write-protect cache mode > (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). What's the purpose of using the WP memory type? --Andy _

[RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-26 Thread Tom Lendacky
For AMD processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/pat.c b/arch/

[RFC PATCH v1 01/18] x86: Set the write-protect cache mode for AMD processors

2016-04-26 Thread Tom Lendacky
For AMD processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/pat.c b/arch/