Re: [PATCH 2/2] acpi, apei: use appropriate pgprot_t to map GHES memory

2015-08-25 Thread Zhang, Jonathan Zhixiong
On 8/25/2015 1:59 AM, Ingo Molnar wrote: * Zhang, Jonathan Zhixiong wrote: On 8/22/2015 2:24 AM, Ingo Molnar wrote: * Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by f

Re: [PATCH 2/2] acpi, apei: use appropriate pgprot_t to map GHES memory

2015-08-24 Thread Zhang, Jonathan Zhixiong
On 8/22/2015 2:24 AM, Ingo Molnar wrote: * Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by firmware in GHES memory region. On an arm64 platform, firmware updates GHES memory region with

Re: [PATCH] acpi, apei, arm64: APEI initial support for aarch64.

2015-08-17 Thread Zhang, Jonathan Zhixiong
On 8/17/2015 3:01 AM, Will Deacon wrote: On Fri, Aug 14, 2015 at 01:35:53PM +0100, fu@linaro.org wrote: From: Tomasz Nowicki This commit provides APEI arch-specific bits for aarch64 Changelog: Fu Wei: Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h. Delete a

Re: [PATCH 2/2] acpi, apei: use appropriate pgprot_t to map GHES memory

2015-08-17 Thread Zhang, Jonathan Zhixiong
On 8/17/2015 6:13 AM, Matt Fleming wrote: On Fri, 14 Aug, at 03:37:30PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by firmware in GHES memory region. On an arm64 platform, firmware updat

Re: [PATCH V2 1/2] arm64: apei: implement arch_apei_get_mem_attributes()

2015-08-17 Thread Zhang, Jonathan Zhixiong
On 8/17/2015 6:05 AM, Matt Fleming wrote: On Fri, 14 Aug, at 03:37:29PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" Table 8 of UEFI 2.5 section 2.3.6.1 defines mappings from EFI memory types to MAIR attribute encodings for arm64. If the physical address has memory at

Re: [PATCH 2/2] acpi, apei: use appropriate pgprot_t to map GHES memory

2015-08-14 Thread Zhang, Jonathan Zhixiong
On 8/13/2015 4:14 AM, Will Deacon wrote: On Thu, Aug 13, 2015 at 10:24:32AM +0100, Matt Fleming wrote: On Thu, 13 Aug, at 10:19:17AM, Ingo Molnar wrote: * Matt Fleming wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is update

Re: [PATCH 1/2] arm64: apei: implement arch_apei_get_mem_attributes()

2015-08-14 Thread Zhang, Jonathan Zhixiong
On 8/13/2015 1:22 AM, Ingo Molnar wrote: * Matt Fleming wrote: From: "Jonathan (Zhixiong) Zhang" Table 8 of UEFI 2.5 section 2.3.6.1 defines mappings from EFI memory types to MAIR attribute encodings for arm64. If the physical address has memory attributes defined by EFI memmap as EFI_ME

Re: [PATCH] acpi, apei, arm64: APEI initial support for aarch64.

2015-08-14 Thread Zhang, Jonathan Zhixiong
+ static bool param_acpi_off __initdata; static bool param_acpi_force __initdata; -- 1.9.1 I tested this patch on an arm64 platform, the APEI functionalities work as expected. Tested-by: Jonathan (Zhixiong) Zhang -- Jonathan (Zhixiong) Zhang The Qualcomm Innovation Center, Inc. is a member of

