Re: [Xen-devel] MiniOS on ARM64

2016-04-28 Thread Chen Baozi
o Connect that you are working > on an ARM64 port of MiniOS. > > Anastassios, in CC, is interested get MiniOS running on ARM64 as well. > > Do you know what is missing to get MiniOS booting? I have found a tree > on your github for the port

Re: [Xen-devel] Frequent reports about Xen unstable hanging on ARM boots

2016-03-16 Thread Chen Baozi
On Tue, Mar 15, 2016 at 06:37:43PM +, Julien Grall wrote: > (CC Chen for the omap port) > > Hi Lars, > > On 15/03/16 10:56, Lars Kurth wrote: > >Folks, > > > >I just noticed a cluster of issues related to Xen unstable hanging on > >various ARM boards. See > >* >

[Xen-devel] Mini-OS on ARM64

2015-11-09 Thread Chen Baozi
Hi all, With plenty of ugly hacks, mini-os is now able to boot on my arm64 board: (d37) - Mini-OS booting - (d37) - Setup CPU - (d37) - Setup booting pagetable - (d37) - MMU on - (d37) - Setup stack - (d37) - Jumping to C entry - (d37) Checking DTB at ffbff000... (d37) map_console, phys

[Xen-devel] [PATCH v9 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC - Both

[Xen-devel] [PATCH v9 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com Acked-by: Ian Campbell

[Xen-devel] [PATCH v9 4/8] xen/arm: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com The old unsigned long type of vcpu_mask can only express 64 cpus at the most, which might not be enough for the guest which used vGICv3. We introduce a new struct sgi_target for the target cpu list of SGI, which holds the affinity path information (only level 1

[Xen-devel] [PATCH v9 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH v9 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. (See the note of 'Bits[15:0]' in '5.7.29 ICC_SGI0R_EL1 ICC_SGI1R_EL1 and ICC_ASGI1R_EL1, GICv3 Architecture Specification') That is to say the upper 4 bits of affinity 0 is unused

[Xen-devel] [PATCH v9 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH v9 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-06-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH v8 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. (See the note of 'Bits[15:0]' in '5.7.29 ICC_SGI0R_EL1 ICC_SGI1R_EL1 and ICC_ASGI1R_EL1, GICv3 Architecture Specification') That is to say the upper 4 bits of affinity 0 is unused

[Xen-devel] [PATCH v8 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH v8 4/8] xen/arm: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com The old unsigned long type of vcpu_mask can only express 64 cpus at the most, which might not be enough for the guest which used vGICv3. We introduce a new struct sgi_target for the target cpu list of SGI, which holds the affinity path information (only level 1

[Xen-devel] [PATCH v8 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH v8 7/8] xen/arm: make domain_max_vcpus return value from vgic_ops

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Each vGIC driver supports different maximum numbers of vCPU. For example, GICv2 is limited to 8 vCPUs, while GICv3 can support up to 4096 vCPUs if we use both AFF0 and AFF1. Thus, domain_max_vcpus should depend on not only MAX_VIRT_CPUS but also the version

[Xen-devel] [PATCH v8 8/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com After we have increased the size of GICR in address space for guest and made use of both AFF0 and AFF1 in (v)MPIDR, we are now able to support up to 4096 vCPUs in theory. However, it will cost 512M address space for GICR region, which is unnecessary big

[Xen-devel] [PATCH v8 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH v8 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com Acked-by: Ian Campbell

[Xen-devel] [PATCH v8 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-06-12 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC - Both

Re: [Xen-devel] [PATCH V6 08/10] xen: Add arch_domain_preinit to initialise vGIC before evtchn_init

2015-06-11 Thread Chen Baozi
On Fri, Jun 05, 2015 at 05:22:56PM +0100, Ian Campbell wrote: On Mon, 2015-06-01 at 20:56 +0800, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com evtchn_init will call domain_max_vcpus to allocate poll_mask. On arm/arm64 platform, this number is determined by the vGIC the guest

Re: [Xen-devel] [PATCH V6 08/10] xen: Add arch_domain_preinit to initialise vGIC before evtchn_init

2015-06-11 Thread Chen Baozi
On Thu, Jun 11, 2015 at 10:37:05AM +0100, Ian Campbell wrote: On Thu, 2015-06-11 at 17:20 +0800, Chen Baozi wrote: On Fri, Jun 05, 2015 at 05:22:56PM +0100, Ian Campbell wrote: On Mon, 2015-06-01 at 20:56 +0800, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com evtchn_init

Re: [Xen-devel] [PATCH V6 08/10] xen: Add arch_domain_preinit to initialise vGIC before evtchn_init

2015-06-11 Thread Chen Baozi
Hi Julien, On Thu, Jun 11, 2015 at 07:47:11AM -0400, Julien Grall wrote: Hi Chen, On 11/06/2015 07:16, Chen Baozi wrote: On Thu, Jun 11, 2015 at 10:37:05AM +0100, Ian Campbell wrote: On Thu, 2015-06-11 at 17:20 +0800, Chen Baozi wrote: On Fri, Jun 05, 2015 at 05:22:56PM +0100, Ian Campbell

[Xen-devel] [PATCH v7 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH v7 7/8] xen/arm: make domain_max_vcpus return value from vgic_ops

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com When a guest uses vGICv2, the maximum number of vCPU it can support should not be as many as MAX_VIRT_CPUS, which will be more than 8 when GICv3 is used on arm64. So the domain_max_vcpus should return the value according to the vGIC the domain uses. We didn't

[Xen-devel] [PATCH v7 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V7 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH v7 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. (See the note of 'Bits[15:0]' in '5.7.29 ICC_SGI0R_EL1 ICC_SGI1R_EL1 and ICC_ASGI1R_EL1, GICv3 Architecture Specification') That is to say the upper 4 bits of affinity 0 is unused

[Xen-devel] [PATCH v7 4/8] xen/arm: Use struct sgi_target instead of vcpu_mask in vgic_to_sgi

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com The old unsigned long type of vcpu_mask can only express 64 cpus at the most, which might not be enough for the guest which used vGICv3. We introduce a new struct sgi_target for the target cpu list of SGI, which holds the affinity path information. For GICv2

[Xen-devel] [PATCH v7 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com Acked-by: Ian Campbell

[Xen-devel] [PATCH v7 8/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com After we have increased the size of GICR in address space for guest and made use of both AFF0 and AFF1 in (v)MPIDR, we are now able to support up to 4096 vCPUs in theory. However, it will cost 512M address space for GICR region, which is unnecessary big

[Xen-devel] [PATCH v7 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-06-11 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC - Also

Re: [Xen-devel] [PATCH v7 4/8] xen/arm: Use struct sgi_target instead of vcpu_mask in vgic_to_sgi

2015-06-11 Thread Chen Baozi
On Thu, Jun 11, 2015 at 09:05:06PM +0800, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com The old unsigned long type of vcpu_mask can only express 64 cpus at the most, which might not be enough for the guest which used vGICv3. We introduce a new struct sgi_target for the target cpu list

Re: [Xen-devel] [PATCH V6 04/10] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi

2015-06-10 Thread Chen Baozi
On Fri, Jun 05, 2015 at 05:05:29PM +0100, Ian Campbell wrote: On Mon, 2015-06-01 at 20:56 +0800, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com Use cpumask_t instead of unsigned long which can only express 64 cpus at the most. Add the {gicv2|gicv3}_sgir_to_cpumask in corresponding

[Xen-devel] [PATCH V6 02/10] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. That is to say the upper 4 bits of affinity 0 is unused. Current implementation considers that AFF0 is equal to vCPUID, which makes all vCPUs in one cluster, limiting its number

[Xen-devel] [PATCH V6 01/10] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com --- xen/include/public/arch

[Xen-devel] [PATCH V6 03/10] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC - Also

[Xen-devel] [PATCH V6 08/10] xen: Add arch_domain_preinit to initialise vGIC before evtchn_init

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com evtchn_init will call domain_max_vcpus to allocate poll_mask. On arm/arm64 platform, this number is determined by the vGIC the guest is going to use, which won't be initialised until arch_domain_create is called in current implementation. However, moving

[Xen-devel] [PATCH V6 04/10] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Use cpumask_t instead of unsigned long which can only express 64 cpus at the most. Add the {gicv2|gicv3}_sgir_to_cpumask in corresponding vGICs to translate GICD_SGIR/ICC_SGI1R_EL1 to vcpu_mask for vgic_to_sgi. Signed-off-by: Chen Baozi baoz...@gmail.com

[Xen-devel] [PATCH V6 06/10] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V6 05/10] xen/arm64: gicv3: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com To support more than 16 vCPUs, we have to calculate cpumask with AFF1 field value in ICC_SGI1R_EL1. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c| 30 ++ xen/include/asm-arm/gic_v3_defs.h | 2

[Xen-devel] [PATCH V6 07/10] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V6 09/10] xen/arm: make domain_max_vcpus return value from vgic_ops

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com When a guest uses vGICv2, the maximum number of vCPU it can support should not be as many as MAX_VIRT_CPUS, which will be more than 8 when GICv3 is used on arm64. So the domain_max_vcpus should return the value according to the vGIC the domain uses. We didn't

[Xen-devel] [PATCH V6 10/10] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-06-01 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com After we have increased the size of GICR in address space for guest and made use of both AFF0 and AFF1 in (v)MPIDR, we are now able to support up to 4096 vCPUs in theory. However, it will cost 512M address space for GICR region, which is not necessary big

Re: [Xen-devel] [PATCH V5 09/10] xen/arm: make domain_max_vcpus return value from vgic_ops

2015-05-31 Thread Chen Baozi
On May 31, 2015, at 21:35, Julien Grall julien.gr...@citrix.com wrote: Hi Chen, On 30/05/2015 12:07, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com When a guest uses vGICv2, the maximum number of vCPU it can support should not be as many as MAX_VIRT_CPUS, which is 128

Re: [Xen-devel] [PATCH V5 05/10] xen/arm64: gicv3: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-05-31 Thread Chen Baozi
Hi Julien, On May 31, 2015, at 21:14, Julien Grall julien.gr...@citrix.com wrote: Hi Chen, On 30/05/2015 12:07, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com To support more than 16 vCPUs, we have to calculate cpumask with AFF1 field value in ICC_SGI1R_EL1. Signed-off

Re: [Xen-devel] [PATCH V5 10/10] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-31 Thread Chen Baozi
On May 31, 2015, at 21:40, Julien Grall julien.gr...@citrix.com wrote: Hi Chen, On 30/05/2015 12:07, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. Where did you find this restriction

Re: [Xen-devel] [PATCH V5 05/10] xen/arm64: gicv3: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-05-31 Thread Chen Baozi
On Sat, May 30, 2015 at 07:07:26PM +0800, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com To support more than 16 vCPUs, we have to calculate cpumask with AFF1 field value in ICC_SGI1R_EL1. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c| 9

Re: [Xen-devel] [PATCH V5 10/10] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-31 Thread Chen Baozi
On Sun, May 31, 2015 at 07:21:22PM +0100, Julien Grall wrote: Hi Chen, On 31/05/2015 16:37, Chen Baozi wrote: On May 31, 2015, at 21:40, Julien Grall julien.gr...@citrix.com wrote: Hi Chen, On 30/05/2015 12:07, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com GIC-500 supports

[Xen-devel] [PATCH V5 00/10] Support more than 8 vcpus on arm64 with GICv3

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH V5 01/10] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com --- xen/include/public/arch

[Xen-devel] [PATCH V5 03/10] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC - Also

[Xen-devel] [PATCH V5 04/10] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Use cpumask_t instead of unsigned long which can only express 64 cpus at the most. Add the {gicv2|gicv3}_sgir_to_cpumask in corresponding vGICs to translate GICD_SGIR/ICC_SGI1R_EL1 to vcpu_mask for vgic_to_sgi. Signed-off-by: Chen Baozi baoz...@gmail.com

[Xen-devel] [PATCH V5 06/10] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V5 02/10] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. That is to say the upper 4 bits of affinity 0 is unused. Current implementation considers that AFF0 is equal to vCPUID, which makes all vCPUs in one cluster, limiting its number

[Xen-devel] [PATCH V5 05/10] xen/arm64: gicv3: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com To support more than 16 vCPUs, we have to calculate cpumask with AFF1 field value in ICC_SGI1R_EL1. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c| 9 - xen/include/asm-arm/gic_v3_defs.h | 3 +++ 2 files changed, 11

[Xen-devel] [PATCH V5 10/10] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. Since the domain_max_vcpus has been changed to depends on vgic_ops, we could have done more work in order to drop the definition of MAX_VIRT_CPUS. However, because

[Xen-devel] [PATCH V5 09/10] xen/arm: make domain_max_vcpus return value from vgic_ops

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com When a guest uses vGICv2, the maximum number of vCPU it can support should not be as many as MAX_VIRT_CPUS, which is 128 at the moment. So the domain_max_vcpus should return the value according to the vGIC the domain uses. We didn't keep it as the old static

[Xen-devel] [PATCH V5 07/10] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V5 08/10] xen: Call arch_domain_create() before evtchn_init()

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com evtchn_init() will call domain_max_vcpus() to allocate poll_mask, which needs the max vCPU number returned by domain_max_vcpus(). On arm/arm64 platform, this number is determined by the vGIC the guest is going to use, which won't be initialised until

[Xen-devel] [PATCH V4 01/10] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-05-30 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com --- xen/include/public/arch

Re: [Xen-devel] [PATCH V4 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-05-29 Thread Chen Baozi
Hi Julien, On Fri, May 29, 2015 at 05:08:08PM +0100, Julien Grall wrote: On 29/05/15 16:55, Ian Campbell wrote: On Fri, 2015-05-29 at 16:44 +0100, Julien Grall wrote: +name = GCSPRINTF(cpu@%lx, mpidr_aff); It's not necessary to change the cpu@. AIUI it is conventional in

Re: [Xen-devel] [PATCH V4 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-05-29 Thread Chen Baozi
On Sat, May 30, 2015 at 10:08:21AM +0800, Chen Baozi wrote: Hi Julien, On Fri, May 29, 2015 at 05:08:08PM +0100, Julien Grall wrote: On 29/05/15 16:55, Ian Campbell wrote: On Fri, 2015-05-29 at 16:44 +0100, Julien Grall wrote: +name = GCSPRINTF(cpu@%lx, mpidr_aff

Re: [Xen-devel] [PATCH V4 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-05-29 Thread Chen Baozi
On Fri, May 29, 2015 at 04:49:42PM +0100, Julien Grall wrote: Hi Chen, On 28/05/15 11:15, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg

[Xen-devel] [PATCH V3 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V3 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. That is to say the upper 4 bits of affinity 0 is unused. Current implementation considers that AFF0 is equal to vCPUID, which makes all vCPUs in one cluster, limiting its number

[Xen-devel] [PATCH V3 4/8] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Use cpumask_t instead of unsigned long which can only express 64 cpus at the most. Add the {gicv2|gicv3}_sgir_to_cpumask in corresponding vGICs to translate GICD_SGIR/ICC_SGI1R_EL1 to vcpu_mask for vgic_to_sgi. Signed-off-by: Chen Baozi baoz...@gmail.com

[Xen-devel] [PATCH V3 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V3 7/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c | 1 - xen/include/asm-arm/config.h | 4 2 files changed, 4 insertions(+), 1 deletion

[Xen-devel] [PATCH V3 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH V3 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com --- xen/include/public/arch

[Xen-devel] [PATCH V3 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC Signed-off

Re: [Xen-devel] [PATCH V3 8/8] xen/arm: make domain_max_vcpus be alias of max_vcpus in struct domain

2015-05-28 Thread Chen Baozi
Hi Andrew, On Thu, May 28, 2015 at 09:50:38AM +0100, Andrew Cooper wrote: On 28/05/15 08:44, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com Since the maximum vcpu information is already saved in the struct domain, there is no need for domain_max_vpus to return the fixed value

[Xen-devel] [PATCH V4 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. That is to say the upper 4 bits of affinity 0 is unused. Current implementation considers that AFF0 is equal to vCPUID, which makes all vCPUs in one cluster, limiting its number

[Xen-devel] [PATCH V4 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maximum number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com Reviewed-by: Julien Grall julien.gr...@citrix.com --- xen/include/public/arch

[Xen-devel] [PATCH V4 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3. To create a guest up to 128 vCPUs, which

[Xen-devel] [PATCH V4 8/8] xen/arm: make domain_max_vcpus return value according to vGIC version

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com When a guest uses vGICv2, the maximum number of vCPU it can support should not be as many as MAX_VIRT_CPUS, which is 128 at the moment. So the domain_max_vcpus should return the value according to the vGIC version the domain uses. We didn't keep it as the old

[Xen-devel] [PATCH V4 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIDR affinity information when booting with vPSCI in vGIC Signed-off

[Xen-devel] [PATCH V4 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

[Xen-devel] [PATCH V4 7/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c | 1 - xen/include/asm-arm/config.h | 4 2 files changed, 4 insertions(+), 1 deletion

[Xen-devel] [PATCH V4 4/8] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Use cpumask_t instead of unsigned long which can only express 64 cpus at the most. Add the {gicv2|gicv3}_sgir_to_cpumask in corresponding vGICs to translate GICD_SGIR/ICC_SGI1R_EL1 to vcpu_mask for vgic_to_sgi. Signed-off-by: Chen Baozi baoz...@gmail.com

[Xen-devel] [PATCH V4 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity

2015-05-28 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com According to ARM CPUs bindings, the reg field should match the MPIDR's affinity bits. We will use AFF0 and AFF1 when constructing the reg value of the guest at the moment, for it is enough for the current max vcpu number. Signed-off-by: Chen Baozi baoz

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Clean the emulation of IROUTER

2015-05-26 Thread Chen Baozi
a vCPU from the affinity in a single place. It will be easier to change the way to do it later. Signed-off-by: Julien Grall julien.gr...@citrix.com Cc: Chen Baozi c...@baozis.org Acked-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c | 100

Re: [Xen-devel] [PATCH V2 1/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-24 Thread Chen Baozi
On Sat, May 23, 2015 at 03:46:32PM +0100, Julien Grall wrote: Hi Chen, On 23/05/2015 14:52, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. This series have to be bisectable. Although

[Xen-devel] [PATCH V2 3/8] xen/arm: Add funtions of mapping between vCPUID and vMPIDR

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. That is to say the upper 4 bits of affinity 0 is unused. Current implementation considers that AFF0 is equal to vCPUID, which makes all vCPUs in one cluster, limiting its number

[Xen-devel] [PATCH V2 2/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently it only supports up to 8 vCPUs. Increase the region to hold up to 128 vCPUs, which is the maxium number that GIC-500 supports. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/include/public/arch-arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[Xen-devel] [PATCH V2 0/8] Support more than 8 vcpus on arm64 with GICv3

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com [Sorry for the incorrect list address previously.] Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. Increasing the size makes the number expand to 16 because of AFF0 restriction on GICv3

[Xen-devel] [PATCH V2 1/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS to 128 on arm64. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c | 2 +- xen/include/asm-arm/config.h | 4 2 files changed, 5 insertions(+), 1 deletion

[Xen-devel] [PATCH V2 4/8] xen/arm: Use the new mapping relations between vCPUID and vMPIDR

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com There are 3 places to change: * Initialise vMPIDR value in vcpu_initialise() * Find the vCPU from vMPIDR affinity information when accessing GICD registers in vGIC * Find the vCPU from vMPIRR affinity information when booting with vPSCI in vGIC Signed-off

[Xen-devel] [PATCH V2 5/8] xen/arm: vGIC: Consider AFF1 when injecting SGI.

2015-05-23 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Use the AFF1 value of ICC_SGI1R_EL1 when injecting SGI in vGIC, which expands the number of supported vCPU more than 16 that target list bitmap can hold independently. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic.c | 10 -- 1 file

[Xen-devel] [RFC 4/4] xen/arm: Remove unnecessary GUEST_GICV3_GICR0_SIZE macro.

2015-05-14 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/include/public/arch-arm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index c029e0f..cbcda74 100644 --- a/xen/include

[Xen-devel] [RFC 1/4] xen/arm64: Map the redistributor region by max_vcpus of domU danamically

2015-05-14 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com The number of redistributor is determined by the number of CPU interface. So we postpone redistributor mmio size initialization to the point when the max_vcpus is set. Signed-off-by: Chen Baozi baoz...@gmail.com --- xen/arch/arm/vgic-v3.c | 24

[Xen-devel] [RFC 0/4] Support more than 8 vcpus on arm64 with GICv3

2015-05-14 Thread Chen Baozi
From: Chen Baozi baoz...@gmail.com Currently the number of vcpus on arm64 with GICv3 is limited up to 8 due to the fixed size of redistributor mmio region. In this patch series, I postpone setting the size of GICR0 to the point when max_vcpus of a domU is determined to support more than 8

Re: [Xen-devel] [RFC 00/22] xen/arm: Add support for GICv2 on GICv3

2015-05-13 Thread Chen Baozi
with GICv3. It looks good for me. (I have created a domU with gic_version='v2' and one with gic_version='v3'. Both of them can be successfully booted.) I think you can add 'Tested-and-Acked-by: Chen Baozi baoz...@gmail.com' to those patches related to GICv3 or common codes. (I haven't test it on my OMAP5

Re: [Xen-devel] [PATCH] xen/arm: gic-v3: Implement correctly the callback send_SGI

2015-05-09 Thread Chen Baozi
field. So use gicv3_send_sgi_list and pass the cpumask of the current CPU - SGI_TARGET_LIST: Directly call gicv3_send_sgi_list with the given cpumask Also, use WRITE_SYSREG64 to write into ICC_SGI1R_EL1 the access is 64-bit on all the architectures. Reported-by: Chen Baozi baoz

Re: [Xen-devel] [PATCH] xen/arm64: Avoid sending SGI when kicking secondary cpus with spin_table

2015-05-09 Thread Chen Baozi
Hi Julien, On Fri, May 08, 2015 at 05:38:47PM +0100, Julien Grall wrote: Hi Chen, On 07/04/15 08:33, Chen Baozi wrote: From: Chen Baozi baoz...@gmail.com On arm64, either firmware or xen's smp_up_cpu gate uses WFE on secondary cpus to stand-by when booting. Thus, using SEV is enough

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
it. Chen, I've not included your Tested-by from last time around since I think things here differ enough to have invalidated it. Tested-by: Chen Baozi baoz...@gmail.com This patch set should be OK. However, in order to test it, I have to rebase to the latest git tree, which seems to have

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 03:52:06PM +0800, Chen Baozi wrote: On Mon, Apr 20, 2015 at 01:15:29PM +0100, Ian Campbell wrote: This series adds parsing of the DT ranges and interrupt-map properties for PCI devices, these contain the MMIOs and IRQs used by children on the bus. This replaces

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 04:22:31PM +0800, Chen Baozi wrote: On Thu, Apr 23, 2015 at 03:52:06PM +0800, Chen Baozi wrote: On Mon, Apr 20, 2015 at 01:15:29PM +0100, Ian Campbell wrote: This series adds parsing of the DT ranges and interrupt-map properties for PCI devices, these contain

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 11:16:36AM +0100, Ian Campbell wrote: On Thu, 2015-04-23 at 17:02 +0800, Chen Baozi wrote: report: FATAL: sd_listen_fds() failed : File exists when trying to run xenstored. Well. It is related to systemd on jessie. Disabling systemd when building

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-22 Thread Chen Baozi
On Tue, Apr 21, 2015 at 12:11:01PM +0100, Stefano Stabellini wrote: Chen, could you please try the patch below in your repro scenario? I have only build tested it. --- xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM From: Chen Baozi baoz...@gmail.com Make sure

  1   2   >