Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-06 Thread Zhang, Jonathan Zhixiong



On 8/5/2015 9:13 AM, Matt Fleming wrote:

On Wed, 05 Aug, at 05:10:00PM, Matt Fleming wrote:

On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:


Yes, absolutely. It has been in my mind, sorry I was tied up in the last
few days. I wonder what I may missed, I certainly do x86 build test with
versions of the patch set.

I will try today and report back.


No problem.

I'd suggest moving the implementation into include/acpi/apei.h and
leaving it as static inline instead of implementing it out of line in
arch/x86/kernel/acpi/apei.c.


Yeah, I didn't mean include/acpi/apei.h but the architecture-specific
equivalent.


Thank you Matt. It builds well on x86 with default configuration, but
not if APEI feature is turned on. This is my fault.
I just sent a new version of the patch set out.

--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-06 Thread Zhang, Jonathan Zhixiong



On 8/5/2015 9:13 AM, Matt Fleming wrote:

On Wed, 05 Aug, at 05:10:00PM, Matt Fleming wrote:

On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:


Yes, absolutely. It has been in my mind, sorry I was tied up in the last
few days. I wonder what I may missed, I certainly do x86 build test with
versions of the patch set.

I will try today and report back.


No problem.

I'd suggest moving the implementation into include/acpi/apei.h and
leaving it as static inline instead of implementing it out of line in
arch/x86/kernel/acpi/apei.c.


Yeah, I didn't mean include/acpi/apei.h but the architecture-specific
equivalent.


Thank you Matt. It builds well on x86 with default configuration, but
not if APEI feature is turned on. This is my fault.
I just sent a new version of the patch set out.

--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Wed, 05 Aug, at 05:10:00PM, Matt Fleming wrote:
> On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:
> > 
> > Yes, absolutely. It has been in my mind, sorry I was tied up in the last
> > few days. I wonder what I may missed, I certainly do x86 build test with
> > versions of the patch set.
> > 
> > I will try today and report back.
> 
> No problem.
> 
> I'd suggest moving the implementation into include/acpi/apei.h and
> leaving it as static inline instead of implementing it out of line in
> arch/x86/kernel/acpi/apei.c.

Yeah, I didn't mean include/acpi/apei.h but the architecture-specific
equivalent.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:
> 
> Yes, absolutely. It has been in my mind, sorry I was tied up in the last
> few days. I wonder what I may missed, I certainly do x86 build test with
> versions of the patch set.
> 
> I will try today and report back.

No problem.

I'd suggest moving the implementation into include/acpi/apei.h and
leaving it as static inline instead of implementing it out of line in
arch/x86/kernel/acpi/apei.c.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Zhang, Jonathan Zhixiong


On 8/5/2015 2:21 AM, Matt Fleming wrote:

On Tue, 04 Aug, at 08:41:36AM, Zhang, Jonathan Zhixiong wrote:


On 8/3/2015 9:25 PM, Borislav Petkov wrote:

On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:

Rafael, Boris?


The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov 

Thank you Boris/Matt/Will for the support.


Jonathan, if you fixup the compiler error in PATCH 2 I'll take this
series through the EFI tree.

Yes, absolutely. It has been in my mind, sorry I was tied up in the last
few days. I wonder what I may missed, I certainly do x86 build test with
versions of the patch set.

I will try today and report back.

--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Tue, 04 Aug, at 06:25:52AM, Borislav Petkov wrote:
> On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
> > Rafael, Boris?
> 
> The ghes.c change looks fine I guess. The whole patchset makes sense
> now, with the arch bits extracted. So
> 
> Acked-by: Borislav Petkov 
 
Thanks Boris.

> However, we probably should work towards adhering to EFI memory
> attributes on x86, long term, as we talked. But that's a future thing.

Yeah, it's on my TODO list.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Tue, 04 Aug, at 08:41:36AM, Zhang, Jonathan Zhixiong wrote:
> 
> On 8/3/2015 9:25 PM, Borislav Petkov wrote:
> >On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
> >>Rafael, Boris?
> >
> >The ghes.c change looks fine I guess. The whole patchset makes sense
> >now, with the arch bits extracted. So
> >
> >Acked-by: Borislav Petkov 
> Thank you Boris/Matt/Will for the support.

