From f4879ae89f04bd015be3d532be43cad31afaf4b0 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 17 Aug 2018 14:33:54 -0400 Subject: [PATCH] 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 Backports commit 7210a02c58572b2686a3a8d610c6628f87864aed from qemu --- qemu/target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/target/i386/cpu.c b/qemu/target/i386/cpu.c index 4ea6408a..a1ae1141 100644 --- a/qemu/target/i386/cpu.c +++ b/qemu/target/i386/cpu.c @@ -777,6 +777,8 @@ typedef struct FeatureWordInfo { uint32_t tcg_features; /* Feature flags supported by TCG */ uint32_t unmigratable_flags; /* Feature flags known to be unmigratable */ uint32_t migratable_flags; /* Feature flags known to be migratable */ + /* Features that shouldn't be auto-enabled by "-cpu-host" */ + uint32_t no_autoenable_flags; } FeatureWordInfo; static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { @@ -904,6 +906,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { false,0, R_ECX, TCG_EXT3_FEATURES, + CPUID_EXT3_TOPOEXT, }, // FEAT_8000_0007_EDX {