All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-01 15:48 Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-01 15:48 UTC (permalink / raw)
  To: linux-arm-kernel, stefano.stabellini
  Cc: devicetree, linux-efi, catalin.marinas, will.deacon,
	linux-kernel, peter.huangpeng, julien.grall, david.vrabel,
	zhaoshenglong, xen-devel, 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 bus to map
the new added device's MMIO space. Make Xen domain use
xlated_setup_gnttab_pages to setup grant table and a new hypercall to
get event-channel irq.

Regarding the initialization flow of Linux kernel, it needs to move
xen_early_init() before efi_init(). Then xen_early_init() will check
whether it runs on Xen through the /hypervisor node and efi_init() will
call a new function fdt_find_xen_uefi_params(), to parse those
xen,uefi-* parameters just like the existing efi_get_fdt_params().

And in arm64_enable_runtime_services() it will check whether it runs on
Xen and call another new function xen_efi_runtime_setup() to setup
runtime service instead of efi_native_runtime_setup(). The
xen_efi_runtime_setup() will assign the runtime function pointers with
the functions of driver/xen/efi.c.

And since we pass a /hypervisor node and a /chosen node to Dom0, it
needs to check whether the DTS only contains a /hypervisor node and a
/chosen node in acpi_boot_table_init().

Patches are tested on FVP base model. They can be fetched from[2].

Thanks,
Shannon

[1] http://lists.xen.org/archives/html/xen-devel/2015-11/msg00488.html
[2] https://git.linaro.org/people/shannon.zhao/linux-mainline.git ACPI_XEN_ARM_Linux_V10

Changes since v9:
* address Rafael's comments on patch 1
* check the compatible string of hypervisor node in patch 12

Changes since v8:
* rebased on v4.6-rc1
* print UART device address (PATCH 1)
* use xen_for_each_gfn (PATCH 3)
* reduce indentation by inverting the condition (PATCH 10)
* move xen_early_init() before efi_init() as well for ARM (PATCH 11)
* sync the document with Xen (PATCH 13)

Changes since v7:
* add __init prefix for acpi_get_spcr_uart_addr (PATCH 1)

Changes since v6:
* rebase on linux master
* refactor codes as acpi_get_spcr_uart_addr (PATCH 1)
* sync with Xen (patch 9)

Changes since v5:
* rebase on linux master
* use acpi_dev_resource_memory to parse the device memory info(patch 1)
* sync with Xen (patch 9)

Changes since v4:
* rebase on linux master
* move the check acpi_device_should_be_hidden into
  acpi_bus_type_and_status (patch 1)
* use existing function fdt_subnode_offset (patch 16)

Changes since v3:
* rebase on linux master
* print a warning when there is no SPCR table
* rephase the commit message of PATCH 3
* rephase the words of PATCH 13
* use strcmp and factor the function in PATCH 16
* Add several ACKs and RBs, thanks a lot


Changes since v2:
* Use 0 to check if it should ignore the UART
* Fix the use of page_to_xen_pfn
* Factor ACPI and DT parts in xen_guest_init
* Check "uefi" node by full path
* Fix the statement of Documentation/devicetree/bindings/arm/xen.txt

Changes since v1:
* Rebase on linux mainline and 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 place
  Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn
  arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table
  xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio
  Xen: ARM: Add support for mapping platform device mmio
  Xen: ARM: Add support for mapping AMBA device mmio
  Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen
  xen/hvm/params: Add a new delivery type for event-channel in
    HVM_PARAM_CALLBACK_IRQ
  arm/xen: Get event-channel irq through HVM_PARAM when booting with
    ACPI
  ARM: XEN: Move xen_early_init() before efi_init()
  ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI
  ARM: Xen: Document UEFI support on Xen ARM virtual platforms
  XEN: EFI: Move x86 specific codes to architecture directory
  ARM64: XEN: Add a function to initialize Xen specific UEFI runtime
    services
  FDT: Add a helper to get the subnode by given name
  Xen: EFI: Parse DT parameters for Xen specific UEFI

 Documentation/devicetree/bindings/arm/xen.txt |  35 +++++
 arch/arm/include/asm/xen/xen-ops.h            |   6 +
 arch/arm/kernel/setup.c                       |   2 +-
 arch/arm/xen/Makefile                         |   1 +
 arch/arm/xen/efi.c                            |  40 ++++++
 arch/arm/xen/enlighten.c                      | 109 +++++++++++----
 arch/arm64/include/asm/xen/xen-ops.h          |   6 +
 arch/arm64/kernel/acpi.c                      |  14 +-
 arch/arm64/kernel/setup.c                     |   2 +-
 arch/arm64/xen/Makefile                       |   1 +
 arch/x86/xen/efi.c                            | 112 ++++++++++++++++
 arch/x86/xen/grant-table.c                    |  57 +-------
 drivers/acpi/scan.c                           |  71 ++++++++++
 drivers/firmware/efi/arm-runtime.c            |  17 ++-
 drivers/firmware/efi/efi.c                    |  45 ++++++-
 drivers/of/fdt.c                              |  13 ++
 drivers/xen/Kconfig                           |   2 +-
 drivers/xen/Makefile                          |   1 +
 drivers/xen/arm-device.c                      | 184 ++++++++++++++++++++++++++
 drivers/xen/efi.c                             | 174 +++++-------------------
 drivers/xen/xlate_mmu.c                       |  77 +++++++++++
 include/linux/of_fdt.h                        |   2 +
 include/xen/interface/hvm/params.h            |  40 +++++-
 include/xen/interface/memory.h                |   1 +
 include/xen/xen-ops.h                         |  32 +++--
 25 files changed, 796 insertions(+), 248 deletions(-)
 create mode 100644 arch/arm/include/asm/xen/xen-ops.h
 create mode 100644 arch/arm/xen/efi.c
 create mode 100644 arch/arm64/include/asm/xen/xen-ops.h
 create mode 100644 drivers/xen/arm-device.c

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
  2016-04-07  1:39     ` Shannon Zhao
@ 2016-04-07 10:34       ` Julien Grall
  -1 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-07 10:34 UTC (permalink / raw)
  To: Shannon Zhao, Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: david.vrabel, devicetree, linux-efi, linux-kernel,
	catalin.marinas, will.deacon, peter.huangpeng, xen-devel