Jonathan, if you fixup the compiler error in PATCH 2 I'll take this
series through the EFI tree.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Tue, 04 Aug, at 08:41:36AM, Zhang, Jonathan Zhixiong wrote:
 
 On 8/3/2015 9:25 PM, Borislav Petkov wrote:
 On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
 Rafael, Boris?
 
 The ghes.c change looks fine I guess. The whole patchset makes sense
 now, with the arch bits extracted. So
 
 Acked-by: Borislav Petkov b...@suse.de
 Thank you Boris/Matt/Will for the support.

Jonathan, if you fixup the compiler error in PATCH 2 I'll take this
series through the EFI tree.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Tue, 04 Aug, at 06:25:52AM, Borislav Petkov wrote:
 On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
  Rafael, Boris?
 
 The ghes.c change looks fine I guess. The whole patchset makes sense
 now, with the arch bits extracted. So
 
 Acked-by: Borislav Petkov b...@suse.de
 
Thanks Boris.

 However, we probably should work towards adhering to EFI memory
 attributes on x86, long term, as we talked. But that's a future thing.

Yeah, it's on my TODO list.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Zhang, Jonathan Zhixiong


On 8/5/2015 2:21 AM, Matt Fleming wrote:

On Tue, 04 Aug, at 08:41:36AM, Zhang, Jonathan Zhixiong wrote:


On 8/3/2015 9:25 PM, Borislav Petkov wrote:

On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:

Rafael, Boris?


The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov b...@suse.de

Thank you Boris/Matt/Will for the support.


Jonathan, if you fixup the compiler error in PATCH 2 I'll take this
series through the EFI tree.

Yes, absolutely. It has been in my mind, sorry I was tied up in the last
few days. I wonder what I may missed, I certainly do x86 build test with
versions of the patch set.

I will try today and report back.

--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:
 
 Yes, absolutely. It has been in my mind, sorry I was tied up in the last
 few days. I wonder what I may missed, I certainly do x86 build test with
 versions of the patch set.
 
 I will try today and report back.

No problem.

I'd suggest moving the implementation into include/acpi/apei.h and
leaving it as static inline instead of implementing it out of line in
arch/x86/kernel/acpi/apei.c.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-05 Thread Matt Fleming
On Wed, 05 Aug, at 05:10:00PM, Matt Fleming wrote:
 On Wed, 05 Aug, at 08:58:52AM, Zhang, Jonathan Zhixiong wrote:
  
  Yes, absolutely. It has been in my mind, sorry I was tied up in the last
  few days. I wonder what I may missed, I certainly do x86 build test with
  versions of the patch set.
  
  I will try today and report back.
 
 No problem.
 
 I'd suggest moving the implementation into include/acpi/apei.h and
 leaving it as static inline instead of implementing it out of line in
 arch/x86/kernel/acpi/apei.c.

Yeah, I didn't mean include/acpi/apei.h but the architecture-specific
equivalent.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-04 Thread Zhang, Jonathan Zhixiong


On 8/3/2015 9:25 PM, Borislav Petkov wrote:

On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:

Rafael, Boris?


The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov 

Thank you Boris/Matt/Will for the support.



However, we probably should work towards adhering to EFI memory
attributes on x86, long term, as we talked. But that's a future thing.

Thanks.



--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-04 Thread Zhang, Jonathan Zhixiong


On 8/3/2015 9:25 PM, Borislav Petkov wrote:

On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:

Rafael, Boris?


The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov b...@suse.de

Thank you Boris/Matt/Will for the support.



However, we probably should work towards adhering to EFI memory
attributes on x86, long term, as we talked. But that's a future thing.

Thanks.



--
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Borislav Petkov
On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
> Rafael, Boris?

The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov 

However, we probably should work towards adhering to EFI memory
attributes on x86, long term, as we talked. But that's a future thing.