Re: [PATCH V10 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-08-08 Thread Zhang, Jonathan Zhixiong
On 8/8/2015 1:11 AM, Ard Biesheuvel wrote: On 7 August 2015 at 20:57, Matt Fleming wrote: On Fri, 07 Aug, at 11:16:03AM, Zhang, Jonathan Zhixiong wrote: On some (future) arm64 platforms, APEI/GHES region may have full coherent access by platform. In such case, the APEI/GHES region have the

Re: [PATCH V10 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-08-07 Thread Zhang, Jonathan Zhixiong
On 8/7/2015 2:50 AM, Ard Biesheuvel wrote: On 7 August 2015 at 11:37, Matt Fleming wrote: On Fri, 07 Aug, at 11:00:17AM, Ard Biesheuvel wrote: The EFI memory types are not exclusive, and so many regions will have all of the above set. The UEFI spec does not define how to interpret these sup

Re: [PATCH 4/8] efi: x86: rearrange efi_mem_attributes()

2015-08-07 Thread Zhang, Jonathan Zhixiong
Thank you Matt for your help. I tried to find the cover letter and patch 1, 2, 3 of the patch set. But I did not find them. Probably the subject has typo? I appreciate that you re-post the patch set to get more feed backs, I just wanted to be sure. -- Jonathan (Zhixiong) Zhang The Qualcomm Innova

Re: [PATCH V10 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-08-07 Thread Zhang, Jonathan Zhixiong
Thanks for the review, Ard. Comments inline below. On 8/7/2015 2:00 AM, Ard Biesheuvel wrote: On 6 August 2015 at 15:40, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" Table 8 of UEFI 2.5 section 2.3.6.1 defines mappings from EFI memory types to MAIR attribute encodings f

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

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

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 su

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-28 Thread Zhang, Jonathan Zhixiong
On 7/27/2015 2:54 AM, Matt Fleming wrote: On Mon, 2015-07-27 at 10:45 +0100, Will Deacon wrote: That bit's fine. The weird bit is: pgprot_t prot; prot = efi_mem_attributes(addr); Since that's putting the arch-independent format into the pg_prot. Oops, missed that. Yeah that's funky.

Re: [PATCH V8 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-28 Thread Zhang, Jonathan Zhixiong
On 7/27/2015 3:03 AM, Catalin Marinas wrote: On Sat, Jul 25, 2015 at 12:51:08AM +0100, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" Table 8 of UEFI 2.5 section 2.3.6.1 defines mappings from EFI memory types to MAIR attribute encodings for arm64. If the physical address h

Re: [PATCH V8 3/5] arm64: mm: add PROT_DEVICE_nGnRnE and PROT_NORMAL_WT

2015-07-28 Thread Zhang, Jonathan Zhixiong
On 7/27/2015 2:19 AM, Catalin Marinas wrote: On Sat, Jul 25, 2015 at 12:51:07AM +0100, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" UEFI spec 2.5 section 2.3.6.1 defines that EFI_MEMORY_[UC|WC|WT|WB] are possible EFI memory types for AArch64. Each of those EFI memory ty

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/23/2015 7:59 PM, Hanjun Guo wrote: On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection

Re: [PATCH V7 3/5] arm64: mm: add PROT_DEVICE_nGnRnE and PROT_NORMAL_WT

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/24/2015 9:15 AM, Catalin Marinas wrote: On Tue, Jul 21, 2015 at 10:59:18PM +0100, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" UEFI spec 2.5 section 2.3.6.1 defines that EFI_MEMORY_[UC|WC|WT|WB] are possible EFI memory types for AArch64. Each of those EFI memory type

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/24/2015 9:26 AM, Will Deacon wrote: On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git a/arch/arm64/include/asm/acpi.h b/arch/

Re: [PATCH 1/2] efi: parse vendor proprietary CPER section

2015-07-22 Thread Zhang, Jonathan Zhixiong
Thank you Borislav for your help. On 7/22/2015 12:30 AM, Borislav Petkov wrote: On Tue, Jul 21, 2015 at 04:36:46PM -0700, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" UEFI spec allows for non-standard section in Common Platform Error Record. This is defined in section N.

Re: [PATCH V6 1/4] efi: x86: rearrange efi_mem_attributes()

2015-07-22 Thread Zhang, Jonathan Zhixiong
Appreciate Matt for your ack. On 7/22/2015 4:11 AM, Matt Fleming wrote: On Mon, 20 Jul, at 05:32:36PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" x86 and ia64 implement efi_mem_attributes() differently. This function needs to be available for other arch (such as arm64)

Re: [PATCH V6 2/4] x86: acpi: implement arch_apei_get_mem_attributes()

2015-07-22 Thread Zhang, Jonathan Zhixiong
Thank you Matt for the great feedback. On 7/22/2015 5:09 AM, Matt Fleming wrote: On Mon, 20 Jul, at 05:32:37PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" ... to allow arch specific implementation of getting page protection type associated with a physical address. If

Re: [PATCH V6 3/4] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-21 Thread Zhang, Jonathan Zhixiong
Thanks Will. I will create a new patch in this patch set to supplement arm64's page protection type definitions accordingly to meet the needs as defined in UEFI 2.5 table 8. More comments inline... On 7/21/2015 8:08 AM, Will Deacon wrote: On Tue, Jul 21, 2015 at 01:32:38AM +0100, Jonathan (Zhixi

Re: [PATCH V3 4/4] acpi, apei: use EFI memmap to map GHES memory

2015-07-20 Thread Zhang, Jonathan Zhixiong
Hi Matt/Borislav, thanks for the discussion. I am sorry that somehow I did not see this message in my inbox. I found it by surprise through an internet search. On Mon, 22 Jun, at 06:11:31AM, Matt Fleming wrote: Right, but see my previous comment about x86 discarding a bunch of attributes for m

Re: [PATCH V5 3/4] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-20 Thread Zhang, Jonathan Zhixiong
Thanks for the clarification, Will. On 7/17/2015 2:43 AM, Will Deacon wrote: On Fri, Jul 17, 2015 at 02:37:00AM +0100, Zhang, Jonathan Zhixiong wrote: On 7/16/2015 10:18 AM, Will Deacon wrote: On Wed, Jul 15, 2015 at 01:31:55AM +0100, Jonathan (Zhixiong) Zhang wrote: +pgprot_t

Re: [PATCH V5 3/4] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-20 Thread Zhang, Jonathan Zhixiong
Thanks for the feedback, Hanjun. On 7/17/2015 3:06 AM, Hanjun Guo wrote: On 07/17/2015 09:37 AM, Zhang, Jonathan Zhixiong wrote: Thank you Will for the feedback. Pls. see comments below. On 7/16/2015 10:18 AM, Will Deacon wrote: On Wed, Jul 15, 2015 at 01:31:55AM +0100, Jonathan (Zhixiong

Re: [PATCH V5 3/4] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-16 Thread Zhang, Jonathan Zhixiong
Thank you Will for the feedback. Pls. see comments below. On 7/16/2015 10:18 AM, Will Deacon wrote: On Wed, Jul 15, 2015 at 01:31:55AM +0100, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC

Re: [PATCH V4 1/4] efi: x86: rearrange efi_mem_attributes()

2015-06-15 Thread Zhang, Jonathan Zhixiong
On 6/15/2015 10:09 AM, Matt Fleming wrote: On Fri, 12 Jun, at 06:01:44PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" x86 and ia64 implement efi_mem_attributes() differently. This function needs to be available for other arch (such as arm64) as well, such as for the pur

Re: [PATCH V3 1/4] x86: acpi: define uncached page flag

2015-06-12 Thread Zhang, Jonathan Zhixiong
On 6/12/2015 12:52 AM, Ingo Molnar wrote: * Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" This definition is used in APEI code when needing to map pages as uncached. Signed-off-by: Jonathan (Zhixiong) Zhang --- arch/x86/include/asm/acpi.h | 4 1 file changed

Re: [PATCH V3 4/4] acpi, apei: use EFI memmap to map GHES memory

2015-06-12 Thread Zhang, Jonathan Zhixiong
On 6/12/2015 9:29 AM, Borislav Petkov wrote: On Thu, Jun 11, 2015 at 11:26:00AM -0700, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by firmware in GHES memory region. When firmware updated

Re: [PATCH V2 3/3] acpi, apei: use EFI memmap to map GHES memory

2015-06-05 Thread Zhang, Jonathan Zhixiong
On 6/5/2015 10:12 AM, Borislav Petkov wrote: On Fri, Jun 05, 2015 at 10:05:13AM -0700, Zhang, Jonathan Zhixiong wrote: What is DDR? I think this needs to be clarified first before we go any further. I thought the word "memory" might be confusing, because there are So you mean

Re: [PATCH V2 3/3] acpi, apei: use EFI memmap to map GHES memory

2015-06-05 Thread Zhang, Jonathan Zhixiong
On 6/5/2015 9:50 AM, Borislav Petkov wrote: On Fri, Jun 05, 2015 at 09:43:26AM -0700, Zhang, Jonathan Zhixiong wrote: Thanks Matt for the review. Yes, you are right on, I am following this: modify ghes_ioremap_* to query the EFI memmap (if it's available at runtime) to lookup the co

Re: [PATCH V2 3/3] acpi, apei: use EFI memmap to map GHES memory

2015-06-05 Thread Zhang, Jonathan Zhixiong
Thank you Borislav for the review. Pls. see comments inline... On 6/5/2015 3:25 AM, Borislav Petkov wrote: On Fri, Jun 05, 2015 at 10:57:01AM +0100, Matt Fleming wrote: [ Cc'ing Boris and Tony. Folks original patch is here, https://lkml.kernel.org/r/1433185940-24770-4-git-send-email-zjzh...

Re: [PATCH V2 1/3] efi: arch, x86: arch, ia64: move efi_mem_attributes()

2015-06-05 Thread Zhang, Jonathan Zhixiong
Sure, I will got with B with clear comment. Thanks, Jonathan On 6/5/2015 2:23 AM, Matt Fleming wrote: On Tue, 02 Jun, at 05:09:14PM, Zhang, Jonathan Zhixiong wrote: Thank you for the feedback, Matt. Given that IA64 does not set EFI_MEMMAP, it appears to me there are following options: A

Re: [PATCH V2 3/3] acpi, apei: use EFI memmap to map GHES memory

2015-06-05 Thread Zhang, Jonathan Zhixiong
Thanks Matt for the review. Yes, you are right on, I am following this: > modify ghes_ioremap_* to query the EFI memmap (if > it's available at runtime) to lookup the correct mapping attributes. Jonathan On 6/5/2015 2:57 AM, Matt Fleming wrote: [ Cc'ing Boris and Tony. Folks original patch is h

Re: [PATCH V2 1/3] efi: arch, x86: arch, ia64: move efi_mem_attributes()

2015-06-02 Thread Zhang, Jonathan Zhixiong
Thank you for the feedback, Matt. Given that IA64 does not set EFI_MEMMAP, it appears to me there are following options: A. Keep status quota and copy x86's efi_mem_attributes() code to arm64. B. In efi subsystem, provide week default efi_mem_attributes(). In the mean time, IA64 continues to have

Re: [PATCH 1/2] efi: arch, x86: arch, ia64: rearrange EFI memmap related functions

2015-05-27 Thread Zhang, Jonathan Zhixiong
Thank you Matt very much for the code review! Pls. see comments inline. On 5/27/2015 5:31 AM, Matt Fleming wrote: On Mon, 04 May, at 02:02:14PM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" Both x86 and ia64 implemented efi_mem_attributs function, which is architecture a