[PATCH v10 01/17] Xen: ACPI: Hide UART used by Xen

2016-04-01 Thread Shannon Zhao
<l...@kernel.org> (supporter:ACPI) CC: linux-a...@vger.kernel.org (open list:ACPI) Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- drivers/acpi/scan.c | 71 + 1 file changed, 71 insertions(+) diff --git a/drivers/acpi/scan.c

[PATCH v10 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-04-01 Thread Shannon Zhao
Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- include/xen/interface/

[PATCH v10 01/17] Xen: ACPI: Hide UART used by Xen

2016-04-01 Thread Shannon Zhao
CC: linux-a...@vger.kernel.org (open list:ACPI) Signed-off-by: Shannon Zhao --- drivers/acpi/scan.c | 71 + 1 file changed, 71 insertions(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 5f28cf7..4d2d9eb 100644 --- a/drivers/acpi/scan.c +++

[PATCH v10 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-04-01 Thread Shannon Zhao
Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 27 +-- 1 file changed, 21

[PATCH v10 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-04-01 Thread Shannon Zhao
Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index 2

[PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-04-01 Thread Shannon Zhao
Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- drivers/xen/Makefile | 1 + drivers/xen/

[PATCH v10 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-04-01 Thread Shannon Zhao
Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- arch/arm/xen/enli

[PATCH v10 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-04-01 Thread Shannon Zhao
Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index 2ecfe4f..9aa8988 100644 --- a/include

[PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-04-01 Thread Shannon Zhao
Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- drivers/xen/Makefile | 1 + drivers/xen/arm-device.c | 141 +++ 2 files

[PATCH v10 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-04-01 Thread Shannon Zhao
Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- arch/arm/xen/enlighten.c | 13 - 1 file changed, 4 insertions(+), 9 deletions

[PATCH v10 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-04-01 Thread Shannon Zhao
Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> ---

[PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-04-01 Thread Shannon Zhao
k patch from Stefano * Refactor AMBA and platform device MMIO map to one file * Use EFI_PARAVIRT to check if it supports XEN EFI * Refactor Xen EFI codes * Address other comments Shannon Zhao (17): Xen: ACPI: Hide UART used by Xen xen/grant-table: Move xlated_setup_gnttab_pages to common pla

[PATCH v10 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-04-01 Thread Shannon Zhao
Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- drivers/xen/xlate_mmu.c | 38 +++--- 1

[PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-04-01 Thread Shannon Zhao
k patch from Stefano * Refactor AMBA and platform device MMIO map to one file * Use EFI_PARAVIRT to check if it supports XEN EFI * Refactor Xen EFI codes * Address other comments Shannon Zhao (17): Xen: ACPI: Hide UART used by Xen xen/grant-table: Move xlated_setup_gnttab_pages to common pla

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-04-01 Thread Shannon Zhao
On 2016/4/1 17:25, Shannon Zhao wrote: > If it really needs is_xen_node(), I will not factor > fdt_find_hyper_node() in patch 11 since it uses flat DT while here it's > going to use unflatten DT. Sorry, I'm wrong. They both use flat DT. But it's no need to factor fdt_find_hyper_nod

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-04-01 Thread Shannon Zhao
On 2016/4/1 17:25, Shannon Zhao wrote: > If it really needs is_xen_node(), I will not factor > fdt_find_hyper_node() in patch 11 since it uses flat DT while here it's > going to use unflatten DT. Sorry, I'm wrong. They both use flat DT. But it's no need to factor fdt_find_hyper_nod

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-04-01 Thread Shannon Zhao
On 2016/3/31 20:42, Mark Rutland wrote: > On Thu, Mar 31, 2016 at 01:44:08PM +0200, Ard Biesheuvel wrote: >> > The heuristic is there to decide whether some DTB image contains a >> > complete description of the platform, or only some data handed over by >> > the bootloader. Arguably, a DT

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-04-01 Thread Shannon Zhao
On 2016/3/31 20:42, Mark Rutland wrote: > On Thu, Mar 31, 2016 at 01:44:08PM +0200, Ard Biesheuvel wrote: >> > The heuristic is there to decide whether some DTB image contains a >> > complete description of the platform, or only some data handed over by >> > the bootloader. Arguably, a DT

[PATCH v9 02/17] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Move xlated_setup_gnttab_pages to common place, so it can be reused by ARM to setup grant table. Rename it to xen_xlate_map_ballooned_pages. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <

[PATCH v9 02/17] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Move xlated_setup_gnttab_pages to common place, so it can be reused by ARM to setup grant table. Rename it to xen_xlate_map_ballooned_pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/x86/xen/grant-table.c | 57

[PATCH v9 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interfac

[PATCH v9 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> When it's a Xen domain0 booting with ACPI, it will supply a /chosen and a /hypervisor node in DT. So check if it needs to enable ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <

[PATCH v9 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao When it's a Xen domain0 booting with ACPI, it will supply a /chosen and a /hypervisor node in DT. So check if it needs to enable ACPI. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Acked-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 12 1 file

[PATCH v9 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index 2ecfe4f..9aa8988

[PATCH v9 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> This patch set adds ACPI support for Xen Dom0 on ARM64. The relevant Xen ACPI on ARM64 design document could be found from [1]. This patch set adds a new FDT node "uefi" under /hypervisor to pass UEFI information. Introduce a bus

[PATCH v9 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> The kernel will get the event-channel IRQ through HVM_PARAM_CALLBACK_IRQ. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- arch/arm/xe

[PATCH v9 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao This patch set adds ACPI support for Xen Dom0 on ARM64. The relevant Xen ACPI on ARM64 design document could be found from [1]. This patch set adds a new FDT node "uefi" under /hypervisor to pass UEFI information. Introduce a bus notifier of AMBA and Platform

[PATCH v9 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao The kernel will get the event-channel IRQ through HVM_PARAM_CALLBACK_IRQ. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/arm/xen/enlighten.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v9 07/17] Xen: ARM: Add support for mapping AMBA device mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a bus_notifier for AMBA bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --

[PATCH v9 07/17] Xen: ARM: Add support for mapping AMBA device mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Add a bus_notifier for AMBA bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- drivers/xen/arm-device.c | 43 +++ 1 file changed, 43

[PATCH v9 11/17] ARM: XEN: Move xen_early_init() before efi_init()

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Move xen_early_init() before efi_init(), then when calling efi_init() could initialize Xen specific UEFI. Check if it runs on Xen hypervisor through the flat dts. Cc: Russell King <li...@arm.linux.org.uk> Signed-off-by: Shannon Zha

[PATCH v9 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <

[PATCH v9 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <

[PATCH v9 11/17] ARM: XEN: Move xen_early_init() before efi_init()

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Move xen_early_init() before efi_init(), then when calling efi_init() could initialize Xen specific UEFI. Check if it runs on Xen hypervisor through the flat dts. Cc: Russell King Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/arm/kernel/setup.c

[PATCH v9 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- arch/arm/xen/enlighten.c | 13 - 1 file changed, 4

[PATCH v9 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 27 +-- 1 file

[PATCH v9 17/17] Xen: EFI: Parse DT parameters for Xen specific UEFI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a new function to parse DT parameters for Xen specific UEFI just like the way for normal UEFI. Then it could reuse the existing codes. If Xen supports EFI, initialize runtime services. CC: Matt Fleming <m...@codeblueprint.co.uk>

[PATCH v9 17/17] Xen: EFI: Parse DT parameters for Xen specific UEFI

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Add a new function to parse DT parameters for Xen specific UEFI just like the way for normal UEFI. Then it could reuse the existing codes. If Xen supports EFI, initialize runtime services. CC: Matt Fleming Signed-off-by: Shannon Zhao Reviewed-by: Matt Fleming Reviewed

[PATCH v9 14/17] XEN: EFI: Move x86 specific codes to architecture directory

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Move x86 specific codes to architecture directory and export those EFI runtime service functions. This will be useful for initializing runtime service on ARM later. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefan

[PATCH v9 14/17] XEN: EFI: Move x86 specific codes to architecture directory

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Move x86 specific codes to architecture directory and export those EFI runtime service functions. This will be useful for initializing runtime service on ARM later. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/x86/xen/efi.c| 112

[PATCH v9 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com>

[PATCH v9 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could scan this to get the UEFI information. CC: Rob Herring <r...@kernel.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Rob Herrin

[PATCH v9 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefan

[PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" <

[PATCH v9 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- drivers/xen/Makefile | 1 + drivers/xen/arm-device.c | 141

[PATCH v9 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could scan this to get the UEFI information. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Rob Herring Reviewed-by: Stefano Stabellini --- Documentation/devicetree/bindings/arm/xe

[PATCH v9 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- drivers/xen/xlate_mmu.c | 38

[PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" (supporter:ACPI) CC: Len Brown (supporte

[PATCH v9 15/17] ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> When running on Xen hypervisor, runtime services are supported through hypercall. Add a Xen specific function to initialize runtime services. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <

[PATCH v9 15/17] ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao When running on Xen hypervisor, runtime services are supported through hypercall. Add a Xen specific function to initialize runtime services. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/arm/include/asm/xen/xen-ops.h | 6 ++ arch/arm/xen

[PATCH v9 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> This new delivery type which is for ARM shares the same value with HVM_PARAM_CALLBACK_TYPE_VECTOR which is for x86. val[15:8] is flag: val[7:0] is a PPI. To the flag, bit 8 stands the interrupt mode is edge(1) or level(0) and bit 9

[PATCH v9 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao This new delivery type which is for ARM shares the same value with HVM_PARAM_CALLBACK_TYPE_VECTOR which is for x86. val[15:8] is flag: val[7:0] is a PPI. To the flag, bit 8 stands the interrupt mode is edge(1) or level(0) and bit 9 stands the interrupt polarity is active low

[PATCH v9 16/17] FDT: Add a helper to get the subnode by given name

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring <r...@kernel.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>

[PATCH v9 16/17] FDT: Add a helper to get the subnode by given name

2016-03-31 Thread Shannon Zhao
From: Shannon Zhao Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini Acked-by: Rob Herring --- drivers/of/fdt.c | 13

Re: [PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-30 Thread Shannon Zhao
On 2016年03月30日 19:22, Julien Grall wrote: > Hi Shannon, > > On 30/03/16 08:38, Shannon Zhao wrote: >> >> >> On 2016/3/30 0:28, Julien Grall wrote: >>> On 24/03/16 14:44, Shannon Zhao wrote: >>>> Make xen_xlate_map_ballooned_pages work with 64K pages

Re: [PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-30 Thread Shannon Zhao
On 2016年03月30日 19:22, Julien Grall wrote: > Hi Shannon, > > On 30/03/16 08:38, Shannon Zhao wrote: >> >> >> On 2016/3/30 0:28, Julien Grall wrote: >>> On 24/03/16 14:44, Shannon Zhao wrote: >>>> Make xen_xlate_map_ballooned_pages work with 64K pages

Re: [PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-30 Thread Shannon Zhao
On 2016/3/30 0:28, Julien Grall wrote: > Hi Shannon, > > On 24/03/16 14:44, Shannon Zhao wrote: >> Make xen_xlate_map_ballooned_pages work with 64K pages. In that case >> Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns >> refer to 4K pages. &

Re: [PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-30 Thread Shannon Zhao
On 2016/3/30 0:28, Julien Grall wrote: > Hi Shannon, > > On 24/03/16 14:44, Shannon Zhao wrote: >> Make xen_xlate_map_ballooned_pages work with 64K pages. In that case >> Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns >> refer to 4K pages. &

Re: [PATCH v7 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-30 Thread Shannon Zhao
On 2016/3/30 0:35, Julien Grall wrote: > Hi Shannon, > > On 24/03/16 14:44, Shannon Zhao wrote: >> When booting with ACPI, it could get the event-channel irq through > > The kernel will always get the event-channel IRQ through > HVM_PARAM_CALLBACK_IRQ. > >

Re: [PATCH v7 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-30 Thread Shannon Zhao
On 2016/3/30 0:35, Julien Grall wrote: > Hi Shannon, > > On 24/03/16 14:44, Shannon Zhao wrote: >> When booting with ACPI, it could get the event-channel irq through > > The kernel will always get the event-channel IRQ through > HVM_PARAM_CALLBACK_IRQ. > >

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-03-30 Thread Shannon Zhao
Hi Will, Mark, On 2016/3/30 0:31, Mark Rutland wrote: > On Tue, Mar 29, 2016 at 05:18:38PM +0100, Will Deacon wrote: >> > On Thu, Mar 24, 2016 at 10:44:31PM +0800, Shannon Zhao wrote: >>> > > When it's a Xen domain0 booting with ACPI, it will supply a /chosen and >&

Re: [PATCH v7 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-03-30 Thread Shannon Zhao
Hi Will, Mark, On 2016/3/30 0:31, Mark Rutland wrote: > On Tue, Mar 29, 2016 at 05:18:38PM +0100, Will Deacon wrote: >> > On Thu, Mar 24, 2016 at 10:44:31PM +0800, Shannon Zhao wrote: >>> > > When it's a Xen domain0 booting with ACPI, it will supply a /chosen and >&

[RESEND PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" <

[RESEND PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
From: Shannon Zhao ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" (supporter:ACPI) CC: Len Brown (supporte

[PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" <

[PATCH v9 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
From: Shannon Zhao ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" (supporter:ACPI) CC: Len Brown (supporte

Re: [PATCH v8 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
On 2016/3/26 1:15, Bjorn Helgaas wrote: > On Fri, Mar 25, 2016 at 04:05:49PM +0800, Shannon Zhao wrote: >> > From: Shannon Zhao <shannon.z...@linaro.org> >> > >> > ACPI 6.0 introduces a new table STAO to list the devices which are used >> > by

Re: [PATCH v8 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-29 Thread Shannon Zhao
On 2016/3/26 1:15, Bjorn Helgaas wrote: > On Fri, Mar 25, 2016 at 04:05:49PM +0800, Shannon Zhao wrote: >> > From: Shannon Zhao >> > >> > ACPI 6.0 introduces a new table STAO to list the devices which are used >> > by Xen and can't be used by Dom0.

[PATCH v8 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-25 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" <

[PATCH v8 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-25 Thread Shannon Zhao
From: Shannon Zhao ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" (supporter:ACPI) CC: Len Brown (supporte

Re: [PATCH v7 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-25 Thread Shannon Zhao
On 2016/3/24 23:08, Rafael J. Wysocki wrote: > On Thu, Mar 24, 2016 at 3:44 PM, Shannon Zhao <shannon.z...@linaro.org> wrote: >> > +static void acpi_get_spcr_uart_addr(void) > static void __init acpi_get_spcr_uart_addr(void) > > I suppose? > > Apart from th

Re: [PATCH v7 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-25 Thread Shannon Zhao
On 2016/3/24 23:08, Rafael J. Wysocki wrote: > On Thu, Mar 24, 2016 at 3:44 PM, Shannon Zhao wrote: >> > +static void acpi_get_spcr_uart_addr(void) > static void __init acpi_get_spcr_uart_addr(void) > > I suppose? > > Apart from this it looks fine. > Thanks, I

[PATCH v7 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-24 Thread Shannon Zhao
<l...@kernel.org> (supporter:ACPI) CC: linux-a...@vger.kernel.org (open list:ACPI) Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- drivers/acpi/scan.c | 68 + 1 file changed, 68 insertions(+) diff --git a/drivers/acpi/scan.c

[PATCH v7 01/17] Xen: ACPI: Hide UART used by Xen

2016-03-24 Thread Shannon Zhao
CC: linux-a...@vger.kernel.org (open list:ACPI) Signed-off-by: Shannon Zhao --- drivers/acpi/scan.c | 68 + 1 file changed, 68 insertions(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 5f28cf7..e96a058 100644 --- a/drivers/acpi/scan.c +++

[PATCH v7 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-03-24 Thread Shannon Zhao
Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- arch/arm/xen/enli

[PATCH v7 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-03-24 Thread Shannon Zhao
Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- arch/arm/xen/enlighten.c | 13 - 1 file changed, 4 insertions(+), 9 deletions

[PATCH v7 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-03-24 Thread Shannon Zhao
wallclock patch from Stefano * Refactor AMBA and platform device MMIO map to one file * Use EFI_PARAVIRT to check if it supports XEN EFI * Refactor Xen EFI codes * Address other comments Shannon Zhao (17): Xen: ACPI: Hide UART used by Xen xen/grant-table: Move xlated_setup_gnttab_pages to common pla

[PATCH v7 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-03-24 Thread Shannon Zhao
wallclock patch from Stefano * Refactor AMBA and platform device MMIO map to one file * Use EFI_PARAVIRT to check if it supports XEN EFI * Refactor Xen EFI codes * Address other comments Shannon Zhao (17): Xen: ACPI: Hide UART used by Xen xen/grant-table: Move xlated_setup_gnttab_pages to common pla

[PATCH v7 02/17] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2016-03-24 Thread Shannon Zhao
Move xlated_setup_gnttab_pages to common place, so it can be reused by ARM to setup grant table. Rename it to xen_xlate_map_ballooned_pages. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- arch/x86/xen/g

[PATCH v7 02/17] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2016-03-24 Thread Shannon Zhao
Move xlated_setup_gnttab_pages to common place, so it can be reused by ARM to setup grant table. Rename it to xen_xlate_map_ballooned_pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/x86/xen/grant-table.c | 57 +-- drivers/xen

[PATCH v7 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2016-03-24 Thread Shannon Zhao
). Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- include/xen/interface/hvm/params.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/xen/interface/hvm/params.h b/include/xen/interface/hvm/pa

[PATCH v7 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2016-03-24 Thread Shannon Zhao
). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/xen/interface/hvm/params.h b/include/xen/interface/hvm/params.h index 70ad208..4d61fc5 100644 --- a/include/xen/interface/hvm

[PATCH v7 07/17] Xen: ARM: Add support for mapping AMBA device mmio

2016-03-24 Thread Shannon Zhao
Add a bus_notifier for AMBA bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- drivers/xen/arm-d

[PATCH v7 07/17] Xen: ARM: Add support for mapping AMBA device mmio

2016-03-24 Thread Shannon Zhao
Add a bus_notifier for AMBA bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- drivers/xen/arm-device.c | 43 +++ 1 file changed, 43 insertions(+) diff --git

[PATCH v7 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-03-24 Thread Shannon Zhao
Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index 2

[PATCH v7 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-03-24 Thread Shannon Zhao
Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index 2ecfe4f..9aa8988 100644 --- a/include

[PATCH v7 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-03-24 Thread Shannon Zhao
Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- drivers/xen/Makefile | 1 + drivers/xen/

[PATCH v7 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-03-24 Thread Shannon Zhao
Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- include/xen/interface/

[PATCH v7 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-03-24 Thread Shannon Zhao
Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 27 +-- 1 file changed, 21

[PATCH v7 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-03-24 Thread Shannon Zhao
Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- drivers/xen/Makefile | 1 + drivers/xen/arm-device.c | 141 +++ 2 files

[PATCH v7 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-24 Thread Shannon Zhao
When booting with ACPI, it could get the event-channel irq through HVM_PARAM_CALLBACK_IRQ. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> --- arch/arm/xen/enlighten.c | 36

[PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-24 Thread Shannon Zhao
Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> ---

[PATCH v7 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-24 Thread Shannon Zhao
When booting with ACPI, it could get the event-channel irq through HVM_PARAM_CALLBACK_IRQ. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/arm/xen/enlighten.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch/arm

[PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-24 Thread Shannon Zhao
Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- drivers/xen/xlate_mmu.c | 26 -- 1 file changed

[PATCH v7 14/17] XEN: EFI: Move x86 specific codes to architecture directory

2016-03-24 Thread Shannon Zhao
Move x86 specific codes to architecture directory and export those EFI runtime service functions. This will be useful for initializing runtime service on ARM later. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com&g

[PATCH v7 16/17] FDT: Add a helper to get the subnode by given name

2016-03-24 Thread Shannon Zhao
Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring <r...@kernel.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Acked-by: Stefano Stabellini <stefano.stabell..

[PATCH v7 14/17] XEN: EFI: Move x86 specific codes to architecture directory

2016-03-24 Thread Shannon Zhao
Move x86 specific codes to architecture directory and export those EFI runtime service functions. This will be useful for initializing runtime service on ARM later. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/x86/xen/efi.c| 112

[PATCH v7 16/17] FDT: Add a helper to get the subnode by given name

2016-03-24 Thread Shannon Zhao
Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini Acked-by: Rob Herring --- drivers/of/fdt.c | 13 + include

[PATCH v7 11/17] ARM: XEN: Move xen_early_init() before efi_init()

2016-03-24 Thread Shannon Zhao
Move xen_early_init() before efi_init(), then when calling efi_init() could initialize Xen specific UEFI. Check if it runs on Xen hypervisor through the flat dts. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com&g

[PATCH v7 17/17] Xen: EFI: Parse DT parameters for Xen specific UEFI

2016-03-24 Thread Shannon Zhao
Add a new function to parse DT parameters for Xen specific UEFI just like the way for normal UEFI. Then it could reuse the existing codes. If Xen supports EFI, initialize runtime services. CC: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org&

<    1   2   3   4   5   >