Blame SOURCES/kvm-i386-Disable-TOPOEXT-by-default-on-cpu-host.patch

357786
From ed04f30927017781f0aa6aa5f9bd734320f4a330 Mon Sep 17 00:00:00 2001
357786
From: Eduardo Habkost <ehabkost@redhat.com>
357786
Date: Tue, 21 Aug 2018 18:53:11 +0200
357786
Subject: [PATCH 4/5] i386: Disable TOPOEXT by default on "-cpu host"
357786
357786
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
357786
Message-id: <20180821185311.27865-1-ehabkost@redhat.com>
357786
Patchwork-id: 81903
357786
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH] i386: Disable TOPOEXT by default on "-cpu host"
357786
Bugzilla: 1613277
357786
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
357786
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
357786
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
357786
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1613277
357786
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17980585
357786
357786
Enabling TOPOEXT is always allowed, but it can't be enabled
357786
blindly by "-cpu host" because it may make guests crash if the
357786
rest of the cache topology information isn't provided or isn't
357786
consistent.
357786
357786
This addresses the bug reported at:
357786
https://bugzilla.redhat.com/show_bug.cgi?id=1613277
357786
357786
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
357786
Message-Id: <20180809221852.15285-1-ehabkost@redhat.com>
357786
Tested-by: Richard W.M. Jones <rjones@redhat.com>
357786
Reviewed-by: Babu Moger <babu.moger@amd.com>
357786
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
357786
(cherry picked from commit 7210a02c58572b2686a3a8d610c6628f87864aed)
357786
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 target/i386/cpu.c | 6 ++++++
357786
 1 file changed, 6 insertions(+)
357786
357786
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
357786
index eabe4ea..e6ad66c 100644
357786
--- a/target/i386/cpu.c
357786
+++ b/target/i386/cpu.c
357786
@@ -852,6 +852,12 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
357786
         },
357786
         .cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
357786
         .tcg_features = TCG_EXT3_FEATURES,
357786
+        /*
357786
+         * TOPOEXT is always allowed but can't be enabled blindly by
357786
+         * "-cpu host", as it requires consistent cache topology info
357786
+         * to be provided so it doesn't confuse guests.
357786
+         */
357786
+        .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
357786
     },
357786
     [FEAT_C000_0001_EDX] = {
357786
         .feat_names = {
357786
-- 
357786
1.8.3.1
357786