Re: [PATCH 5/6] Add parsing of AArch64 qemu capabilities.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@xxxxxxxxxx>
> ---
>  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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]