Thanks.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Matt Fleming
On Mon, 03 Aug, at 12:26:58PM, Will Deacon wrote:
> 
> I guess this is all going via Matt's tree? I'm happy to take the new
> memory type in arch/arm64/ if there's nothing currently queued, but I
> suspect it makes more sense for it to stay together.

Right, it probably does make sense to take this through a single tree.

I'm still waiting for the ACPI folks to chime in on whether this series
makes sense, and in particular I'd like to hear from people that have
touched ghes.c in the past.

Rafael, Boris?

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Will Deacon
Hi Jonathan,

On Thu, Jul 30, 2015 at 10:35:04PM +0100, Jonathan (Zhixiong) Zhang wrote:
> From: "Jonathan (Zhixiong) Zhang" 
> 
> On a platform with APEI (ACPI Platform Error Interface) enabled, firmware
> updates a memory region with hardware error record using nocache
> attribute. When OS reads the region, since it maps the region with
> cacahed attribute even though EFI memory map defines this region as
> uncached, OS gets stale data and errorneously reports there is no new
> HW error.
> 
> When ghes driver maps the memory region, it uses the cache attribute
> according to EFI memory map, if EFI memory map feature is enabled
> at runtime.
> 
> Since both arch/x86 and arch/ia64 implemented architecture agnostic EFI
> memory map attribue lookup function efi_memattributes(), the code is
> moved from arch/x86 into EFI subsystem and is declared as __weak; archs
> other than ia64 should not override the default implementation.
> 
> V9:
> 1. Rebased to arm64-upstream-14543 of arm64/master.
> 2. Match strict MM type in arch_apei_get_mem_attribute().

I guess this is all going via Matt's tree? I'm happy to take the new
memory type in arch/arm64/ if there's nothing currently queued, but I
suspect it makes more sense for it to stay together.

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Matt Fleming
On Mon, 03 Aug, at 12:26:58PM, Will Deacon wrote:
 
 I guess this is all going via Matt's tree? I'm happy to take the new
 memory type in arch/arm64/ if there's nothing currently queued, but I
 suspect it makes more sense for it to stay together.

Right, it probably does make sense to take this through a single tree.

I'm still waiting for the ACPI folks to chime in on whether this series
makes sense, and in particular I'd like to hear from people that have
touched ghes.c in the past.

Rafael, Boris?

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Borislav Petkov
On Mon, Aug 03, 2015 at 05:23:54PM +0100, Matt Fleming wrote:
 Rafael, Boris?

The ghes.c change looks fine I guess. The whole patchset makes sense
now, with the arch bits extracted. So

Acked-by: Borislav Petkov b...@suse.de

However, we probably should work towards adhering to EFI memory
attributes on x86, long term, as we talked. But that's a future thing.

Thanks.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V9 0/5] map GHES memory region according to EFI memory map

2015-08-03 Thread Will Deacon
Hi Jonathan,

On Thu, Jul 30, 2015 at 10:35:04PM +0100, Jonathan (Zhixiong) Zhang wrote:
 From: Jonathan (Zhixiong) Zhang zjzh...@codeaurora.org
 
 On a platform with APEI (ACPI Platform Error Interface) enabled, firmware
 updates a memory region with hardware error record using nocache
 attribute. When OS reads the region, since it maps the region with
 cacahed attribute even though EFI memory map defines this region as
 uncached, OS gets stale data and errorneously reports there is no new
 HW error.
 
 When ghes driver maps the memory region, it uses the cache attribute
 according to EFI memory map, if EFI memory map feature is enabled
 at runtime.
 
 Since both arch/x86 and arch/ia64 implemented architecture agnostic EFI
 memory map attribue lookup function efi_memattributes(), the code is
 moved from arch/x86 into EFI subsystem and is declared as __weak; archs
 other than ia64 should not override the default implementation.
 
 V9:
 1. Rebased to arm64-upstream-14543 of arm64/master.
 2. Match strict MM type in arch_apei_get_mem_attribute().

I guess this is all going via Matt's tree? I'm happy to take the new
memory type in arch/arm64/ if there's nothing currently queued, but I
suspect it makes more sense for it to stay together.

Will
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/