[libvirt] [PATCH 0/6] AArch64 support for libvirt.

This patchset extends libvirt for AArch64 (armv8a). All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager. Pranavkumar Sawargaonkar (6): AArch64: Add AArch64 architecture to list of valid arches. AArch64: CPU Support for AArch64 (ARMv8 64bit). AArch64: Parse cputopology from /proc/cpuinfo. Implement minimal sysinfo for AArch64 platforms. Add parsing of AArch64 qemu capabilities. AArch64: Add qemu capabilities schemeta for test. src/Makefile.am | 1 + src/cpu/cpu.c | 2 + src/cpu/cpu_aarch64.c | 79 ++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 ++++++++++ src/nodeinfo.c | 5 +- src/qemu/qemu_capabilities.c | 4 ++ src/util/virarch.c | 1 + src/util/virarch.h | 1 + src/util/virsysinfo.c | 3 +- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 ++++ tests/sysinfodata/aarch64cpuinfo.data | 10 ++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++ tests/sysinfotest.c | 14 ++++- 13 files changed, 168 insertions(+), 4 deletions(-) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect -- 1.7.9.5

Adding AArch64(ARMv8 64bit) to the current list of valid architectures. For now, AArch64 name would imply AArch64 LE mode only. In future, we might have separate names for AArch64 LE and BE. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virarch.c | 1 + src/util/virarch.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/util/virarch.c b/src/util/virarch.c index 694eba1..9e88c68 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -38,6 +38,7 @@ static const struct virArchData { { "armv6l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7b", 32, VIR_ARCH_BIG_ENDIAN }, + { "aarch64", 64, VIR_ARCH_LITTLE_ENDIAN }, { "cris", 32, VIR_ARCH_LITTLE_ENDIAN }, { "i686", 32, VIR_ARCH_LITTLE_ENDIAN }, diff --git a/src/util/virarch.h b/src/util/virarch.h index 3530f7c..d0bf9d9 100644 --- a/src/util/virarch.h +++ b/src/util/virarch.h @@ -30,6 +30,7 @@ typedef enum { VIR_ARCH_ARMV6L, /* ARMv6 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7L, /* ARMv7 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7B, /* ARMv7 32 BE http://en.wikipedia.org/wiki/ARM_architecture */ + VIR_ARCH_AARCH64, /* ARMv8 64 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_CRIS, /* ETRAX 32 LE http://en.wikipedia.org/wiki/ETRAX_CRIS */ VIR_ARCH_I686, /* x86 32 LE http://en.wikipedia.org/wiki/X86 */ -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
Adding AArch64(ARMv8 64bit) to the current list of valid architectures.
For now, AArch64 name would imply AArch64 LE mode only. In future, we might have separate names for AArch64 LE and BE.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virarch.c | 1 + src/util/virarch.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/src/util/virarch.c b/src/util/virarch.c index 694eba1..9e88c68 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -38,6 +38,7 @@ static const struct virArchData { { "armv6l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7b", 32, VIR_ARCH_BIG_ENDIAN }, + { "aarch64", 64, VIR_ARCH_LITTLE_ENDIAN },
{ "cris", 32, VIR_ARCH_LITTLE_ENDIAN }, { "i686", 32, VIR_ARCH_LITTLE_ENDIAN }, diff --git a/src/util/virarch.h b/src/util/virarch.h index 3530f7c..d0bf9d9 100644 --- a/src/util/virarch.h +++ b/src/util/virarch.h @@ -30,6 +30,7 @@ typedef enum { VIR_ARCH_ARMV6L, /* ARMv6 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7L, /* ARMv7 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7B, /* ARMv7 32 BE http://en.wikipedia.org/wiki/ARM_architecture */ + VIR_ARCH_AARCH64, /* ARMv8 64 LE http://en.wikipedia.org/wiki/ARM_architecture */
VIR_ARCH_CRIS, /* ETRAX 32 LE http://en.wikipedia.org/wiki/ETRAX_CRIS */ VIR_ARCH_I686, /* x86 32 LE http://en.wikipedia.org/wiki/X86 */
ACK - Cole

On Tue, Oct 08, 2013 at 07:19:06PM +0530, Pranavkumar Sawargaonkar wrote:
Adding AArch64(ARMv8 64bit) to the current list of valid architectures.
For now, AArch64 name would imply AArch64 LE mode only. In future, we might have separate names for AArch64 LE and BE.
Presumably the kernel has fixed 'aarch64' as always referring to LE and would add a variant like 'aarch64b' for BE mode if that was ever supported ?
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virarch.c | 1 + src/util/virarch.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/src/util/virarch.c b/src/util/virarch.c index 694eba1..9e88c68 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -38,6 +38,7 @@ static const struct virArchData { { "armv6l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7b", 32, VIR_ARCH_BIG_ENDIAN }, + { "aarch64", 64, VIR_ARCH_LITTLE_ENDIAN },
{ "cris", 32, VIR_ARCH_LITTLE_ENDIAN }, { "i686", 32, VIR_ARCH_LITTLE_ENDIAN }, diff --git a/src/util/virarch.h b/src/util/virarch.h index 3530f7c..d0bf9d9 100644 --- a/src/util/virarch.h +++ b/src/util/virarch.h @@ -30,6 +30,7 @@ typedef enum { VIR_ARCH_ARMV6L, /* ARMv6 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7L, /* ARMv7 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7B, /* ARMv7 32 BE http://en.wikipedia.org/wiki/ARM_architecture */ + VIR_ARCH_AARCH64, /* ARMv8 64 LE http://en.wikipedia.org/wiki/ARM_architecture */
VIR_ARCH_CRIS, /* ETRAX 32 LE http://en.wikipedia.org/wiki/ETRAX_CRIS */ VIR_ARCH_I686, /* x86 32 LE http://en.wikipedia.org/wiki/X86 */
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Hi Daniel, On 9 October 2013 20:14, Daniel P. Berrange <berrange@redhat.com> wrote:
On Tue, Oct 08, 2013 at 07:19:06PM +0530, Pranavkumar Sawargaonkar wrote:
Adding AArch64(ARMv8 64bit) to the current list of valid architectures.
For now, AArch64 name would imply AArch64 LE mode only. In future, we might have separate names for AArch64 LE and BE.
Presumably the kernel has fixed 'aarch64' as always referring to LE and would add a variant like 'aarch64b' for BE mode if that was ever supported ?
Firstly thanks for Acking my patches. Yes linux currently uses aarch64 for LE . There is a BE port going on and should add a variant similar to what you have mentioned to distinguish.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virarch.c | 1 + src/util/virarch.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/src/util/virarch.c b/src/util/virarch.c index 694eba1..9e88c68 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -38,6 +38,7 @@ static const struct virArchData { { "armv6l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7l", 32, VIR_ARCH_LITTLE_ENDIAN }, { "armv7b", 32, VIR_ARCH_BIG_ENDIAN }, + { "aarch64", 64, VIR_ARCH_LITTLE_ENDIAN },
{ "cris", 32, VIR_ARCH_LITTLE_ENDIAN }, { "i686", 32, VIR_ARCH_LITTLE_ENDIAN }, diff --git a/src/util/virarch.h b/src/util/virarch.h index 3530f7c..d0bf9d9 100644 --- a/src/util/virarch.h +++ b/src/util/virarch.h @@ -30,6 +30,7 @@ typedef enum { VIR_ARCH_ARMV6L, /* ARMv6 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7L, /* ARMv7 32 LE http://en.wikipedia.org/wiki/ARM_architecture */ VIR_ARCH_ARMV7B, /* ARMv7 32 BE http://en.wikipedia.org/wiki/ARM_architecture */ + VIR_ARCH_AARCH64, /* ARMv8 64 LE http://en.wikipedia.org/wiki/ARM_architecture */
VIR_ARCH_CRIS, /* ETRAX 32 LE http://en.wikipedia.org/wiki/ETRAX_CRIS */ VIR_ARCH_I686, /* x86 32 LE http://en.wikipedia.org/wiki/X86 */
ACK
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Thanks, Pranav

Adding CPU encoder/decoder for AArch64. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/Makefile.am | 1 + src/cpu/cpu.c | 2 ++ src/cpu/cpu_aarch64.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 +++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h diff --git a/src/Makefile.am b/src/Makefile.am index 201c268..d5e62d8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -900,6 +900,7 @@ CPU_SOURCES = \ cpu/cpu_x86.h cpu/cpu_x86.c cpu/cpu_x86_data.h \ cpu/cpu_s390.h cpu/cpu_s390.c \ cpu/cpu_arm.h cpu/cpu_arm.c \ + cpu/cpu_aarch64.h cpu/cpu_aarch64.c \ cpu/cpu_map.h cpu/cpu_map.c cpu/cpu_powerpc.h \ cpu/cpu_powerpc.c cpu/cpu_ppc_data.h diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 31de857..e611452 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -32,6 +32,7 @@ #include "cpu_powerpc.h" #include "cpu_s390.h" #include "cpu_arm.h" +#include "cpu_aarch64.h" #include "cpu_generic.h" #include "util/virstring.h" @@ -44,6 +45,7 @@ static struct cpuArchDriver *drivers[] = { &cpuDriverPowerPC, &cpuDriverS390, &cpuDriverArm, + &cpuDriverAARCH64, /* generic driver must always be the last one */ &cpuDriverGeneric }; diff --git a/src/cpu/cpu_aarch64.c b/src/cpu/cpu_aarch64.c new file mode 100644 index 0000000..8c78eca --- /dev/null +++ b/src/cpu/cpu_aarch64.c @@ -0,0 +1,79 @@ +/* + * cpu_aarch64.c: CPU driver for AArch64 CPUs + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Authors: + * Anup Patel <anup.patel@linaro.org> + * Pranavkumar Sawargaonkar <pranavkumar@linaro.org> + */ + +#include <config.h> + +#include "viralloc.h" +#include "cpu.h" + +#define VIR_FROM_THIS VIR_FROM_CPU + +static const virArch archs[] = { VIR_ARCH_AARCH64 }; + +static virCPUDataPtr +AArch64NodeData(virArch arch) +{ + virCPUDataPtr data; + + if (VIR_ALLOC(data) < 0) + return NULL; + + data->arch = arch; + + return data; +} + +static int +AArch64Decode(virCPUDefPtr cpu ATTRIBUTE_UNUSED, + const virCPUDataPtr data ATTRIBUTE_UNUSED, + const char **models ATTRIBUTE_UNUSED, + unsigned int nmodels ATTRIBUTE_UNUSED, + const char *preferred ATTRIBUTE_UNUSED, + unsigned int flags) +{ + + virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, -1); + + return 0; +} + +static void +AArch64DataFree(virCPUDataPtr data) +{ + VIR_FREE(data); +} + +struct cpuArchDriver cpuDriverAARCH64 = { + .name = "aarch64", + .arch = archs, + .narch = ARRAY_CARDINALITY(archs), + .compare = NULL, + .decode = AArch64Decode, + .encode = NULL, + .free = AArch64DataFree, + .nodeData = AArch64NodeData, + .guestData = NULL, + .baseline = NULL, + .update = NULL, + .hasFeature = NULL, +}; diff --git a/src/cpu/cpu_aarch64.h b/src/cpu/cpu_aarch64.h new file mode 100644 index 0000000..8e48368 --- /dev/null +++ b/src/cpu/cpu_aarch64.h @@ -0,0 +1,31 @@ +/* + * cpu_aarch64.h: CPU driver for AArch64 CPUs + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Authors: + * Anup Patel <anup.patel@linaro.org> + * Pravakumar Sawargaonkar <pranavkumar@linaro.org> + */ + +#ifndef __VIR_CPU_AARCH64_H__ +# define __VIR_CPU_AARCH64_H__ + +# include "cpu.h" + +extern struct cpuArchDriver cpuDriverAARCH64; + +#endif /* __VIR_CPU_AARCH64_H__ */ -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
Adding CPU encoder/decoder for AArch64.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/Makefile.am | 1 + src/cpu/cpu.c | 2 ++ src/cpu/cpu_aarch64.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 +++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h
diff --git a/src/Makefile.am b/src/Makefile.am index 201c268..d5e62d8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -900,6 +900,7 @@ CPU_SOURCES = \ cpu/cpu_x86.h cpu/cpu_x86.c cpu/cpu_x86_data.h \ cpu/cpu_s390.h cpu/cpu_s390.c \ cpu/cpu_arm.h cpu/cpu_arm.c \ + cpu/cpu_aarch64.h cpu/cpu_aarch64.c \ cpu/cpu_map.h cpu/cpu_map.c cpu/cpu_powerpc.h \ cpu/cpu_powerpc.c cpu/cpu_ppc_data.h
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 31de857..e611452 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -32,6 +32,7 @@ #include "cpu_powerpc.h" #include "cpu_s390.h" #include "cpu_arm.h" +#include "cpu_aarch64.h" #include "cpu_generic.h" #include "util/virstring.h"
@@ -44,6 +45,7 @@ static struct cpuArchDriver *drivers[] = { &cpuDriverPowerPC, &cpuDriverS390, &cpuDriverArm, + &cpuDriverAARCH64, /* generic driver must always be the last one */ &cpuDriverGeneric }; diff --git a/src/cpu/cpu_aarch64.c b/src/cpu/cpu_aarch64.c new file mode 100644 index 0000000..8c78eca --- /dev/null +++ b/src/cpu/cpu_aarch64.c @@ -0,0 +1,79 @@ +/* + * cpu_aarch64.c: CPU driver for AArch64 CPUs + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Authors: + * Anup Patel <anup.patel@linaro.org> + * Pranavkumar Sawargaonkar <pranavkumar@linaro.org> + */ + +#include <config.h> + +#include "viralloc.h" +#include "cpu.h" + +#define VIR_FROM_THIS VIR_FROM_CPU + +static const virArch archs[] = { VIR_ARCH_AARCH64 }; + +static virCPUDataPtr +AArch64NodeData(virArch arch) +{ + virCPUDataPtr data; + + if (VIR_ALLOC(data) < 0) + return NULL; + + data->arch = arch; + + return data; +} + +static int +AArch64Decode(virCPUDefPtr cpu ATTRIBUTE_UNUSED, + const virCPUDataPtr data ATTRIBUTE_UNUSED, + const char **models ATTRIBUTE_UNUSED, + unsigned int nmodels ATTRIBUTE_UNUSED, + const char *preferred ATTRIBUTE_UNUSED, + unsigned int flags) +{ + + virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, -1); + + return 0; +} + +static void +AArch64DataFree(virCPUDataPtr data) +{ + VIR_FREE(data); +} + +struct cpuArchDriver cpuDriverAARCH64 = { + .name = "aarch64", + .arch = archs, + .narch = ARRAY_CARDINALITY(archs), + .compare = NULL, + .decode = AArch64Decode, + .encode = NULL, + .free = AArch64DataFree, + .nodeData = AArch64NodeData, + .guestData = NULL, + .baseline = NULL, + .update = NULL, + .hasFeature = NULL, +}; diff --git a/src/cpu/cpu_aarch64.h b/src/cpu/cpu_aarch64.h new file mode 100644 index 0000000..8e48368 --- /dev/null +++ b/src/cpu/cpu_aarch64.h @@ -0,0 +1,31 @@ +/* + * cpu_aarch64.h: CPU driver for AArch64 CPUs + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Authors: + * Anup Patel <anup.patel@linaro.org> + * Pravakumar Sawargaonkar <pranavkumar@linaro.org> + */ + +#ifndef __VIR_CPU_AARCH64_H__ +# define __VIR_CPU_AARCH64_H__ + +# include "cpu.h" + +extern struct cpuArchDriver cpuDriverAARCH64; + +#endif /* __VIR_CPU_AARCH64_H__ */
Follows what is down for cpu_arm.c ACK - Cole

On Tue, Oct 08, 2013 at 07:19:07PM +0530, Pranavkumar Sawargaonkar wrote:
Adding CPU encoder/decoder for AArch64.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/Makefile.am | 1 + src/cpu/cpu.c | 2 ++ src/cpu/cpu_aarch64.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 +++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

CPU "parser" for AArch64. Showing cputopology in arm64 linux is work-in-progress so for now all AArch64 cpus belong to same socket (like PPC). Also we parse BogoMIPS same like arm 32bit. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/nodeinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 320d8f8..309066c 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -205,7 +205,8 @@ virNodeParseSocket(const char *dir, unsigned int cpu) # if defined(__powerpc__) || \ defined(__powerpc64__) || \ defined(__s390__) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(__aarch64__) /* ppc and s390(x) has -1 */ if (ret < 0) ret = 0; @@ -441,7 +442,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, * and parsed in next iteration, because it is not in expected * format and thus lead to error. */ } -# elif defined(__arm__) +# elif defined(__arm__) || defined(__aarch64__) char *buf = line; if (STRPREFIX(buf, "BogoMIPS")) { char *p; -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
CPU "parser" for AArch64. Showing cputopology in arm64 linux is work-in-progress so for now all AArch64 cpus belong to same socket (like PPC).
Also we parse BogoMIPS same like arm 32bit.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/nodeinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 320d8f8..309066c 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -205,7 +205,8 @@ virNodeParseSocket(const char *dir, unsigned int cpu) # if defined(__powerpc__) || \ defined(__powerpc64__) || \ defined(__s390__) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(__aarch64__) /* ppc and s390(x) has -1 */ if (ret < 0) ret = 0; @@ -441,7 +442,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, * and parsed in next iteration, because it is not in expected * format and thus lead to error. */ } -# elif defined(__arm__) +# elif defined(__arm__) || defined(__aarch64__) char *buf = line; if (STRPREFIX(buf, "BogoMIPS")) { char *p;
ACK - Cole

On Tue, Oct 08, 2013 at 07:19:08PM +0530, Pranavkumar Sawargaonkar wrote:
CPU "parser" for AArch64. Showing cputopology in arm64 linux is work-in-progress so for now all AArch64 cpus belong to same socket (like PPC).
Also we parse BogoMIPS same like arm 32bit.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/nodeinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Implement the bare minimal sysinfo for AArch64 platforms by reading the CPU models from /proc/cpuinfo. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virsysinfo.c | 3 ++- tests/sysinfodata/aarch64cpuinfo.data | 10 ++++++++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++++++++ tests/sysinfotest.c | 14 +++++++++++++- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 0802124..1c8cae5 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -244,7 +244,7 @@ no_memory: return NULL; } -#elif defined(__arm__) +#elif defined(__arm__) || defined(__aarch64__) static int virSysinfoParseSystem(const char *base, virSysinfoDefPtr ret) { @@ -505,6 +505,7 @@ no_memory: defined(__i386__) || \ defined(__amd64__) || \ defined(__arm__) || \ + defined(__aarch64__) || \ defined(__powerpc__)) virSysinfoDefPtr virSysinfoRead(void) { diff --git a/tests/sysinfodata/aarch64cpuinfo.data b/tests/sysinfodata/aarch64cpuinfo.data new file mode 100644 index 0000000..0d63139 --- /dev/null +++ b/tests/sysinfodata/aarch64cpuinfo.data @@ -0,0 +1,10 @@ +Processor : AArch64 Processor rev 0 (aarch64) +BogoMIPS : 100.00 + +Features : fp asimd +CPU architecture: AArch64 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 0 + +Hardware : Generic AArch64 diff --git a/tests/sysinfodata/aarch64sysinfo.expect b/tests/sysinfodata/aarch64sysinfo.expect new file mode 100644 index 0000000..518434d --- /dev/null +++ b/tests/sysinfodata/aarch64sysinfo.expect @@ -0,0 +1,10 @@ +<sysinfo type='smbios'> + <processor> + <entry name='socket_destination'>0</entry> + <entry name='type'>AArch64 Processor rev 0 (aarch64) </entry> + </processor> + <processor> + <entry name='socket_destination'>1</entry> + <entry name='type'>AArch64 Processor rev 0 (aarch64)</entry> + </processor> +</sysinfo> diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index ba57a7a..a88328f 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -43,7 +43,7 @@ # if defined(__s390__) || defined(__s390x__) || \ defined(__powerpc__) || defined(__powerpc64__) || \ defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ - defined(__arm__) + defined(__arm__) || defined(__aarch64__) /* from sysinfo.c */ void virSysinfoSetup(const char *decoder, @@ -179,6 +179,18 @@ test_arm(void) } VIRT_TEST_MAIN(test_arm) +# elif defined(__aarch64__) +static int +test_aarch64(void) +{ + return sysinfotest_run("aarch64 sysinfo", + NULL, + NULL, + "/sysinfodata/aarch64cpuinfo.data", + "/sysinfodata/aarch64sysinfo.expect"); +} + +VIRT_TEST_MAIN(test_aarch64) # else int main(void) -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
Implement the bare minimal sysinfo for AArch64 platforms by reading the CPU models from /proc/cpuinfo.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virsysinfo.c | 3 ++- tests/sysinfodata/aarch64cpuinfo.data | 10 ++++++++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++++++++ tests/sysinfotest.c | 14 +++++++++++++- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 0802124..1c8cae5 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -244,7 +244,7 @@ no_memory: return NULL; }
-#elif defined(__arm__) +#elif defined(__arm__) || defined(__aarch64__) static int virSysinfoParseSystem(const char *base, virSysinfoDefPtr ret) { @@ -505,6 +505,7 @@ no_memory: defined(__i386__) || \ defined(__amd64__) || \ defined(__arm__) || \ + defined(__aarch64__) || \ defined(__powerpc__)) virSysinfoDefPtr virSysinfoRead(void) { diff --git a/tests/sysinfodata/aarch64cpuinfo.data b/tests/sysinfodata/aarch64cpuinfo.data new file mode 100644 index 0000000..0d63139 --- /dev/null +++ b/tests/sysinfodata/aarch64cpuinfo.data @@ -0,0 +1,10 @@ +Processor : AArch64 Processor rev 0 (aarch64) +BogoMIPS : 100.00 + +Features : fp asimd +CPU architecture: AArch64 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 0 + +Hardware : Generic AArch64 diff --git a/tests/sysinfodata/aarch64sysinfo.expect b/tests/sysinfodata/aarch64sysinfo.expect new file mode 100644 index 0000000..518434d --- /dev/null +++ b/tests/sysinfodata/aarch64sysinfo.expect @@ -0,0 +1,10 @@ +<sysinfo type='smbios'> + <processor> + <entry name='socket_destination'>0</entry> + <entry name='type'>AArch64 Processor rev 0 (aarch64) </entry> + </processor> + <processor> + <entry name='socket_destination'>1</entry> + <entry name='type'>AArch64 Processor rev 0 (aarch64)</entry> + </processor> +</sysinfo> diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index ba57a7a..a88328f 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -43,7 +43,7 @@ # if defined(__s390__) || defined(__s390x__) || \ defined(__powerpc__) || defined(__powerpc64__) || \ defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ - defined(__arm__) + defined(__arm__) || defined(__aarch64__)
/* from sysinfo.c */ void virSysinfoSetup(const char *decoder, @@ -179,6 +179,18 @@ test_arm(void) }
VIRT_TEST_MAIN(test_arm) +# elif defined(__aarch64__) +static int +test_aarch64(void) +{ + return sysinfotest_run("aarch64 sysinfo", + NULL, + NULL, + "/sysinfodata/aarch64cpuinfo.data", + "/sysinfodata/aarch64sysinfo.expect"); +} + +VIRT_TEST_MAIN(test_aarch64) # else int main(void)
ACK - Cole

On Tue, Oct 08, 2013 at 07:19:09PM +0530, Pranavkumar Sawargaonkar wrote:
Implement the bare minimal sysinfo for AArch64 platforms by reading the CPU models from /proc/cpuinfo.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/util/virsysinfo.c | 3 ++- tests/sysinfodata/aarch64cpuinfo.data | 10 ++++++++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++++++++ tests/sysinfotest.c | 14 +++++++++++++- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Parse qemu capabilities AArch64 just like arm 32bit. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/qemu/qemu_capabilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c39c1c..1eae4ba 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -300,6 +300,8 @@ static virArch virQEMUCapsArchFromString(const char *arch) return VIR_ARCH_I686; if (STREQ(arch, "arm")) return VIR_ARCH_ARMV7L; + if (STREQ(arch, "aarch64")) + return VIR_ARCH_AARCH64; return virArchFromString(arch); } @@ -311,6 +313,8 @@ static const char *virQEMUCapsArchToString(virArch arch) return "i386"; else if (arch == VIR_ARCH_ARMV7L) return "arm"; + else if (arch == VIR_ARCH_AARCH64) + return "aarch64"; return virArchToString(arch); } -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
Parse qemu capabilities AArch64 just like arm 32bit.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/qemu/qemu_capabilities.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c39c1c..1eae4ba 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -300,6 +300,8 @@ static virArch virQEMUCapsArchFromString(const char *arch) return VIR_ARCH_I686; if (STREQ(arch, "arm")) return VIR_ARCH_ARMV7L; + if (STREQ(arch, "aarch64")) + return VIR_ARCH_AARCH64;
return virArchFromString(arch); } @@ -311,6 +313,8 @@ static const char *virQEMUCapsArchToString(virArch arch) return "i386"; else if (arch == VIR_ARCH_ARMV7L) return "arm"; + else if (arch == VIR_ARCH_AARCH64) + return "aarch64";
return virArchToString(arch); }
ACK - Cole

On Tue, Oct 08, 2013 at 07:19:10PM +0530, Pranavkumar Sawargaonkar wrote:
Parse qemu capabilities AArch64 just like arm 32bit.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- src/qemu/qemu_capabilities.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c39c1c..1eae4ba 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -300,6 +300,8 @@ static virArch virQEMUCapsArchFromString(const char *arch) return VIR_ARCH_I686; if (STREQ(arch, "arm")) return VIR_ARCH_ARMV7L; + if (STREQ(arch, "aarch64")) + return VIR_ARCH_AARCH64;
return virArchFromString(arch); } @@ -311,6 +313,8 @@ static const char *virQEMUCapsArchToString(virArch arch) return "i386"; else if (arch == VIR_ARCH_ARMV7L) return "arm"; + else if (arch == VIR_ARCH_AARCH64) + return "aarch64";
return virArchToString(arch); }
This shouldn't be required. The QEMU code only needs to have special entries if the qemu-system-XXXX name does not match the kernel arch name. eg for 32-bit arm we have armv7l for uname and arm for QEMU system emulator. For 64-bit arm, IIUC, we have aarch64 everywhere, so can rely on virArch{To,From}String just doing the right thing. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Add qemu AArch64 capabilities schemeta in caps-qemu-kvm.xml. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml index 1fbc22b..de0c57f 100644 --- a/tests/capabilityschemadata/caps-qemu-kvm.xml +++ b/tests/capabilityschemadata/caps-qemu-kvm.xml @@ -113,6 +113,17 @@ <guest> <os_type>hvm</os_type> + <arch name='aarch64'> + <wordsize>64</wordsize> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <machine>machvirt</machine> + <domain type='qemu'> + </domain> + </arch> + </guest> + + <guest> + <os_type>hvm</os_type> <arch name='microblaze'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-microblaze</emulator> -- 1.7.9.5

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
Add qemu AArch64 capabilities schemeta in caps-qemu-kvm.xml.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml index 1fbc22b..de0c57f 100644 --- a/tests/capabilityschemadata/caps-qemu-kvm.xml +++ b/tests/capabilityschemadata/caps-qemu-kvm.xml @@ -113,6 +113,17 @@
<guest> <os_type>hvm</os_type> + <arch name='aarch64'> + <wordsize>64</wordsize> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <machine>machvirt</machine> + <domain type='qemu'> + </domain> + </arch> + </guest> + + <guest> + <os_type>hvm</os_type> <arch name='microblaze'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-microblaze</emulator>
ACK - Cole

