summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-08-09 19:18:52 -0300
committerEduardo Habkost <ehabkost@redhat.com>2018-08-16 13:43:01 -0300
commit7210a02c58572b2686a3a8d610c6628f87864aed (patch)
treed4c4d0eb43934eef5eab03799b3d5b2398bb008e
parent7f710c32bb893c68b931c68265f0427c032eb7f4 (diff)
downloadfocaccia-qemu-7210a02c58572b2686a3a8d610c6628f87864aed.tar.gz
focaccia-qemu-7210a02c58572b2686a3a8d610c6628f87864aed.zip
i386: Disable TOPOEXT by default on "-cpu host"
Enabling TOPOEXT is always allowed, but it can't be enabled
blindly by "-cpu host" because it may make guests crash if the
rest of the cache topology information isn't provided or isn't
consistent.

This addresses the bug reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1613277

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20180809221852.15285-1-ehabkost@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--target/i386/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 52a77a7d08..4e4fe8fa8b 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -849,6 +849,12 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         },
         .cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
         .tcg_features = TCG_EXT3_FEATURES,
+        /*
+         * TOPOEXT is always allowed but can't be enabled blindly by
+         * "-cpu host", as it requires consistent cache topology info
+         * to be provided so it doesn't confuse guests.
+         */
+        .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
     },
     [FEAT_C000_0001_EDX] = {
         .feat_names = {