On 07/04/16 02:39, Shannon Zhao wrote:
> Hi Julien,

Hi Shannon,

> On 2016/4/6 19:32, Julien Grall wrote:
>> Hi Shannon,
>>
>> On 01/04/2016 16:48, Shannon Zhao wrote:
>>> 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 bus to map
>>> the new added device's MMIO space. Make Xen domain use
>>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>>> get event-channel irq.
>>>
>>> Regarding the initialization flow of Linux kernel, it needs to move
>>> xen_early_init() before efi_init(). Then xen_early_init() will check
>>> whether it runs on Xen through the /hypervisor node and efi_init() will
>>> call a new function fdt_find_xen_uefi_params(), to parse those
>>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>>
>>> And in arm64_enable_runtime_services() it will check whether it runs on
>>> Xen and call another new function xen_efi_runtime_setup() to setup
>>> runtime service instead of efi_native_runtime_setup(). The
>>> xen_efi_runtime_setup() will assign the runtime function pointers with
>>> the functions of driver/xen/efi.c.
>>>
>>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>>> needs to check whether the DTS only contains a /hypervisor node and a
>>> /chosen node in acpi_boot_table_init().
>>>
>>> Patches are tested on FVP base model. They can be fetched from[2].
>>
>> I have tested this series and Linux is booting up to the prompt:
>>
>> Tested-by: Julien Grall <julien.grall@arm.com>
> Thanks a lot. There are several patches which you didn't give your
> comments. So I assume you will review them. If so, I'll wait and update
> this series later.

I don't have any comments on those patches. You can go ahead to update 
the patch series.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-07 10:34       ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-07 10:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/04/16 02:39, Shannon Zhao wrote:
> Hi Julien,

Hi Shannon,

> On 2016/4/6 19:32, Julien Grall wrote:
>> Hi Shannon,
>>
>> On 01/04/2016 16:48, Shannon Zhao wrote:
>>> 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 bus to map
>>> the new added device's MMIO space. Make Xen domain use
>>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>>> get event-channel irq.
>>>
>>> Regarding the initialization flow of Linux kernel, it needs to move
>>> xen_early_init() before efi_init(). Then xen_early_init() will check
>>> whether it runs on Xen through the /hypervisor node and efi_init() will
>>> call a new function fdt_find_xen_uefi_params(), to parse those
>>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>>
>>> And in arm64_enable_runtime_services() it will check whether it runs on
>>> Xen and call another new function xen_efi_runtime_setup() to setup
>>> runtime service instead of efi_native_runtime_setup(). The
>>> xen_efi_runtime_setup() will assign the runtime function pointers with
>>> the functions of driver/xen/efi.c.
>>>
>>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>>> needs to check whether the DTS only contains a /hypervisor node and a
>>> /chosen node in acpi_boot_table_init().
>>>
>>> Patches are tested on FVP base model. They can be fetched from[2].
>>
>> I have tested this series and Linux is booting up to the prompt:
>>
>> Tested-by: Julien Grall <julien.grall@arm.com>
> Thanks a lot. There are several patches which you didn't give your
> comments. So I assume you will review them. If so, I'll wait and update
> this series later.

I don't have any comments on those patches. You can go ahead to update 
the patch series.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
  2016-04-07  1:39     ` Shannon Zhao
  (?)
  (?)
@ 2016-04-07 10:34     ` Julien Grall
  -1 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-07 10:34 UTC (permalink / raw)
  To: Shannon Zhao, Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: devicetree, linux-efi, catalin.marinas, will.deacon,
	linux-kernel, peter.huangpeng, david.vrabel, xen-devel

On 07/04/16 02:39, Shannon Zhao wrote:
> Hi Julien,

Hi Shannon,

> On 2016/4/6 19:32, Julien Grall wrote:
>> Hi Shannon,
>>
>> On 01/04/2016 16:48, Shannon Zhao wrote:
>>> 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 bus to map
>>> the new added device's MMIO space. Make Xen domain use
>>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>>> get event-channel irq.
>>>
>>> Regarding the initialization flow of Linux kernel, it needs to move
>>> xen_early_init() before efi_init(). Then xen_early_init() will check
>>> whether it runs on Xen through the /hypervisor node and efi_init() will
>>> call a new function fdt_find_xen_uefi_params(), to parse those
>>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>>
>>> And in arm64_enable_runtime_services() it will check whether it runs on
>>> Xen and call another new function xen_efi_runtime_setup() to setup
>>> runtime service instead of efi_native_runtime_setup(). The
>>> xen_efi_runtime_setup() will assign the runtime function pointers with
>>> the functions of driver/xen/efi.c.
>>>
>>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>>> needs to check whether the DTS only contains a /hypervisor node and a
>>> /chosen node in acpi_boot_table_init().
>>>
>>> Patches are tested on FVP base model. They can be fetched from[2].
>>
>> I have tested this series and Linux is booting up to the prompt:
>>
>> Tested-by: Julien Grall <julien.grall@arm.com>
> Thanks a lot. There are several patches which you didn't give your
> comments. So I assume you will review them. If so, I'll wait and update
> this series later.

I don't have any comments on those patches. You can go ahead to update 
the patch series.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-07  1:39     ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-07  1:39 UTC (permalink / raw)
  To: Julien Grall, Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: david.vrabel, devicetree, linux-efi, linux-kernel,
	catalin.marinas, will.deacon, peter.huangpeng, xen-devel

Hi Julien,

On 2016/4/6 19:32, Julien Grall wrote:
> Hi Shannon,
> 
> On 01/04/2016 16:48, Shannon Zhao wrote:
>> 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 bus to map
>> the new added device's MMIO space. Make Xen domain use
>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>> get event-channel irq.
>>
>> Regarding the initialization flow of Linux kernel, it needs to move
>> xen_early_init() before efi_init(). Then xen_early_init() will check
>> whether it runs on Xen through the /hypervisor node and efi_init() will
>> call a new function fdt_find_xen_uefi_params(), to parse those
>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>
>> And in arm64_enable_runtime_services() it will check whether it runs on
>> Xen and call another new function xen_efi_runtime_setup() to setup
>> runtime service instead of efi_native_runtime_setup(). The
>> xen_efi_runtime_setup() will assign the runtime function pointers with
>> the functions of driver/xen/efi.c.
>>
>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>> needs to check whether the DTS only contains a /hypervisor node and a
>> /chosen node in acpi_boot_table_init().
>>
>> Patches are tested on FVP base model. They can be fetched from[2].
> 
> I have tested this series and Linux is booting up to the prompt:
> 
> Tested-by: Julien Grall <julien.grall@arm.com>
Thanks a lot. There are several patches which you didn't give your
comments. So I assume you will review them. If so, I'll wait and update
this series later.

Thanks,
-- 
Shannon

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-07  1:39     ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-07  1:39 UTC (permalink / raw)
  To: Julien Grall, Shannon Zhao,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	stefano.stabellini-Sxgqhf6Nn4DQT0dZR+AlfA
  Cc: david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, peter.huangpeng-hv44wF8Li93QT0dZR+AlfA,
	xen-devel-GuqFBffKawuEi8DpZVb4nw

Hi Julien,

On 2016/4/6 19:32, Julien Grall wrote:
> Hi Shannon,
> 
> On 01/04/2016 16:48, Shannon Zhao wrote:
>> 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 bus to map
>> the new added device's MMIO space. Make Xen domain use
>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>> get event-channel irq.
>>
>> Regarding the initialization flow of Linux kernel, it needs to move
>> xen_early_init() before efi_init(). Then xen_early_init() will check
>> whether it runs on Xen through the /hypervisor node and efi_init() will
>> call a new function fdt_find_xen_uefi_params(), to parse those
>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>
>> And in arm64_enable_runtime_services() it will check whether it runs on
>> Xen and call another new function xen_efi_runtime_setup() to setup
>> runtime service instead of efi_native_runtime_setup(). The
>> xen_efi_runtime_setup() will assign the runtime function pointers with
>> the functions of driver/xen/efi.c.
>>
>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>> needs to check whether the DTS only contains a /hypervisor node and a
>> /chosen node in acpi_boot_table_init().
>>
>> Patches are tested on FVP base model. They can be fetched from[2].
> 
> I have tested this series and Linux is booting up to the prompt:
> 
> Tested-by: Julien Grall <julien.grall-5wv7dgnIgG8@public.gmane.org>
Thanks a lot. There are several patches which you didn't give your
comments. So I assume you will review them. If so, I'll wait and update
this series later.

Thanks,
-- 
Shannon

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-07  1:39     ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-07  1:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Julien,

On 2016/4/6 19:32, Julien Grall wrote:
> Hi Shannon,
> 
> On 01/04/2016 16:48, Shannon Zhao wrote:
>> 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 bus to map
>> the new added device's MMIO space. Make Xen domain use
>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>> get event-channel irq.
>>
>> Regarding the initialization flow of Linux kernel, it needs to move
>> xen_early_init() before efi_init(). Then xen_early_init() will check
>> whether it runs on Xen through the /hypervisor node and efi_init() will
>> call a new function fdt_find_xen_uefi_params(), to parse those
>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>
>> And in arm64_enable_runtime_services() it will check whether it runs on
>> Xen and call another new function xen_efi_runtime_setup() to setup
>> runtime service instead of efi_native_runtime_setup(). The
>> xen_efi_runtime_setup() will assign the runtime function pointers with
>> the functions of driver/xen/efi.c.
>>
>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>> needs to check whether the DTS only contains a /hypervisor node and a
>> /chosen node in acpi_boot_table_init().
>>
>> Patches are tested on FVP base model. They can be fetched from[2].
> 
> I have tested this series and Linux is booting up to the prompt:
> 
> Tested-by: Julien Grall <julien.grall@arm.com>
Thanks a lot. There are several patches which you didn't give your
comments. So I assume you will review them. If so, I'll wait and update
this series later.

Thanks,
-- 
Shannon

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
  2016-04-06 11:32   ` Julien Grall
                     ` (2 preceding siblings ...)
  (?)
@ 2016-04-07  1:39   ` Shannon Zhao
  -1 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-07  1:39 UTC (permalink / raw)
  To: Julien Grall, Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: devicetree, linux-efi, catalin.marinas, will.deacon,
	linux-kernel, peter.huangpeng, david.vrabel, xen-devel

Hi Julien,

On 2016/4/6 19:32, Julien Grall wrote:
> Hi Shannon,
> 
> On 01/04/2016 16:48, Shannon Zhao wrote:
>> 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 bus to map
>> the new added device's MMIO space. Make Xen domain use
>> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
>> get event-channel irq.
>>
>> Regarding the initialization flow of Linux kernel, it needs to move
>> xen_early_init() before efi_init(). Then xen_early_init() will check
>> whether it runs on Xen through the /hypervisor node and efi_init() will
>> call a new function fdt_find_xen_uefi_params(), to parse those
>> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>>
>> And in arm64_enable_runtime_services() it will check whether it runs on
>> Xen and call another new function xen_efi_runtime_setup() to setup
>> runtime service instead of efi_native_runtime_setup(). The
>> xen_efi_runtime_setup() will assign the runtime function pointers with
>> the functions of driver/xen/efi.c.
>>
>> And since we pass a /hypervisor node and a /chosen node to Dom0, it
>> needs to check whether the DTS only contains a /hypervisor node and a
>> /chosen node in acpi_boot_table_init().
>>
>> Patches are tested on FVP base model. They can be fetched from[2].
> 
> I have tested this series and Linux is booting up to the prompt:
> 
> Tested-by: Julien Grall <julien.grall@arm.com>
Thanks a lot. There are several patches which you didn't give your
comments. So I assume you will review them. If so, I'll wait and update
this series later.

Thanks,
-- 
Shannon


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-06 11:32   ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-06 11:32 UTC (permalink / raw)
  To: Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: david.vrabel, devicetree, linux-efi, linux-kernel,
	catalin.marinas, will.deacon, peter.huangpeng, xen-devel,
	zhaoshenglong

Hi Shannon,

On 01/04/2016 16:48, Shannon Zhao wrote:
> 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 bus to map
> the new added device's MMIO space. Make Xen domain use
> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
> get event-channel irq.
>
> Regarding the initialization flow of Linux kernel, it needs to move
> xen_early_init() before efi_init(). Then xen_early_init() will check
> whether it runs on Xen through the /hypervisor node and efi_init() will
> call a new function fdt_find_xen_uefi_params(), to parse those
> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>
> And in arm64_enable_runtime_services() it will check whether it runs on
> Xen and call another new function xen_efi_runtime_setup() to setup
> runtime service instead of efi_native_runtime_setup(). The
> xen_efi_runtime_setup() will assign the runtime function pointers with
> the functions of driver/xen/efi.c.
>
> And since we pass a /hypervisor node and a /chosen node to Dom0, it
> needs to check whether the DTS only contains a /hypervisor node and a
> /chosen node in acpi_boot_table_init().
>
> Patches are tested on FVP base model. They can be fetched from[2].

I have tested this series and Linux is booting up to the prompt:

Tested-by: Julien Grall <julien.grall@arm.com>

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-06 11:32   ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-06 11:32 UTC (permalink / raw)
  To: Shannon Zhao, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	stefano.stabellini-Sxgqhf6Nn4DQT0dZR+AlfA
  Cc: david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, peter.huangpeng-hv44wF8Li93QT0dZR+AlfA,
	xen-devel-GuqFBffKawuEi8DpZVb4nw,
	zhaoshenglong-hv44wF8Li93QT0dZR+AlfA

Hi Shannon,

On 01/04/2016 16:48, Shannon Zhao wrote:
> 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 bus to map
> the new added device's MMIO space. Make Xen domain use
> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
> get event-channel irq.
>
> Regarding the initialization flow of Linux kernel, it needs to move
> xen_early_init() before efi_init(). Then xen_early_init() will check
> whether it runs on Xen through the /hypervisor node and efi_init() will
> call a new function fdt_find_xen_uefi_params(), to parse those
> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>
> And in arm64_enable_runtime_services() it will check whether it runs on
> Xen and call another new function xen_efi_runtime_setup() to setup
> runtime service instead of efi_native_runtime_setup(). The
> xen_efi_runtime_setup() will assign the runtime function pointers with
> the functions of driver/xen/efi.c.
>
> And since we pass a /hypervisor node and a /chosen node to Dom0, it
> needs to check whether the DTS only contains a /hypervisor node and a
> /chosen node in acpi_boot_table_init().
>
> Patches are tested on FVP base model. They can be fetched from[2].

I have tested this series and Linux is booting up to the prompt:

Tested-by: Julien Grall <julien.grall-5wv7dgnIgG8@public.gmane.org>

Regards,

-- 
Julien Grall
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-06 11:32   ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-06 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shannon,

On 01/04/2016 16:48, Shannon Zhao wrote:
> 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 bus to map
> the new added device's MMIO space. Make Xen domain use
> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
> get event-channel irq.
>
> Regarding the initialization flow of Linux kernel, it needs to move
> xen_early_init() before efi_init(). Then xen_early_init() will check
> whether it runs on Xen through the /hypervisor node and efi_init() will
> call a new function fdt_find_xen_uefi_params(), to parse those
> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>
> And in arm64_enable_runtime_services() it will check whether it runs on
> Xen and call another new function xen_efi_runtime_setup() to setup
> runtime service instead of efi_native_runtime_setup(). The
> xen_efi_runtime_setup() will assign the runtime function pointers with
> the functions of driver/xen/efi.c.
>
> And since we pass a /hypervisor node and a /chosen node to Dom0, it
> needs to check whether the DTS only contains a /hypervisor node and a
> /chosen node in acpi_boot_table_init().
>
> Patches are tested on FVP base model. They can be fetched from[2].

I have tested this series and Linux is booting up to the prompt:

Tested-by: Julien Grall <julien.grall@arm.com>

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
  2016-04-01 15:48 ` Shannon Zhao
  (?)
  (?)
@ 2016-04-06 11:32 ` Julien Grall
  -1 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2016-04-06 11:32 UTC (permalink / raw)
  To: Shannon Zhao, linux-arm-kernel, stefano.stabellini
  Cc: devicetree, linux-efi, catalin.marinas, will.deacon,
	linux-kernel, peter.huangpeng, david.vrabel, zhaoshenglong,
	xen-devel

Hi Shannon,

On 01/04/2016 16:48, Shannon Zhao wrote:
> 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 bus to map
> the new added device's MMIO space. Make Xen domain use
> xlated_setup_gnttab_pages to setup grant table and a new hypercall to
> get event-channel irq.
>
> Regarding the initialization flow of Linux kernel, it needs to move
> xen_early_init() before efi_init(). Then xen_early_init() will check
> whether it runs on Xen through the /hypervisor node and efi_init() will
> call a new function fdt_find_xen_uefi_params(), to parse those
> xen,uefi-* parameters just like the existing efi_get_fdt_params().
>
> And in arm64_enable_runtime_services() it will check whether it runs on
> Xen and call another new function xen_efi_runtime_setup() to setup
> runtime service instead of efi_native_runtime_setup(). The
> xen_efi_runtime_setup() will assign the runtime function pointers with
> the functions of driver/xen/efi.c.
>
> And since we pass a /hypervisor node and a /chosen node to Dom0, it
> needs to check whether the DTS only contains a /hypervisor node and a
> /chosen node in acpi_boot_table_init().
>
> Patches are tested on FVP base model. They can be fetched from[2].

I have tested this series and Linux is booting up to the prompt:

Tested-by: Julien Grall <julien.grall@arm.com>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-01 15:48 ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-01 15:48 UTC (permalink / raw)
  To: linux-arm-kernel, stefano.stabellini
  Cc: david.vrabel, devicetree, linux-efi, linux-kernel,
	catalin.marinas, will.deacon, julien.grall, peter.huangpeng,
	xen-devel, zhaoshenglong, 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 bus to map
the new added device's MMIO space. Make Xen domain use
xlated_setup_gnttab_pages to setup grant table and a new hypercall to
get event-channel irq.

Regarding the initialization flow of Linux kernel, it needs to move
xen_early_init() before efi_init(). Then xen_early_init() will check
whether it runs on Xen through the /hypervisor node and efi_init() will
call a new function fdt_find_xen_uefi_params(), to parse those
xen,uefi-* parameters just like the existing efi_get_fdt_params().

And in arm64_enable_runtime_services() it will check whether it runs on
Xen and call another new function xen_efi_runtime_setup() to setup
runtime service instead of efi_native_runtime_setup(). The
xen_efi_runtime_setup() will assign the runtime function pointers with
the functions of driver/xen/efi.c.

And since we pass a /hypervisor node and a /chosen node to Dom0, it
needs to check whether the DTS only contains a /hypervisor node and a
/chosen node in acpi_boot_table_init().

Patches are tested on FVP base model. They can be fetched from[2].

Thanks,
Shannon

[1] http://lists.xen.org/archives/html/xen-devel/2015-11/msg00488.html
[2] https://git.linaro.org/people/shannon.zhao/linux-mainline.git ACPI_XEN_ARM_Linux_V10

Changes since v9:
* address Rafael's comments on patch 1
* check the compatible string of hypervisor node in patch 12

Changes since v8:
* rebased on v4.6-rc1
* print UART device address (PATCH 1)
* use xen_for_each_gfn (PATCH 3)
* reduce indentation by inverting the condition (PATCH 10)
* move xen_early_init() before efi_init() as well for ARM (PATCH 11)
* sync the document with Xen (PATCH 13)

Changes since v7:
* add __init prefix for acpi_get_spcr_uart_addr (PATCH 1)

Changes since v6:
* rebase on linux master
* refactor codes as acpi_get_spcr_uart_addr (PATCH 1)
* sync with Xen (patch 9)

Changes since v5:
* rebase on linux master
* use acpi_dev_resource_memory to parse the device memory info(patch 1)
* sync with Xen (patch 9)

Changes since v4:
* rebase on linux master
* move the check acpi_device_should_be_hidden into
  acpi_bus_type_and_status (patch 1)
* use existing function fdt_subnode_offset (patch 16)

Changes since v3:
* rebase on linux master
* print a warning when there is no SPCR table
* rephase the commit message of PATCH 3
* rephase the words of PATCH 13
* use strcmp and factor the function in PATCH 16
* Add several ACKs and RBs, thanks a lot


Changes since v2:
* Use 0 to check if it should ignore the UART
* Fix the use of page_to_xen_pfn
* Factor ACPI and DT parts in xen_guest_init
* Check "uefi" node by full path
* Fix the statement of Documentation/devicetree/bindings/arm/xen.txt

Changes since v1:
* Rebase on linux mainline and 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 place
  Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn
  arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table
  xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio
  Xen: ARM: Add support for mapping platform device mmio
  Xen: ARM: Add support for mapping AMBA device mmio
  Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen
  xen/hvm/params: Add a new delivery type for event-channel in
    HVM_PARAM_CALLBACK_IRQ
  arm/xen: Get event-channel irq through HVM_PARAM when booting with
    ACPI
  ARM: XEN: Move xen_early_init() before efi_init()
  ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI
  ARM: Xen: Document UEFI support on Xen ARM virtual platforms
  XEN: EFI: Move x86 specific codes to architecture directory
  ARM64: XEN: Add a function to initialize Xen specific UEFI runtime
    services
  FDT: Add a helper to get the subnode by given name
  Xen: EFI: Parse DT parameters for Xen specific UEFI

 Documentation/devicetree/bindings/arm/xen.txt |  35 +++++
 arch/arm/include/asm/xen/xen-ops.h            |   6 +
 arch/arm/kernel/setup.c                       |   2 +-
 arch/arm/xen/Makefile                         |   1 +
 arch/arm/xen/efi.c                            |  40 ++++++
 arch/arm/xen/enlighten.c                      | 109 +++++++++++----
 arch/arm64/include/asm/xen/xen-ops.h          |   6 +
 arch/arm64/kernel/acpi.c                      |  14 +-
 arch/arm64/kernel/setup.c                     |   2 +-
 arch/arm64/xen/Makefile                       |   1 +
 arch/x86/xen/efi.c                            | 112 ++++++++++++++++
 arch/x86/xen/grant-table.c                    |  57 +-------
 drivers/acpi/scan.c                           |  71 ++++++++++
 drivers/firmware/efi/arm-runtime.c            |  17 ++-
 drivers/firmware/efi/efi.c                    |  45 ++++++-
 drivers/of/fdt.c                              |  13 ++
 drivers/xen/Kconfig                           |   2 +-
 drivers/xen/Makefile                          |   1 +
 drivers/xen/arm-device.c                      | 184 ++++++++++++++++++++++++++
 drivers/xen/efi.c                             | 174 +++++-------------------
 drivers/xen/xlate_mmu.c                       |  77 +++++++++++
 include/linux/of_fdt.h                        |   2 +
 include/xen/interface/hvm/params.h            |  40 +++++-
 include/xen/interface/memory.h                |   1 +
 include/xen/xen-ops.h                         |  32 +++--
 25 files changed, 796 insertions(+), 248 deletions(-)
 create mode 100644 arch/arm/include/asm/xen/xen-ops.h
 create mode 100644 arch/arm/xen/efi.c
 create mode 100644 arch/arm64/include/asm/xen/xen-ops.h
 create mode 100644 drivers/xen/arm-device.c

-- 
2.1.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-01 15:48 ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-01 15:48 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	stefano.stabellini-Sxgqhf6Nn4DQT0dZR+AlfA
  Cc: david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, julien.grall-5wv7dgnIgG8,
	peter.huangpeng-hv44wF8Li93QT0dZR+AlfA,
	xen-devel-GuqFBffKawuEi8DpZVb4nw,
	zhaoshenglong-hv44wF8Li93QT0dZR+AlfA,
	shannon.zhao-QSEj5FYQhm4dnm+yROfE0A

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 bus to map
the new added device's MMIO space. Make Xen domain use
xlated_setup_gnttab_pages to setup grant table and a new hypercall to
get event-channel irq.

Regarding the initialization flow of Linux kernel, it needs to move
xen_early_init() before efi_init(). Then xen_early_init() will check
whether it runs on Xen through the /hypervisor node and efi_init() will
call a new function fdt_find_xen_uefi_params(), to parse those
xen,uefi-* parameters just like the existing efi_get_fdt_params().

And in arm64_enable_runtime_services() it will check whether it runs on
Xen and call another new function xen_efi_runtime_setup() to setup
runtime service instead of efi_native_runtime_setup(). The
xen_efi_runtime_setup() will assign the runtime function pointers with
the functions of driver/xen/efi.c.

And since we pass a /hypervisor node and a /chosen node to Dom0, it
needs to check whether the DTS only contains a /hypervisor node and a
/chosen node in acpi_boot_table_init().

Patches are tested on FVP base model. They can be fetched from[2].

Thanks,
Shannon

[1] http://lists.xen.org/archives/html/xen-devel/2015-11/msg00488.html
[2] https://git.linaro.org/people/shannon.zhao/linux-mainline.git ACPI_XEN_ARM_Linux_V10

Changes since v9:
* address Rafael's comments on patch 1
* check the compatible string of hypervisor node in patch 12

Changes since v8:
* rebased on v4.6-rc1
* print UART device address (PATCH 1)
* use xen_for_each_gfn (PATCH 3)
* reduce indentation by inverting the condition (PATCH 10)
* move xen_early_init() before efi_init() as well for ARM (PATCH 11)
* sync the document with Xen (PATCH 13)

Changes since v7:
* add __init prefix for acpi_get_spcr_uart_addr (PATCH 1)

Changes since v6:
* rebase on linux master
* refactor codes as acpi_get_spcr_uart_addr (PATCH 1)
* sync with Xen (patch 9)

Changes since v5:
* rebase on linux master
* use acpi_dev_resource_memory to parse the device memory info(patch 1)
* sync with Xen (patch 9)

Changes since v4:
* rebase on linux master
* move the check acpi_device_should_be_hidden into
  acpi_bus_type_and_status (patch 1)
* use existing function fdt_subnode_offset (patch 16)

Changes since v3:
* rebase on linux master
* print a warning when there is no SPCR table
* rephase the commit message of PATCH 3
* rephase the words of PATCH 13
* use strcmp and factor the function in PATCH 16
* Add several ACKs and RBs, thanks a lot


Changes since v2:
* Use 0 to check if it should ignore the UART
* Fix the use of page_to_xen_pfn
* Factor ACPI and DT parts in xen_guest_init
* Check "uefi" node by full path
* Fix the statement of Documentation/devicetree/bindings/arm/xen.txt

Changes since v1:
* Rebase on linux mainline and 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 place
  Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn
  arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table
  xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio
  Xen: ARM: Add support for mapping platform device mmio
  Xen: ARM: Add support for mapping AMBA device mmio
  Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen
  xen/hvm/params: Add a new delivery type for event-channel in
    HVM_PARAM_CALLBACK_IRQ
  arm/xen: Get event-channel irq through HVM_PARAM when booting with
    ACPI
  ARM: XEN: Move xen_early_init() before efi_init()
  ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI
  ARM: Xen: Document UEFI support on Xen ARM virtual platforms
  XEN: EFI: Move x86 specific codes to architecture directory
  ARM64: XEN: Add a function to initialize Xen specific UEFI runtime
    services
  FDT: Add a helper to get the subnode by given name
  Xen: EFI: Parse DT parameters for Xen specific UEFI

 Documentation/devicetree/bindings/arm/xen.txt |  35 +++++
 arch/arm/include/asm/xen/xen-ops.h            |   6 +
 arch/arm/kernel/setup.c                       |   2 +-
 arch/arm/xen/Makefile                         |   1 +
 arch/arm/xen/efi.c                            |  40 ++++++
 arch/arm/xen/enlighten.c                      | 109 +++++++++++----
 arch/arm64/include/asm/xen/xen-ops.h          |   6 +
 arch/arm64/kernel/acpi.c                      |  14 +-
 arch/arm64/kernel/setup.c                     |   2 +-
 arch/arm64/xen/Makefile                       |   1 +
 arch/x86/xen/efi.c                            | 112 ++++++++++++++++
 arch/x86/xen/grant-table.c                    |  57 +-------
 drivers/acpi/scan.c                           |  71 ++++++++++
 drivers/firmware/efi/arm-runtime.c            |  17 ++-
 drivers/firmware/efi/efi.c                    |  45 ++++++-
 drivers/of/fdt.c                              |  13 ++
 drivers/xen/Kconfig                           |   2 +-
 drivers/xen/Makefile                          |   1 +
 drivers/xen/arm-device.c                      | 184 ++++++++++++++++++++++++++
 drivers/xen/efi.c                             | 174 +++++-------------------
 drivers/xen/xlate_mmu.c                       |  77 +++++++++++
 include/linux/of_fdt.h                        |   2 +
 include/xen/interface/hvm/params.h            |  40 +++++-
 include/xen/interface/memory.h                |   1 +
 include/xen/xen-ops.h                         |  32 +++--
 25 files changed, 796 insertions(+), 248 deletions(-)
 create mode 100644 arch/arm/include/asm/xen/xen-ops.h
 create mode 100644 arch/arm/xen/efi.c
 create mode 100644 arch/arm64/include/asm/xen/xen-ops.h
 create mode 100644 drivers/xen/arm-device.c

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64
@ 2016-04-01 15:48 ` Shannon Zhao
  0 siblings, 0 replies; 15+ messages in thread
From: Shannon Zhao @ 2016-04-01 15:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 bus to map
the new added device's MMIO space. Make Xen domain use
xlated_setup_gnttab_pages to setup grant table and a new hypercall to
get event-channel irq.

Regarding the initialization flow of Linux kernel, it needs to move
xen_early_init() before efi_init(). Then xen_early_init() will check
whether it runs on Xen through the /hypervisor node and efi_init() will
call a new function fdt_find_xen_uefi_params(), to parse those
xen,uefi-* parameters just like the existing efi_get_fdt_params().

And in arm64_enable_runtime_services() it will check whether it runs on
Xen and call another new function xen_efi_runtime_setup() to setup
runtime service instead of efi_native_runtime_setup(). The
xen_efi_runtime_setup() will assign the runtime function pointers with
the functions of driver/xen/efi.c.

And since we pass a /hypervisor node and a /chosen node to Dom0, it
needs to check whether the DTS only contains a /hypervisor node and a
/chosen node in acpi_boot_table_init().

Patches are tested on FVP base model. They can be fetched from[2].

Thanks,
Shannon

[1] http://lists.xen.org/archives/html/xen-devel/2015-11/msg00488.html
[2] https://git.linaro.org/people/shannon.zhao/linux-mainline.git ACPI_XEN_ARM_Linux_V10

Changes since v9:
* address Rafael's comments on patch 1
* check the compatible string of hypervisor node in patch 12

Changes since v8:
* rebased on v4.6-rc1
* print UART device address (PATCH 1)
* use xen_for_each_gfn (PATCH 3)
* reduce indentation by inverting the condition (PATCH 10)
* move xen_early_init() before efi_init() as well for ARM (PATCH 11)
* sync the document with Xen (PATCH 13)

Changes since v7:
* add __init prefix for acpi_get_spcr_uart_addr (PATCH 1)

Changes since v6:
* rebase on linux master
* refactor codes as acpi_get_spcr_uart_addr (PATCH 1)
* sync with Xen (patch 9)

Changes since v5:
* rebase on linux master
* use acpi_dev_resource_memory to parse the device memory info(patch 1)
* sync with Xen (patch 9)

Changes since v4:
* rebase on linux master
* move the check acpi_device_should_be_hidden into
  acpi_bus_type_and_status (patch 1)
* use existing function fdt_subnode_offset (patch 16)

Changes since v3:
* rebase on linux master
* print a warning when there is no SPCR table
* rephase the commit message of PATCH 3
* rephase the words of PATCH 13
* use strcmp and factor the function in PATCH 16
* Add several ACKs and RBs, thanks a lot


