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

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