summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-22 11:13:43 +0200
committerEduardo Habkost <ehabkost@redhat.com>2009-07-29 11:43:31 -0300
commit4494d4ff356f7fcacd4f48f65f515006a1631306 (patch)
tree76b0657f11e3bbe3b75070d17c27cff72e7b80e0
parent319a4830bb9c8b1be052ed1bcdec61d825eac351 (diff)
add option to disable all cpu's model different from qemu32/64 and pentium3
VDSM uses pentium3 for 32bits Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <3dd56806555ed552e17a03d4f668d332633ca847.1248252585.git.quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 512837 Obsoletes: <3c9ce0b0d6fb42901696bb74128665490edb7a1c.1248207932.git.quintela@redhat.com> Obsoletes: <d87544c978b2a85175ccf55f8e0d1bb6058a51bb.1248095798.git.quintela@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> RH-Upstream-status: pending Acked-by: Dor Laor <dlaor@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
-rwxr-xr-xqemu/configure7
-rw-r--r--qemu/target-i386/helper.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/qemu/configure b/qemu/configure
index a69a04bc..a9808718 100755
--- a/qemu/configure
+++ b/qemu/configure
@@ -182,6 +182,7 @@ usb_wacom="yes"
usb_serial="yes"
usb_net="yes"
usb_bluez="yes"
+x86_only_generic_cpus="no"
kvm="yes"
kvm_nested="no"
kvm_cap_pit="no"
@@ -434,6 +435,8 @@ for opt do
;;
--disable-usb-bluez) usb_bluez="no"
;;
+ --disable-x86-non-generic-cpus) x86_only_generic_cpus="yes"
+ ;;
--disable-kvm) kvm="no"
;;
--enable-profiler) profiler="yes"
@@ -1330,6 +1333,7 @@ echo "USB wacom $usb_wacom"
echo "USB serial $usb_serial"
echo "USB net $usb_net"
echo "USB bluez $usb_bluez"
+echo "Only generic cpus $x86_only_generic_cpus"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1649,6 +1653,9 @@ if test "$usb_bluez" = "yes" ; then
echo "CONFIG_USB_BLUEZ=yes" >> $config_mak
echo "#define CONFIG_USB_BLUEZ 1" >> $config_h
fi
+if test "$x86_only_generic_cpus" = "yes" ; then
+ echo "#define CONFIG_X86_ONLY_GENERIC_CPUS 1" >> $config_h
+fi
if test "$aio" = "yes" ; then
echo "#define CONFIG_AIO 1" >> $config_h
echo "CONFIG_AIO=yes" >> $config_mak
diff --git a/qemu/target-i386/helper.c b/qemu/target-i386/helper.c
index c8321c44..f09bf135 100644
--- a/qemu/target-i386/helper.c
+++ b/qemu/target-i386/helper.c
@@ -141,6 +141,7 @@ static x86_def_t x86_defs[] = {
.xlevel = 0x8000000A,
.model_id = "QEMU Virtual CPU version " QEMU_VERSION,
},
+#ifndef CONFIG_X86_ONLY_GENERIC_CPUS
{
.name = "core2duo",
.level = 10,
@@ -163,6 +164,8 @@ static x86_def_t x86_defs[] = {
.model_id = "Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz",
},
#endif
+
+#endif
{
.name = "qemu32",
.level = 2,
@@ -174,6 +177,7 @@ static x86_def_t x86_defs[] = {
.xlevel = 0,
.model_id = "QEMU Virtual CPU version " QEMU_VERSION,
},
+#ifndef CONFIG_X86_ONLY_GENERIC_CPUS
{
.name = "coreduo",
.level = 10,
@@ -220,6 +224,7 @@ static x86_def_t x86_defs[] = {
.features = PENTIUM2_FEATURES,
.xlevel = 0,
},
+#endif /* CONFIG_X86_ONLY_GENERIC_CPUS */
{
.name = "pentium3",
.level = 2,
@@ -229,6 +234,7 @@ static x86_def_t x86_defs[] = {
.features = PENTIUM3_FEATURES,
.xlevel = 0,
},
+#ifndef CONFIG_X86_ONLY_GENERIC_CPUS
{
.name = "athlon",
.level = 2,
@@ -265,6 +271,7 @@ static x86_def_t x86_defs[] = {
.xlevel = 0x8000000A,
.model_id = "Intel(R) Atom(TM) CPU N270 @ 1.60GHz",
},
+#endif
};
static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)