Changes since v2:
* Use 0 to check if it should ignore the UART
* Fix the use of page_to_xen_pfn
* Factor ACPI and DT parts in xen_guest_init
* Check "uefi" node by full path
* Fix the statement of Documentation/devicetree/bindings/arm/xen.txt

Changes since v1:
* Rebase on linux mainline and 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 place
  Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn
  arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table
  xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio
  Xen: ARM: Add support for mapping platform device mmio
  Xen: ARM: Add support for mapping AMBA device mmio
  Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen
  xen/hvm/params: Add a new delivery type for event-channel in
    HVM_PARAM_CALLBACK_IRQ
  arm/xen: Get event-channel irq through HVM_PARAM when booting with
    ACPI
  ARM: XEN: Move xen_early_init() before efi_init()
  ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI
  ARM: Xen: Document UEFI support on Xen ARM virtual platforms
  XEN: EFI: Move x86 specific codes to architecture directory
  ARM64: XEN: Add a function to initialize Xen specific UEFI runtime
    services
  FDT: Add a helper to get the subnode by given name
  Xen: EFI: Parse DT parameters for Xen specific UEFI

 Documentation/devicetree/bindings/arm/xen.txt |  35 +++++
 arch/arm/include/asm/xen/xen-ops.h            |   6 +
 arch/arm/kernel/setup.c                       |   2 +-
 arch/arm/xen/Makefile                         |   1 +
 arch/arm/xen/efi.c                            |  40 ++++++
 arch/arm/xen/enlighten.c                      | 109 +++++++++++----
 arch/arm64/include/asm/xen/xen-ops.h          |   6 +
 arch/arm64/kernel/acpi.c                      |  14 +-
 arch/arm64/kernel/setup.c                     |   2 +-
 arch/arm64/xen/Makefile                       |   1 +
 arch/x86/xen/efi.c                            | 112 ++++++++++++++++
 arch/x86/xen/grant-table.c                    |  57 +-------
 drivers/acpi/scan.c                           |  71 ++++++++++
 drivers/firmware/efi/arm-runtime.c            |  17 ++-
 drivers/firmware/efi/efi.c                    |  45 ++++++-
 drivers/of/fdt.c                              |  13 ++
 drivers/xen/Kconfig                           |   2 +-
 drivers/xen/Makefile                          |   1 +
 drivers/xen/arm-device.c                      | 184 ++++++++++++++++++++++++++
 drivers/xen/efi.c                             | 174 +++++-------------------
 drivers/xen/xlate_mmu.c                       |  77 +++++++++++
 include/linux/of_fdt.h                        |   2 +
 include/xen/interface/hvm/params.h            |  40 +++++-
 include/xen/interface/memory.h                |   1 +
 include/xen/xen-ops.h                         |  32 +++--
 25 files changed, 796 insertions(+), 248 deletions(-)
 create mode 100644 arch/arm/include/asm/xen/xen-ops.h
 create mode 100644 arch/arm/xen/efi.c
 create mode 100644 arch/arm64/include/asm/xen/xen-ops.h
 create mode 100644 drivers/xen/arm-device.c

-- 
2.1.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-04-07 10:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 15:48 [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64 Shannon Zhao
2016-04-01 15:48 Shannon Zhao
2016-04-01 15:48 ` Shannon Zhao
2016-04-01 15:48 ` Shannon Zhao
2016-04-06 11:32 ` Julien Grall
2016-04-06 11:32 ` Julien Grall
2016-04-06 11:32   ` Julien Grall
2016-04-06 11:32   ` Julien Grall
2016-04-07  1:39   ` Shannon Zhao
2016-04-07  1:39     ` Shannon Zhao
2016-04-07  1:39     ` Shannon Zhao
2016-04-07 10:34     ` Julien Grall
2016-04-07 10:34     ` Julien Grall
2016-04-07 10:34       ` Julien Grall
2016-04-07  1:39   ` Shannon Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.