Re: [Qemu-devel] [PATCH v8 0/5] ARM: Add NUMA support for machine virt

2016-05-05 Thread Peter Maydell
On 26 April 2016 at 12:21, Andrew Jones  wrote:
> On Tue, Apr 26, 2016 at 06:40:24PM +0800, Shannon Zhao wrote:
>> From: Shannon Zhao 
>>
>> Add NUMA support for machine virt. Tested successfully running a guest
>> Linux kernel with the following patch applied:
>>
>> - [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms
>> https://lkml.org/lkml/2016/4/8/571
>> - [PATCH v5 00/14] ACPI NUMA support for ARM64
>> https://lkml.org/lkml/2016/4/19/852
>
> This series looks good to me, but I guess we still need to wait
> for the DT spec[*] to be merged first. Hopefully that'll happen
> around the time that the 2.7 dev window opens.

I'm going to put this series into target-arm.next now, really just
so I can get it off my to-review list. I think the DT spec being
in the for-next branch is a reasonable implication that it's stable,
and in the worst case that we need to make fixups we have plenty
of time before our next QEMU release to do them in.
Please let me know if any spec change does happen before the DT
hits mainline...

thanks
-- PMM



Re: [Qemu-devel] [PATCH v8 0/5] ARM: Add NUMA support for machine virt

2016-04-30 Thread Shannon Zhao
On 2016年04月26日 19:21, Andrew Jones wrote:
> On Tue, Apr 26, 2016 at 06:40:24PM +0800, Shannon Zhao wrote:
>> > From: Shannon Zhao 
>> > 
>> > Add NUMA support for machine virt. Tested successfully running a guest
>> > Linux kernel with the following patch applied:
>> > 
>> > - [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms
>> > https://lkml.org/lkml/2016/4/8/571
>> > - [PATCH v5 00/14] ACPI NUMA support for ARM64
>> > https://lkml.org/lkml/2016/4/19/852
> This series looks good to me, but I guess we still need to wait
> for the DT spec[*] to be merged first. Hopefully that'll happen
> around the time that the 2.7 dev window opens.
> 
> Thanks,
> drew
> [*] https://lkml.org/lkml/2016/4/8/572
> 
Yes, and I see this patch has been queued by ARM64 Maintainer. So it's
very hopeful I think.

https://git.kernel.org/cgit/linux/kernel/git/arm64/linux.git/commit/?h=for-next/core=2bc4da1d2b4d828cb4e3a5593967556b1bd78898

Thanks,
-- 
Shannon



Re: [Qemu-devel] [PATCH v8 0/5] ARM: Add NUMA support for machine virt

2016-04-26 Thread Andrew Jones
On Tue, Apr 26, 2016 at 06:40:24PM +0800, Shannon Zhao wrote:
> From: Shannon Zhao 
> 
> Add NUMA support for machine virt. Tested successfully running a guest
> Linux kernel with the following patch applied:
> 
> - [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms
> https://lkml.org/lkml/2016/4/8/571
> - [PATCH v5 00/14] ACPI NUMA support for ARM64
> https://lkml.org/lkml/2016/4/19/852

This series looks good to me, but I guess we still need to wait
for the DT spec[*] to be merged first. Hopefully that'll happen
around the time that the 2.7 dev window opens.

Thanks,
drew
[*] https://lkml.org/lkml/2016/4/8/572

> 
> Example qemu command line:
> qemu-system-aarch64 \
> -enable-kvm -smp 4\
> -kernel Image \
> -m 512 -machine virt,kernel_irqchip=on \
> -initrd guestfs.cpio.gz \
> -cpu host -nographic \
> -numa node,mem=256M,cpus=0-1,nodeid=0 \
> -numa node,mem=256M,cpus=2-3,nodeid=1 \
> -append "console=ttyAMA0 root=/dev/ram"
> 
> Changes since v7:
> * fix code style suggested by Marcel
> * rename acpi_build_srat_memory to build_srat_memory
> 
> Changes since v6:
> * squash first two patches of previous series together
> * fix the definition of proximity in AcpiSratMemoryAffinity
> * rename acpi_build_srat_memory to build_acpi_srat_memory
> 
> Changes since v5:
> * don't generate /distance-map node since it's optional
> * improve the /memory node name
> * move acpi_build_srat_memory to common place then reuse it to generate
>   SRAT table
> 
> Changes since v4:
> * rebased on new kernel driver and device bindings, especially the
>   compatible string "numa-distance-map-v1" of /distance-map node
> * set the numa-node-id for first /memory node
> 
> Changes since v3:
> * based on new kernel driver and device bindings
> * add ACPI part
> 
> Changes since v2:
> * update to use NUMA node property arm,associativity.
> 
> Changes since v1:
> Take into account Peter's comments:
> * rename virt_memory_init to arm_generate_memory_dtb
> * move arm_generate_memory_dtb to boot.c and make it a common func
> * use a struct numa_map to generate numa dtb
> 
> Shannon Zhao (5):
>   ARM: Virt: Set numa-node-id for cpu and memory nodes
>   ACPI: Add GICC Affinity Structure
>   ACPI: Fix the definition of proximity in AcpiSratMemoryAffinity
>   ACPI: move acpi_build_srat_memory to common place
>   ACPI: Virt: Generate SRAT table
> 
>  hw/acpi/aml-build.c | 11 ++
>  hw/arm/boot.c   | 43 +++--
>  hw/arm/virt-acpi-build.c| 52 
> +
>  hw/arm/virt.c   |  8 +++
>  hw/i386/acpi-build.c| 41 +--
>  include/hw/acpi/acpi-defs.h | 17 +--
>  include/hw/acpi/aml-build.h | 10 +
>  7 files changed, 143 insertions(+), 39 deletions(-)
> 
> -- 
> 2.0.4
> 
> 
> 



[Qemu-devel] [PATCH v8 0/5] ARM: Add NUMA support for machine virt

2016-04-26 Thread Shannon Zhao
From: Shannon Zhao 

Add NUMA support for machine virt. Tested successfully running a guest
Linux kernel with the following patch applied:

- [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms
https://lkml.org/lkml/2016/4/8/571
- [PATCH v5 00/14] ACPI NUMA support for ARM64
https://lkml.org/lkml/2016/4/19/852

Example qemu command line:
qemu-system-aarch64 \
-enable-kvm -smp 4\
-kernel Image \
-m 512 -machine virt,kernel_irqchip=on \
-initrd guestfs.cpio.gz \
-cpu host -nographic \
-numa node,mem=256M,cpus=0-1,nodeid=0 \
-numa node,mem=256M,cpus=2-3,nodeid=1 \
-append "console=ttyAMA0 root=/dev/ram"

Changes since v7:
* fix code style suggested by Marcel
* rename acpi_build_srat_memory to build_srat_memory

Changes since v6:
* squash first two patches of previous series together
* fix the definition of proximity in AcpiSratMemoryAffinity
* rename acpi_build_srat_memory to build_acpi_srat_memory

Changes since v5:
* don't generate /distance-map node since it's optional
* improve the /memory node name
* move acpi_build_srat_memory to common place then reuse it to generate
  SRAT table

Changes since v4:
* rebased on new kernel driver and device bindings, especially the
  compatible string "numa-distance-map-v1" of /distance-map node
* set the numa-node-id for first /memory node

Changes since v3:
* based on new kernel driver and device bindings
* add ACPI part

Changes since v2:
* update to use NUMA node property arm,associativity.

Changes since v1:
Take into account Peter's comments:
* rename virt_memory_init to arm_generate_memory_dtb
* move arm_generate_memory_dtb to boot.c and make it a common func
* use a struct numa_map to generate numa dtb

Shannon Zhao (5):
  ARM: Virt: Set numa-node-id for cpu and memory nodes
  ACPI: Add GICC Affinity Structure
  ACPI: Fix the definition of proximity in AcpiSratMemoryAffinity
  ACPI: move acpi_build_srat_memory to common place
  ACPI: Virt: Generate SRAT table

 hw/acpi/aml-build.c | 11 ++
 hw/arm/boot.c   | 43 +++--
 hw/arm/virt-acpi-build.c| 52 +
 hw/arm/virt.c   |  8 +++
 hw/i386/acpi-build.c| 41 +--
 include/hw/acpi/acpi-defs.h | 17 +--
 include/hw/acpi/aml-build.h | 10 +
 7 files changed, 143 insertions(+), 39 deletions(-)

-- 
2.0.4