Re: [PATCH] Only compile KVM support for matching CPU types

Dustin Kirkland
2009-06-24T23:14:34Z

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

On Wed, 2009-06-24 at 18:09 -0500, Dustin Kirkland wrote:
> On Wed, 2009-06-24 at 17:40 -0500, Anthony Liguori wrote:
> > # Make sure the target and host cpus are compatible
> > if test ! \( "$target_cpu" = "$cpu" -o \
> > \( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \
> > \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \
> > \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
> > + \( "$target_cpu" = "ia64" -a "$cpu" = "ia64" \) \) ; then
>
> Almost...
>
> - \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
> + \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) -o \
> + \( "$target_cpu" = "ia64" -a "$cpu" = "ia64" \) \) ; then

Doh. Still not quite right...

Clean patch below.

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

=== modified file 'configure'
--- configure 2009-06-17 11:16:33 +0000
+++ configure 2009-06-24 23:13:00 +0000
@@ -2117,13 +2117,12 @@
fi
}

-if [ use_upstream_kvm = yes ]; then
-
# Make sure the target and host cpus are compatible
if test ! \( "$target_cpu" = "$cpu" -o \
\( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \
\( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \
- \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
+ \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) -o \
+ \( "$target_cpu" = "ia64" -a "$cpu" = "ia64" \) \) ; then
target_kvm="no"
fi
# Disable KVM for linux-user
@@ -2131,8 +2130,6 @@
target_kvm="no"
fi

-fi
-
case "$target_cpu" in
i386)
echo "TARGET_ARCH=i386" >> $config_mak

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]