On Tue, Oct 08, 2013 at 07:19:11PM +0530, Pranavkumar Sawargaonkar wrote:
Add qemu AArch64 capabilities schemeta in caps-qemu-kvm.xml.
Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> --- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 +++++++++++ 1 file changed, 11 insertions(+)
ACK Though it doesn't really do much of any use, until you add some QEMU XML / argv data files to be tested for qemu-system-aarch64 Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Oct 08, 2013 at 07:19:05PM +0530, Pranavkumar Sawargaonkar wrote:
This patchset extends libvirt for AArch64 (armv8a).
All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager.
What is the state of QEMU support for AArch64 ? I see various patches in GIT related to AArch64, but no aarch64-softmmu emulator binary appears to be created. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 10/09/2013 10:13 AM, Daniel P. Berrange wrote:
On Tue, Oct 08, 2013 at 07:19:05PM +0530, Pranavkumar Sawargaonkar wrote:
This patchset extends libvirt for AArch64 (armv8a).
All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager.
What is the state of QEMU support for AArch64 ? I see various patches in GIT related to AArch64, but no aarch64-softmmu emulator binary appears to be created.
Daniel
I think the current aarch64 support in qemu is for running on an aarch64 machine. But there's patches posted for everything else: build qemu-system-aarch64, aarch64 emulation, and aarch64 kvm. The qemu-system-aarch64 bit may land before everything else actually, but it won't be much different from qemu-system-arm. - Cole

