[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] configure: Don't implicitly hardcode list of KV
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH] configure: Don't implicitly hardcode list of KVM architectures |
Date: |
Thu, 02 Aug 2012 18:01:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
Am 18.07.2012 13:10, schrieb Peter Maydell:
> The code creating the symlink from linux-headers/asm to the
> architecture specific linux-headers/asm-$arch directory was
> implicitly hardcoding a list of KVM supporting architectures.
> Add a default case for the common "Linux architecture name and
> QEMU CPU name match" case, so future architectures will only
> need to add code if they've managed to get mismatched names.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> This means there's now only one place where configure has a
> list of KVM enabled targets (the check where we set CONFIG_KVM).
> I think we have to have one list, but we don't need to have
> more than one...
>
> NB: this patch means we'll now set up an asm/ link for
> s390 as well as s390x. That should be harmless (s390 can't be
> trying to include any headers from asm/ or it wouldn't build).
>
> configure | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 0a3896e..c8d2895 100755
> --- a/configure
> +++ b/configure
> @@ -3482,15 +3482,23 @@ if test "$linux" = "yes" ; then
> mkdir -p linux-headers
> case "$cpu" in
> i386|x86_64)
> - symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
> + linux_arch=x86
> ;;
> ppcemb|ppc|ppc64)
> - symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
> + linux_arch=powerpc
> ;;
> s390x)
> - symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
> + linux_arch=s390
> + ;;
> + *)
> + # For most CPUs the kernel architecture name and QEMU CPU name match.
> + linux_arch="$cpu"
> ;;
> esac
> + # For non-KVM architectures we will not have asm headers.
> + if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
> + symlink "$source_path/linux-headers/asm-$linux_arch"
> linux-headers/asm
> + fi
One minor nit: The indentation seems off here - esac 2 spaces, if 4.
Andreas
> fi
>
> for target in $target_list; do
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg