]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add support for detecting PPC little endian arches
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 8 Aug 2013 13:03:51 +0000 (14:03 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 16 Oct 2013 11:40:35 +0000 (12:40 +0100)
The recent patch series proposing the addition of PPC little endian
arch support to Linux defines new arch names 'ppcle' and 'ppc64le':

https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-August/109908.html

This just makes libvirt know about these arch names, so it doesn't
immediately trip up if it seems these new names from uname.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virarch.c
src/util/virarch.h

index 9e88c68b727063601c00211ed0ca6683cac84eda..c71c7ebc850f6512e71160e8c230dd612c631184 100644 (file)
@@ -38,38 +38,40 @@ 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 },
 
+    { "aarch64",      64, VIR_ARCH_LITTLE_ENDIAN },
     { "cris",         32, VIR_ARCH_LITTLE_ENDIAN },
     { "i686",         32, VIR_ARCH_LITTLE_ENDIAN },
     { "ia64",         64, VIR_ARCH_LITTLE_ENDIAN },
     { "lm32",         32, VIR_ARCH_BIG_ENDIAN },
-    { "m68k",         32, VIR_ARCH_BIG_ENDIAN },
 
+    { "m68k",         32, VIR_ARCH_BIG_ENDIAN },
     { "microblaze",   32, VIR_ARCH_BIG_ENDIAN },
     { "microblazeel", 32, VIR_ARCH_LITTLE_ENDIAN},
     { "mips",         32, VIR_ARCH_BIG_ENDIAN },
     { "mipsel",       32, VIR_ARCH_LITTLE_ENDIAN },
-    { "mips64",       64, VIR_ARCH_BIG_ENDIAN },
 
+    { "mips64",       64, VIR_ARCH_BIG_ENDIAN },
     { "mips64el",     64, VIR_ARCH_LITTLE_ENDIAN },
     { "openrisc",     32, VIR_ARCH_BIG_ENDIAN },
     { "parisc",       32, VIR_ARCH_BIG_ENDIAN },
     { "parisc64",     64, VIR_ARCH_BIG_ENDIAN },
-    { "ppc",          32, VIR_ARCH_BIG_ENDIAN },
 
+    { "ppc",          32, VIR_ARCH_BIG_ENDIAN },
+    { "ppcle",        32, VIR_ARCH_LITTLE_ENDIAN },
     { "ppc64",        64, VIR_ARCH_BIG_ENDIAN },
+    { "ppc64le",      64, VIR_ARCH_LITTLE_ENDIAN },
     { "ppcemb",       32, VIR_ARCH_BIG_ENDIAN },
+
     { "s390",         32, VIR_ARCH_BIG_ENDIAN },
     { "s390x",        64, VIR_ARCH_BIG_ENDIAN },
     { "sh4",          32, VIR_ARCH_LITTLE_ENDIAN },
-
     { "sh4eb",        64, VIR_ARCH_BIG_ENDIAN },
     { "sparc",        32, VIR_ARCH_BIG_ENDIAN },
+
     { "sparc64",      64, VIR_ARCH_BIG_ENDIAN },
     { "unicore32",    32, VIR_ARCH_LITTLE_ENDIAN },
     { "x86_64",       64, VIR_ARCH_LITTLE_ENDIAN },
-
     { "xtensa",       32, VIR_ARCH_LITTLE_ENDIAN },
     { "xtensaeb",     32, VIR_ARCH_BIG_ENDIAN },
 };
index d0bf9d91829ff3922e2caca75d1c8b7e5e589431..b180400de3d4dadfb4c9bcbff5b81c97b5f095a1 100644 (file)
@@ -30,38 +30,40 @@ 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_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 */
     VIR_ARCH_ITANIUM,      /* Itanium     64 LE http://en.wikipedia.org/wiki/Itanium */
     VIR_ARCH_LM32,         /* MilkyMist   32 BE http://en.wikipedia.org/wiki/Milkymist */
-    VIR_ARCH_M68K,         /* m68k        32 BE http://en.wikipedia.org/wiki/Motorola_68000_family */
 
+    VIR_ARCH_M68K,         /* m68k        32 BE http://en.wikipedia.org/wiki/Motorola_68000_family */
     VIR_ARCH_MICROBLAZE,   /* Microblaze  32 BE http://en.wikipedia.org/wiki/MicroBlaze */
     VIR_ARCH_MICROBLAZEEL, /* Microblaze  32 LE http://en.wikipedia.org/wiki/MicroBlaze */
     VIR_ARCH_MIPS,         /* MIPS        32 BE http://en.wikipedia.org/wiki/MIPS_architecture */
     VIR_ARCH_MIPSEL,       /* MIPS        32 LE http://en.wikipedia.org/wiki/MIPS_architecture */
-    VIR_ARCH_MIPS64,       /* MIPS        64 BE http://en.wikipedia.org/wiki/MIPS_architecture */
 
+    VIR_ARCH_MIPS64,       /* MIPS        64 BE http://en.wikipedia.org/wiki/MIPS_architecture */
     VIR_ARCH_MIPS64EL,     /* MIPS        64 LE http://en.wikipedia.org/wiki/MIPS_architecture */
     VIR_ARCH_OR32,         /* OpenRisc    32 BE http://en.wikipedia.org/wiki/OpenRISC#QEMU_support*/
     VIR_ARCH_PARISC,       /* PA-Risc     32 BE http://en.wikipedia.org/wiki/PA-RISC */
     VIR_ARCH_PARISC64,     /* PA-Risc     64 BE http://en.wikipedia.org/wiki/PA-RISC */
-    VIR_ARCH_PPC,          /* PowerPC     32 BE http://en.wikipedia.org/wiki/PowerPC */
 
+    VIR_ARCH_PPC,          /* PowerPC     32 BE http://en.wikipedia.org/wiki/PowerPC */
+    VIR_ARCH_PPCLE,        /* PowerPC     32 LE http://en.wikipedia.org/wiki/PowerPC */
     VIR_ARCH_PPC64,        /* PowerPC     64 BE http://en.wikipedia.org/wiki/PowerPC */
+    VIR_ARCH_PPC64LE,      /* PowerPC     64 LE http://en.wikipedia.org/wiki/PowerPC */
     VIR_ARCH_PPCEMB,       /* PowerPC     32 BE http://en.wikipedia.org/wiki/PowerPC */
+
     VIR_ARCH_S390,         /* S390        32 BE http://en.wikipedia.org/wiki/S390 */
     VIR_ARCH_S390X,        /* S390        64 BE http://en.wikipedia.org/wiki/S390x */
     VIR_ARCH_SH4,          /* SuperH4     32 LE http://en.wikipedia.org/wiki/SuperH */
-
     VIR_ARCH_SH4EB,        /* SuperH4     32 BE http://en.wikipedia.org/wiki/SuperH */
     VIR_ARCH_SPARC,        /* Sparc       32 BE http://en.wikipedia.org/wiki/Sparc */
+
     VIR_ARCH_SPARC64,      /* Sparc       64 BE http://en.wikipedia.org/wiki/Sparc */
     VIR_ARCH_UNICORE32,    /* UniCore     32 LE http://en.wikipedia.org/wiki/Unicore*/
     VIR_ARCH_X86_64,       /* x86         64 LE http://en.wikipedia.org/wiki/X86 */
-
     VIR_ARCH_XTENSA,       /* XTensa      32 LE http://en.wikipedia.org/wiki/Xtensa#Processor_Cores */
     VIR_ARCH_XTENSAEB,     /* XTensa      32 BE http://en.wikipedia.org/wiki/Xtensa#Processor_Cores */