On Wed, Oct 9, 2013 at 8:01 PM, Cole Robinson <crobinso@redhat.com> wrote:
On 10/09/2013 10:13 AM, Daniel P. Berrange wrote:
On Tue, Oct 08, 2013 at 07:19:05PM +0530, Pranavkumar Sawargaonkar wrote:
This patchset extends libvirt for AArch64 (armv8a).
All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager.
What is the state of QEMU support for AArch64 ? I see various patches in GIT related to AArch64, but no aarch64-softmmu emulator binary appears to be created.
Daniel
I think the current aarch64 support in qemu is for running on an aarch64 machine.
But there's patches posted for everything else: build qemu-system-aarch64, aarch64 emulation, and aarch64 kvm. The qemu-system-aarch64 bit may land before everything else actually, but it won't be much different from qemu-system-arm.
Yes, aarch64 kvm has been tested with qemu-system-aarch64. Initial patches for QEMU aarch64 were aimed at supporting only KVM but recently quite a few patches have been posted for TCG aarch64 emulation. Largely, the approach in QEMU is to have qemu-system-aarch64 share most of the code with qemu-system-arm. In fact, for qemu-system-aarch64 TCG emulation and aarch64 kvm code is located in target-arm directory which is originally meant for qemu-system-arm. --Anup
- Cole
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
This patchset extends libvirt for AArch64 (armv8a).
All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager.
Pranavkumar Sawargaonkar (6): AArch64: Add AArch64 architecture to list of valid arches. AArch64: CPU Support for AArch64 (ARMv8 64bit). AArch64: Parse cputopology from /proc/cpuinfo. Implement minimal sysinfo for AArch64 platforms. Add parsing of AArch64 qemu capabilities. AArch64: Add qemu capabilities schemeta for test.
src/Makefile.am | 1 + src/cpu/cpu.c | 2 + src/cpu/cpu_aarch64.c | 79 ++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 ++++++++++ src/nodeinfo.c | 5 +- src/qemu/qemu_capabilities.c | 4 ++ src/util/virarch.c | 1 + src/util/virarch.h | 1 + src/util/virsysinfo.c | 3 +- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 ++++ tests/sysinfodata/aarch64cpuinfo.data | 10 ++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++ tests/sysinfotest.c | 14 ++++- 13 files changed, 168 insertions(+), 4 deletions(-) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect
I pushed 1-4 and 6, skipping 5 since as Dan pointed out it shouldn't be required. 2 needed a small fix due to a recent libvirt refactoring. 6 needed a small schema addition, please make sure you have xmllint installed, since certain tests need it. - Cole

