Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-11 Thread Shannon Zhao
On 2015/8/12 4:43, Konrad Rzeszutek Wilk wrote: On Wed, Aug 05, 2015 at 09:03:06PM +0800, Shannon Zhao wrote: On 2015/8/5 20:48, Julien Grall wrote: On 05/08/15 12:49, Shannon Zhao wrote: That's great! Keep in mind that many ARM platforms have non-PCI busses, so I think we'll need

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-11 Thread Shannon Zhao
Hi Julien, On 2015/8/12 0:19, Julien Grall wrote: Hi Shannon, On 07/08/15 03:11, Shannon Zhao wrote: 2. Create minimal DT to pass required information to Dom0 -- The minimal DT mainly passes Dom0 bootargs, address and size of initrd

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-13 Thread Shannon Zhao
On 2015/8/13 18:29, Christoffer Dall wrote: On Thu, Aug 13, 2015 at 11:22:19AM +0100, Ian Campbell wrote: On Thu, 2015-08-13 at 11:13 +0100, Stefano Stabellini wrote: For example it is only natural for the kernel to try to use the GIC hyp functionalities if they are described, while

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-18 Thread Shannon Zhao
On 2015/8/18 17:11, Jan Beulich wrote: On 18.08.15 at 10:21, zhaoshengl...@huawei.com wrote: On 2015/8/18 16:15, Jan Beulich wrote: On 18.08.15 at 09:35, zhaoshengl...@huawei.com wrote: Hi Jan, On 2015/8/18 13:14, Jan Beulich wrote: Shannon Zhao zhaoshengl...@huawei.com 08/18/15 5:46

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-17 Thread Shannon Zhao
On 2015/8/17 18:36, Roger Pau Monné wrote: El 11/08/15 a les 16.19, Ian Campbell ha escrit: On Fri, 2015-08-07 at 10:11 +0800, Shannon Zhao wrote: This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-17 Thread Shannon Zhao
Hi Julien, On 2015/8/18 0:10, Julien Grall wrote: Hi, On 17/08/2015 06:01, Shannon Zhao wrote: On 2015/8/14 23:17, Julien Grall wrote: On 14/08/15 15:59, Shannon Zhao wrote: 2. Create minimal DT to pass required information to Dom0

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-17 Thread Shannon Zhao
Hi Jan, On 2015/8/17 23:33, Jan Beulich wrote: On 14.08.15 at 16:59, shannon.z...@linaro.org wrote: 1. Copy and change some EFI and ACPI tables --- While some explanation on the reasons for this was given in the past discussion, I'm still missing a

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-17 Thread Shannon Zhao
On 2015/8/14 23:17, Julien Grall wrote: On 14/08/15 15:59, Shannon Zhao wrote: 2. Create minimal DT to pass required information to Dom0 -- The minimal DT mainly passes Dom0 bootargs, address and size of initrd (if available), address

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-18 Thread Shannon Zhao
On 2015/8/18 15:01, Jan Beulich wrote: On 18.08.15 at 08:43, julien.gr...@citrix.com wrote: Hi Jan, On 17/08/2015 22:10, Jan Beulich wrote: Julien Grall julien.gr...@citrix.com 08/17/15 6:27 PM On 17/08/2015 08:33, Jan Beulich wrote: On 14.08.15 at 16:59, shannon.z...@linaro.org

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-18 Thread Shannon Zhao
Hi Jan, On 2015/8/18 13:14, Jan Beulich wrote: Shannon Zhao zhaoshengl...@huawei.com 08/18/15 5:46 AM On 2015/8/17 23:33, Jan Beulich wrote: On 14.08.15 at 16:59, shannon.z...@linaro.org wrote: 1. Copy and change some EFI and ACPI tables --- While

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-18 Thread Shannon Zhao
On 2015/8/18 14:36, Julien Grall wrote: On 17/08/2015 20:19, Shannon Zhao wrote: Yes, I think it's good to drop the linux, too. But if we drop the linux, would it impact the linux kernel booting with UEFI? And why we don't do it to Xen since Xen still uses linux,? I don't understand

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-18 Thread Shannon Zhao
On 2015/8/18 16:15, Jan Beulich wrote: On 18.08.15 at 09:35, zhaoshengl...@huawei.com wrote: Hi Jan, On 2015/8/18 13:14, Jan Beulich wrote: Shannon Zhao zhaoshengl...@huawei.com 08/18/15 5:46 AM On 2015/8/17 23:33, Jan Beulich wrote: On 14.08.15 at 16:59, shannon.z...@linaro.org wrote

[Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-19 Thread Shannon Zhao
This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. Changes v3-v4: * add explanation for minimal DT and the properties * drop linux, prefix of the properties * add explanation for the event

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-20 Thread Shannon Zhao
Hi Roger, On 2015/8/20 16:20, Roger Pau Monné wrote: El 20/08/15 a les 5.07, Shannon Zhao ha escrit: On 2015/8/19 23:02, Roger Pau Monné wrote: El 19/08/15 a les 14.13, Shannon Zhao ha escrit: XENMAPSPACE XENMAPSPACE_dev_mmio. The usage of this hypercall parameters: - domid: DOMID_SELF

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-20 Thread Shannon Zhao
On 2015/8/20 21:46, Roger Pau Monné wrote: El 20/08/15 a les 14.29, Shannon Zhao ha escrit: On 2015/8/20 19:28, Roger Pau Monné wrote: El 20/08/15 a les 13.22, Shannon Zhao ha escrit: Hi Roger, On 2015/8/20 16:20, Roger Pau Monné wrote: El 20/08/15 a les 5.07, Shannon Zhao ha escrit

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-20 Thread Shannon Zhao
On 2015/8/20 17:30, Jan Beulich wrote: On 20.08.15 at 05:41, zhaoshengl...@huawei.com wrote: On 2015/8/19 22:05, Jan Beulich wrote: On 19.08.15 at 14:13, zhaoshengl...@huawei.com wrote: 1. Create minimal DT to pass required information to Dom0

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-20 Thread Shannon Zhao
On 2015/8/20 19:28, Roger Pau Monné wrote: El 20/08/15 a les 13.22, Shannon Zhao ha escrit: Hi Roger, On 2015/8/20 16:20, Roger Pau Monné wrote: El 20/08/15 a les 5.07, Shannon Zhao ha escrit: On 2015/8/19 23:02, Roger Pau Monné wrote: El 19/08/15 a les 14.13, Shannon Zhao ha escrit

[Xen-devel] [PATCH v3 2/3] ACPI: disable ACPI cleanly when bad RSDP found

2015-08-21 Thread Shannon Zhao
9e3a9d1ed8cc8db93e5c53e9a5b09065bd95de8b] Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- xen/drivers/acpi/tables.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index 1da2127..6085fda 100644 --- a/xen/drivers/acpi

[Xen-devel] [PATCH v3 0/3] Port three ACPI fixes from Linux

2015-08-21 Thread Shannon Zhao
From: Shannon Zhao shannon.z...@linaro.org Hanjun Guo (1): ACPI / table: Replace '1' with specific error return values Len Brown (1): ACPI: disable ACPI cleanly when bad RSDP found Tomasz Nowicki (1): ACPI/table: Always count matched and successfully parsed entries xen/drivers/acpi

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-19 Thread Shannon Zhao
Hi Jan, On 2015/8/19 22:05, Jan Beulich wrote: On 19.08.15 at 14:13, zhaoshengl...@huawei.com wrote: 1. Create minimal DT to pass required information to Dom0 -- Since there are no legacy interfaces like x86 for Dom0 to get the booting

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 4

2015-08-19 Thread Shannon Zhao
Hi Roger, On 2015/8/19 23:02, Roger Pau Monné wrote: El 19/08/15 a les 14.13, Shannon Zhao ha escrit: 4. Map MMIO regions --- Register a bus_notifier for platform and amba bus in Linux. Add a new Can we make this OS agnostic? Could you explain what you mean with the above

[Xen-devel] [PATCH 0/2] two minor ACPI fixes

2015-08-03 Thread Shannon Zhao
From: Shannon Zhao shannon.z...@linaro.org Shannon Zhao (2): ACPI/table: Always count matched and successfully parsed entries ACPI/table: Make acpi_table_init return meaningful value xen/drivers/acpi/tables.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.0.4

[Xen-devel] [PATCH 2/2] ACPI/table: Make acpi_table_init return meaningful value

2015-08-03 Thread Shannon Zhao
From: Shannon Zhao shannon.z...@linaro.org If ACPI fails to initialize tables, it should return one meaningful value to tell the caller to diable acpi. Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- xen/drivers/acpi/tables.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

[Xen-devel] [PATCH 1/2] ACPI/table: Always count matched and successfully parsed entries

2015-08-03 Thread Shannon Zhao
From: Shannon Zhao shannon.z...@linaro.org acpi_parse_entries() allows to traverse all available table entries (aka subtables) by passing max_entries parameter equal to 0, but since its count variable is only incremented if max_entries is not 0, the function always returns 0 for max_entries equal

[Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-04 Thread Shannon Zhao
This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. To Xen itself booting with ACPI, this is similar to Linux kernel except that Xen doesn't parse DSDT table. So I'll skip this part and focus on

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-04 Thread Shannon Zhao
On 2015/8/4 22:37, Stefano Stabellini wrote: On Tue, 4 Aug 2015, Shannon Zhao wrote: This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. Good start! To Xen itself booting with ACPI

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-04 Thread Shannon Zhao
On 2015/8/4 22:43, Christoffer Dall wrote: Hi Shannon, On Tue, Aug 4, 2015 at 3:43 PM, Shannon Zhao zhaoshengl...@huawei.com wrote: This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome

Re: [Xen-devel] [PATCH v2 32/41] arm : acpi dynamically map mmio regions

2015-07-30 Thread Shannon Zhao
interpreter option was discussed earlier and it was decided not to go with that approach. You can find more details in the linaro xen wiki for the reasoning behind it. regards parth On 30 July 2015 at 17:49, Shannon Zhao shannon.z...@linaro.org wrote: On 2015/7/5 21:30, Parth Dixit wrote

Re: [Xen-devel] [PATCH v2 32/41] arm : acpi dynamically map mmio regions

2015-07-30 Thread Shannon Zhao
On 2015/7/31 2:31, Julien Grall wrote: Hi, On 30/07/15 19:02, Parth Dixit wrote: instead of getting mmio information for individual devices from dsdt, we will map all the non-ram regions described in uefi. AML interpreter option was discussed earlier and it was decided

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-11 Thread Shannon Zhao
On 2015/8/11 17:46, Julien Grall wrote: On 11/08/15 03:09, Shannon Zhao wrote: Hi Julien, Hi Shannon, On 2015/8/7 18:33, Julien Grall wrote: Hi Shannon, Just some clarification questions. On 07/08/15 03:11, Shannon Zhao wrote: 3. Dom0 gets grant table and event channel irq

[Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-06 Thread Shannon Zhao
This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. To Xen itself booting with ACPI, this is similar to Linux kernel except that Xen doesn't parse DSDT table. So I'll skip this part and focus on

[Xen-devel] [PATCH v2 1/2] ACPI/table: Always count matched and successfully parsed entries

2015-08-13 Thread Shannon Zhao
...@linaro.org Signed-off-by: Hanjun Guo hanjun@linaro.org Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- xen/drivers/acpi/tables.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/drivers/acpi/tables.c b

[Xen-devel] [PATCH v2 2/2] ACPI: disable ACPI cleanly when bad RSDP found

2015-08-13 Thread Shannon Zhao
. Signed-off-by: Len Brown len.br...@intel.com Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- xen/drivers/acpi/tables.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index 1da2127..6085fda 100644 --- a/xen

[Xen-devel] [PATCH v2 0/2] Port two ACPI fixes from Linux

2015-08-13 Thread Shannon Zhao
From: Shannon Zhao shannon.z...@linaro.org Len Brown (1): ACPI: disable ACPI cleanly when bad RSDP found Tomasz Nowicki (1): ACPI/table: Always count matched and successfully parsed entries xen/drivers/acpi/tables.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-13 Thread Shannon Zhao
On 2015/8/13 18:29, Christoffer Dall wrote: On Thu, Aug 13, 2015 at 11:22:19AM +0100, Ian Campbell wrote: On Thu, 2015-08-13 at 11:13 +0100, Stefano Stabellini wrote: For example it is only natural for the kernel to try to use the GIC hyp functionalities if they are

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-14 Thread Shannon Zhao
On 2015/8/12 17:11, Julien Grall wrote: On 12/08/2015 08:22, Shannon Zhao wrote: Hi, Hi Shannon, It's not part of the design discussion and we are avoiding to mix discussion. Can you please create another thread (or at least renaming the subject)? I'm working on re-spinning this patchset

Re: [Xen-devel] xen/arm: Crash when allocating memory for ACPI table (Was Re: Design doc of adding ACPI support for arm64 on Xen - version 2)

2015-08-14 Thread Shannon Zhao
Hi Julien, On 2015/8/14 22:17, Julien Grall wrote: (Renaming the subject) Hi Shannon, On 14/08/15 15:05, Shannon Zhao wrote: On 2015/8/12 17:11, Julien Grall wrote: On 12/08/2015 08:22, Shannon Zhao wrote: Hi, Hi Shannon, It's not part of the design discussion and we are avoiding

Re: [Xen-devel] [PATCH v2 0/2] Port two ACPI fixes from Linux

2015-08-14 Thread Shannon Zhao
On 2015/8/14 22:29, Jan Beulich wrote: On 14.08.15 at 16:16, shannon.z...@linaro.org wrote: On 2015/8/14 18:24, Jan Beulich wrote: On 14.08.15 at 05:36, zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Len Brown (1): ACPI: disable ACPI cleanly when bad RSDP

Re: [Xen-devel] [PATCH v2 0/2] Port two ACPI fixes from Linux

2015-08-14 Thread Shannon Zhao
Hi Jan, On 2015/8/14 18:24, Jan Beulich wrote: On 14.08.15 at 05:36, zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Len Brown (1): ACPI: disable ACPI cleanly when bad RSDP found Tomasz Nowicki (1): ACPI/table: Always count matched and successfully parsed

Re: [Xen-devel] xen/arm: Crash when allocating memory for ACPI table (Was Re: Design doc of adding ACPI support for arm64 on Xen - version 2)

2015-08-14 Thread Shannon Zhao
On 2015/8/14 22:53, Julien Grall wrote: On 14/08/15 15:49, Shannon Zhao wrote: Ok, so it's likely a memory corruption. You need to check the bound you ara using when copying the data to the guest or from the ACPI in general. Or maybe you just didn't allocate enough space. But it fails

Re: [Xen-devel] xen/arm: Crash when allocating memory for ACPI table (Was Re: Design doc of adding ACPI support for arm64 on Xen - version 2)

2015-08-14 Thread Shannon Zhao
On 2015/8/14 22:41, Julien Grall wrote: On 14/08/15 15:35, Shannon Zhao wrote: Do you copy data in the newly allocated memory between 2 xzalloc_bytes? No, I just use xzalloc_bytes to allocate some place and copy ACPI to the allocated place, modify the content, then call

[Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 3

2015-08-14 Thread Shannon Zhao
This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. Changes v2-v3: * remove the two HVM_PARAMs for grant table and let linux kernel use xlated_setup_gnttab_pages() to setup grant table. *

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-10 Thread Shannon Zhao
Hi Julien, On 2015/8/7 18:33, Julien Grall wrote: Hi Shannon, Just some clarification questions. On 07/08/15 03:11, Shannon Zhao wrote: 3. Dom0 gets grant table and event channel irq information --- As said above, we assign

Re: [Xen-devel] [PATCH 1/2] ACPI/table: Always count matched and successfully parsed entries

2015-08-12 Thread Shannon Zhao
On 2015/8/12 16:51, Jan Beulich wrote: On 04.08.15 at 06:19, zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org This is not true. All you did is port a Linux change. Will change this. acpi_parse_entries() allows to traverse all available table entries (aka

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-12 Thread Shannon Zhao
Hi, I'm working on re-spinning this patchset while encountering a werid problem about xzalloc_bytes. Since I need to copy some ACPI tables, I need to allocate some memory for it. So there are a few places calling xzalloc_bytes. And it fails at the fifth one. The log is shown as following: (XEN)

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-11 Thread Shannon Zhao
On 2015/8/11 23:52, Boris Ostrovsky wrote: On 08/11/2015 11:35 AM, Ian Campbell wrote: On Tue, 2015-08-11 at 11:29 -0400, Boris Ostrovsky wrote: On 08/11/2015 10:21 AM, Ian Campbell wrote: On Tue, 2015-08-11 at 15:19 +0100, Ian Campbell wrote: On Fri, 2015-08-07 at 10:11 +0800, Shannon Zhao

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 2

2015-08-11 Thread Shannon Zhao
On 2015/8/12 0:01, Julien Grall wrote: On 11/08/15 16:19, Ian Campbell wrote: IIRC we talked about it few months ago and you said that using balloon page will split in 4K the 1G/2M mapping done in the stage-2 p2m. Did I? Odd because I'm also of the opinion that alloc_ballooned_pages should

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-05 Thread Shannon Zhao
On 2015/8/4 22:37, Stefano Stabellini wrote: On Tue, 4 Aug 2015, Shannon Zhao wrote: This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may not be appropriate. Any comments are welcome. Good start! To Xen itself booting with ACPI

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-05 Thread Shannon Zhao
On 2015/8/5 18:31, Stefano Stabellini wrote: On Wed, 5 Aug 2015, Shannon Zhao wrote: On 2015/8/4 22:37, Stefano Stabellini wrote: On Tue, 4 Aug 2015, Shannon Zhao wrote: This document is going to explain the design details of Xen booting with ACPI on ARM. Maybe parts of it may

Re: [Xen-devel] Design doc of adding ACPI support for arm64 on Xen

2015-08-05 Thread Shannon Zhao
On 2015/8/5 20:48, Julien Grall wrote: On 05/08/15 12:49, Shannon Zhao wrote: That's great! Keep in mind that many ARM platforms have non-PCI busses, so I think we'll need an amba and a platform bus_notifier too, in addition to the existing pci bus notifier. Thanks for your reminding. I

[Xen-devel] [PATCH] efi: Fix booting failure with UEFI on ARM

2015-11-09 Thread Shannon Zhao
From: Shannon Zhao <shannon.z...@linaro.org> Commit 9fd08b4 (efi: split out efi_get_gop()) splits out the codes getting the pointer to GOP as efi_get_gop(), but it doesn't initialize the variable handles and gop to NULL like what the original codes do. This will cause booting failure on ARM

Re: [Xen-devel] [PATCH v2 1/2] xen: move wallclock functions from x86 to common

2015-11-10 Thread Shannon Zhao
Hi Stefano, When I apply this patch, there are some warnings. Applying: xen: move wallclock functions from x86 to common /home/open-source/xen/.git/rebase-apply/patch:268: trailing whitespace. return wc_sec + (wc_nsec + NOW()) / 10ULL

Re: [Xen-devel] Runtime services support for Xen on ARM

2015-11-12 Thread Shannon Zhao
On 2015/11/10 20:36, Ian Campbell wrote: > On Tue, 2015-11-10 at 12:26 +, Stefano Stabellini wrote: >> CC'ing xen-devel and Jan >> >> On Tue, 10 Nov 2015, Shannon Zhao wrote: >>> Hi Stefano, >>> >>> I'm working on adding Runtime services sup

Re: [Xen-devel] Runtime services support for Xen on ARM

2015-11-12 Thread Shannon Zhao
On 2015/11/12 19:04, Jan Beulich wrote: On 12.11.15 at 10:06, wrote: Today I try the way you suggested. Set USE_SET_VIRTUAL_ADDRESS_MAP on ARM and make a fake efi_rs_enter() and efi_rs_leave(). But when calling efi_init_memory, it fails with below log: You can't

Re: [Xen-devel] [PATCH v2 2/2] arm: export platform_op XENPF_settime64

2015-11-10 Thread Shannon Zhao
Hi Stefano, When I apply this patch, there are some warnings too. Applying: arm: export platform_op XENPF_settime64 /home/open-source/xen/.git/rebase-apply/patch:67: trailing whitespace. * /home/open-source/xen/.git/rebase-apply/patch:69: trailing whitespace. *

Re: [Xen-devel] [PATCH v3 24/62] arm: Introduce a generic way to use a device from acpi

2015-11-17 Thread Shannon Zhao
tree. >> >> Signed-off-by: Parth Dixit <parth.di...@linaro.org> >> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> >> --- >> xen/arch/arm/device.c| 19 +++ >> xen/arch/arm/xen.lds.S | 7 +++ >> xen/in

Re: [Xen-devel] [PATCH v3 01/62] Revert "xen/arm: vgic-v2: Drop cbase from arch_domain"

2015-11-17 Thread Shannon Zhao
Hi Julien, On 2015/11/17 19:27, Julien Grall wrote: > Hi Shannon, > > Why do you want to revert this patch? > Because d->arch.vgic.cbase will be used by creating Dom0 MADT table later. See [PATCH v3 43/62]. +gicc.base_address = d->arch.vgic.cbase; My previous way is get this from

Re: [Xen-devel] [PATCH v3 38/62] arm/acpi: Add placeholder for efi and acpi load address

2015-11-17 Thread Shannon Zhao
On 2015/11/17 19:58, Julien Grall wrote: > Hi Shannon, > > On 17/11/15 09:40, shannon.z...@linaro.org wrote: >> From: Shannon Zhao <shannon.z...@linaro.org> >> >> EFI table, memory description table and some of acpi tables will be >> placed a

Re: [Xen-devel] [PATCH v3 61/62] arm/acpi: Add acpi parameter to enable/disable acpi

2015-11-17 Thread Shannon Zhao
gt; ACPI is enabled instead of DT unless: > - ACPI has been disabled (acpi=off) > - the DT is not empty (it has more than just a /chosen node) and > ACPI has not been forced to be enabled (acpi=force). > Ok, will add this. >> >> Signed-off-by: Parth Dixit <part

Re: [Xen-devel] [PATCH v3 33/62] arm/uart: Create generic uart initialization function

2015-11-17 Thread Shannon Zhao
On 2015/11/17 19:49, Julien Grall wrote: > Hi Shannon, > > On 17/11/15 09:40, shannon.z...@linaro.org wrote: >> From: Parth Dixit >> >> Rename dt-uart.c to arm-uart.c and create new generic uart init function. >> Move dt_uart_init to arm_uart_init. > > It's very hard

Re: [Xen-devel] [PATCH 09/13] ARM: Xen: Initialize Xen specific UEFI runtime services

2015-11-17 Thread Shannon Zhao
On 2015/11/17 19:28, Ard Biesheuvel wrote: >> @@ -308,13 +311,18 @@ static int __init arm64_enable_runtime_services(void) >> > } >> > set_bit(EFI_SYSTEM_TABLES, ); >> > >> > - if (!efi_virtmap_init()) { >> > - pr_err("No UEFI virtual mapping was installed --

Re: [Xen-devel] [PATCH v3 56/62] arm/acpi: Deny MMIO access of UART

2015-11-17 Thread Shannon Zhao
On 2015/11/17 20:04, Julien Grall wrote: > On 17/11/15 09:40, shannon.z...@linaro.org wrote: >> From: Shannon Zhao <shannon.z...@linaro.org> >> >> Firstly it permits full MMIO capabilities for Dom0. Then deny MMIO >> access of UART device. > > I'm

Re: [Xen-devel] [PATCH v3 00/62] Add ACPI support for arm64 on Xen

2015-11-17 Thread Shannon Zhao
On 2015/11/17 19:10, David Vrabel wrote: > On 17/11/15 10:59, Jan Beulich wrote: >>>>> On 17.11.15 at 10:39, <shannon.z...@linaro.org> wrote: >>> From: Shannon Zhao <shannon.z...@linaro.org> >>> >>> This patch set adds ACPI support for arm

Re: [Xen-devel] [PATCH] efi: Fix booting failure with UEFI on ARM

2015-11-10 Thread Shannon Zhao
On 2015/11/10 18:45, Jan Beulich wrote: On 10.11.15 at 08:55, wrote: >> --- a/xen/common/efi/boot.c >> +++ b/xen/common/efi/boot.c >> @@ -636,8 +636,8 @@ static void __init efi_console_set_mode(void) >> static EFI_GRAPHICS_OUTPUT_PROTOCOL __init

Re: [Xen-devel] Runtime services support for Xen on ARM

2015-11-10 Thread Shannon Zhao
On 2015/11/10 20:36, Ian Campbell wrote: On Tue, 2015-11-10 at 12:26 +, Stefano Stabellini wrote: CC'ing xen-devel and Jan On Tue, 10 Nov 2015, Shannon Zhao wrote: Hi Stefano, I'm working on adding Runtime services support at Xen side. Most of work is adding the ARM part in xen/common

[Xen-devel] Design doc of adding ACPI support for arm64 on Xen - version 6

2015-11-05 Thread Shannon Zhao
This document is going to explain the design details of Xen booting with ACPI on ARM. Any comments are welcome. Changes v5->v6: * add a new node "uefi" under /hypervisor to pass UEFI informations to Dom0 instead of the nodes under /chosen. * change creation of MADT table, get the information

Re: [Xen-devel] [PATCH v3 24/62] arm: Introduce a generic way to use a device from acpi

2015-11-17 Thread Shannon Zhao
On 2015/11/17 22:25, Julien Grall wrote: > On 17/11/15 13:21, Shannon Zhao wrote: >>> AFAICT, it does only works for SPCR table used for UART device. For the >>> GIC you've hardcoded the value and I can't find any version number in >>> the table. >>> &

Re: [Xen-devel] [PATCH v3 01/62] Revert "xen/arm: vgic-v2: Drop cbase from arch_domain"

2015-11-17 Thread Shannon Zhao
On 2015/11/17 21:57, Julien Grall wrote: > On 17/11/15 12:32, Shannon Zhao wrote: >> > Hi Julien, >> > >> > On 2015/11/17 19:27, Julien Grall wrote: >>> >> Hi Shannon, >>> >> >>> >> Why do you want to revert this patch

Re: [Xen-devel] [PATCH 05/13] Xen: ARM: Add support for mapping platform device mmio

2015-11-17 Thread Shannon Zhao
On 2015/11/17 22:38, Konrad Rzeszutek Wilk wrote: > On Tue, Nov 17, 2015 at 05:57:03PM +0800, shannon.z...@linaro.org wrote: >> From: Shannon Zhao <shannon.z...@linaro.org> >> >> Add a bus_notifier for platform bus device in order to map the device >> mmio re

Re: [Xen-devel] [PATCH v3 50/62] xen/efi: store EFI system table in efi structure

2015-11-17 Thread Shannon Zhao
On 2015/11/17 19:57, Julien Grall wrote: > Hi Shannon, > > On 17/11/15 09:40, shannon.z...@linaro.org wrote: >> From: Shannon Zhao <shannon.z...@linaro.org> >> >> When preparing EFI tables for Dom0, it needs the information of EFI >> system table. Here s

Re: [Xen-devel] [PATCH 06/13] Xen: ARM: Add support for mapping amba device mmio

2015-11-17 Thread Shannon Zhao
On 2015/11/17 22:40, Konrad Rzeszutek Wilk wrote: > On Tue, Nov 17, 2015 at 05:57:04PM +0800, shannon.z...@linaro.org wrote: >> From: Shannon Zhao <shannon.z...@linaro.org> >> >> Add a bus_notifier for AMBA bus device in order to map the device >> mmio re

Re: [Xen-devel] [PATCH v3 38/62] arm/acpi: Add placeholder for efi and acpi load address

2015-11-17 Thread Shannon Zhao
On 2015/11/17 22:23, Julien Grall wrote: > Hi Shannon, > > On 17/11/15 12:45, Shannon Zhao wrote: >> >> >> On 2015/11/17 19:58, Julien Grall wrote: >>> Hi Shannon, >>> >>> On 17/11/15 09:40, shannon.z...@linaro.org wrote: >>>>

Re: [Xen-devel] [PATCH v3 51/62] arm/acpi: Prepare EFI system table for Dom0

2015-11-17 Thread Shannon Zhao
On 2015/11/17 20:02, Julien Grall wrote: > I'm nearly sure I already said it, this code already exists in the tree. > Why do you need to implement a new version? Ok, it needs to move the functions to the public place, right? So they can be called from other places. Thanks, -- Shannon

[Xen-devel] [PATCH v3 23/62] acpi/table: Introduce acpi_parse_entries

2015-11-17 Thread shannon . zhao
;naresh.b...@linaro.org> Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/drivers/acpi/tables.c | 53 ++- xen/include/xen/acpi.h| 3 +++ 2 files changed, 42 insertions(+), 14

[Xen-devel] [PATCH v3 19/62] arm/smpboot: Move dt specific code in smp to seperate functions

2015-11-17 Thread shannon . zhao
From: Parth Dixit <parth.di...@linaro.org> Partition smp initialization functions into generic and dt specific parts, this will be useful when introducing new functions for smp initialization based on acpi. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by:

[Xen-devel] [PATCH v3 21/62] arm/gic-v2: Refactor gicv2_init into generic and dt specific parts

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Refactor gic-v2 related functions into dt and generic parts. This will be helpful when adding acpi support for gic. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen

[Xen-devel] [PATCH v3 20/62] arm/acpi: Add ACPI support for SMP initialization

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> ACPI 5.1 only has two explicit methods to boot up SMP, PSCI and Parking protocol, but the Parking protocol is only specified for ARMv7 now, so make PSCI as the only way for the SMP boot protocol before some updates for the ACPI spec or the P

[Xen-devel] [PATCH v3 22/62] arm/gic-v3: Refactor gicv3_init into generic and dt specific parts

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Refactor gic-v3 related functions into dt and generic parts. This will be helpful when adding acpi support for gic-v3. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/g

[Xen-devel] [PATCH v3 25/62] acpi/table: Introduce acpi_get_entry to get specified entry

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> When constructing MADT table for Dom0, it needs to create GICC subtable according to the dom0_max_vcpus. This function could be used for get the specified entry. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/drivers/acpi/t

[Xen-devel] [PATCH v3 24/62] arm: Introduce a generic way to use a device from acpi

2015-11-17 Thread shannon . zhao
From: Parth Dixit <parth.di...@linaro.org> Add generic way to use device from acpi similar to the way it is supported in device tree. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/de

[Xen-devel] [PATCH v3 27/62] arm/gic-v3: Add ACPI boot support for GICv3

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Like GICv2, ACPI on Xen hypervisor uses MADT table for proper GICv3 initialization. Parse GIC distributor subtable, redistributor subtable and interrupt subtable. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/gi

[Xen-devel] [PATCH 06/13] Xen: ARM: Add support for mapping amba device mmio

2015-11-17 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> --- drivers/xen/Makefile | 1 + drivers/xen/a

[Xen-devel] [PATCH 07/13] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2015-11-17 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. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- Documentation/devicetree/bindings/arm/xen.txt | 25 ++

[Xen-devel] [PATCH 11/13] xen/hvm/params: Add a new dilivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Add a new dilivery type: val[63:56] == 3: val[15:8] is flag: val[7:0] is a PPI. To the flag, bit 0 stands the interrupt mode is edge(1) or level(0) and bit 1 stands the interrupt polarity is active low(1) or high(0). Signed-off-by: Shanno

[Xen-devel] [PATCH 12/13] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> 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> --- arch/arm/xen/enlighten.c | 23 +++ 1 file changed, 19 insertions(+),

[Xen-devel] [PATCH 09/13] ARM: Xen: Initialize Xen specific UEFI runtime services

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> When running on Xen hypervisor, runtime services are supported through hypercall. So call Xen specific function to initialize runtime services. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- arch/arm/include/asm/xen/hype

[Xen-devel] [PATCH 08/13] Xen: EFI: Parse DT parameters for Xen specific UEFI

2015-11-17 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. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- drivers/firmware/ef

[Xen-devel] [PATCH 05/13] Xen: ARM: Add support for mapping platform device mmio

2015-11-17 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> --- drivers/xen/Makefile | 1 + drivers/xen/plat

[Xen-devel] [PATCH v3 52/62] arm/acpi: Prepare EFI memory descriptor for Dom0

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Create a few EFI memory descriptors to tell Dom0 the RAM region information, ACPI table regions and EFI tables reserved resions. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org

[Xen-devel] [PATCH v3 46/62] arm/acpi: Prepare XSDT table for Dom0

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Copy and modify XSDT table before passing it to Dom0. Repalce the entry value of the copied table. Add a new entry for STAO table as well. And keep entry value of other reused tables unchanged. Signed-off-by: Shannon Zhao <shannon.z...@l

[Xen-devel] [PATCH v3 48/62] arm/acpi: Prepare RSDP table for Dom0

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Copy RSDP table and replace rsdp->xsdt_physical_address with new address of XSDT table, so it can point to the right XSDT table. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/doma

[Xen-devel] [PATCH v3 54/62] arm/acpi: Create min DT stub for Dom0

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Create a DT for Dom0 for ACPI-case only. DT contains minimal required informations such as Dom0 bootargs, initrd, efi description table and address of uefi memory table. Signed-off-by: Naresh Bhat <naresh.b...@linaro.org> Signed-off-by:

[Xen-devel] [PATCH v3 50/62] xen/efi: store EFI system table in efi structure

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> When preparing EFI tables for Dom0, it needs the information of EFI system table. Here store it in efi structure. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/com

[Xen-devel] [PATCH v3 47/62] arm/p2m: Add helper functions to map memory regions

2015-11-17 Thread shannon . zhao
From: Parth Dixit <parth.di...@linaro.org> Create a helper function for mapping with cached attributes. Signed-off-by: Parth Dixit <parth.di...@linaro.org> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/p2m.c| 26 ++ x

[Xen-devel] [PATCH v3 49/62] arm/acpi: Map rest tables for Dom0

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Map other reused tables for Dom0. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- xen/arch/arm/domain_build.c | 25 + 1 file changed, 25 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/

[Xen-devel] [PATCH 02/13] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2015-11-17 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 when booting with ACPI. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- arch/x86/xen/grant-

[Xen-devel] [PATCH 04/13] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> 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 2ecfe4f..9aa8988 100644 -

[Xen-devel] [PATCH 01/13] Xen : Hide UART used by Xen

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> According to the STAO table, hide UART used by Xen from Dom0. Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> --- drivers/acpi/bus.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/acpi/bus.c b/

[Xen-devel] [PATCH 00/13] Add ACPI support for Xen Dom0 on ARM64

2015-11-17 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

[Xen-devel] [PATCH 03/13] arm/xen: Use xlated_setup_gnttab_pages to setup grant table

2015-11-17 Thread shannon . zhao
From: Shannon Zhao <shannon.z...@linaro.org> Use xlated_setup_gnttab_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> --- arch/arm/xen/enlighten.c | 10 +-

  1   2   3   4   5   6   7   8   9   10   >