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

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