Hi Cole, On 16 October 2013 02:34, Cole Robinson <crobinso@redhat.com> wrote:
On 10/08/2013 09:49 AM, Pranavkumar Sawargaonkar wrote:
This patchset extends libvirt for AArch64 (armv8a).
All patches have been tested on APM X-Gene SoC and we are able to run libvirtd on APM X-Gene SOC and spawn VMs remotely using virsh and virt-manager.
Pranavkumar Sawargaonkar (6): AArch64: Add AArch64 architecture to list of valid arches. AArch64: CPU Support for AArch64 (ARMv8 64bit). AArch64: Parse cputopology from /proc/cpuinfo. Implement minimal sysinfo for AArch64 platforms. Add parsing of AArch64 qemu capabilities. AArch64: Add qemu capabilities schemeta for test.
src/Makefile.am | 1 + src/cpu/cpu.c | 2 + src/cpu/cpu_aarch64.c | 79 ++++++++++++++++++++++++++ src/cpu/cpu_aarch64.h | 31 ++++++++++ src/nodeinfo.c | 5 +- src/qemu/qemu_capabilities.c | 4 ++ src/util/virarch.c | 1 + src/util/virarch.h | 1 + src/util/virsysinfo.c | 3 +- tests/capabilityschemadata/caps-qemu-kvm.xml | 11 ++++ tests/sysinfodata/aarch64cpuinfo.data | 10 ++++ tests/sysinfodata/aarch64sysinfo.expect | 10 ++++ tests/sysinfotest.c | 14 ++++- 13 files changed, 168 insertions(+), 4 deletions(-) create mode 100644 src/cpu/cpu_aarch64.c create mode 100644 src/cpu/cpu_aarch64.h create mode 100644 tests/sysinfodata/aarch64cpuinfo.data create mode 100644 tests/sysinfodata/aarch64sysinfo.expect
I pushed 1-4 and 6, skipping 5 since as Dan pointed out it shouldn't be required.
2 needed a small fix due to a recent libvirt refactoring. 6 needed a small schema addition, please make sure you have xmllint installed, since certain tests need it.
Thanks for pushing the patches. Sure i will install xmllint.
- Cole
Thanks, Pranav
participants (4)
-
Anup Patel
-
Cole Robinson
-
Daniel P. Berrange
-
Pranavkumar Sawargaonkar