yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

ae23c9
From 42405600b468b79523f7e8171c1aac4a3d012792 Mon Sep 17 00:00:00 2001
ae23c9
From: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
Date: Tue, 21 Aug 2018 19:15:41 +0100
ae23c9
Subject: [PATCH 1/2] i386: Disable TOPOEXT by default on "-cpu host"
ae23c9
ae23c9
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
Message-id: <20180821191541.31916-2-ehabkost@redhat.com>
ae23c9
Patchwork-id: 81904
ae23c9
O-Subject: [qemu-kvm RHEL8/virt212 PATCH v2 1/1] i386: Disable TOPOEXT by default on "-cpu host"
ae23c9
Bugzilla: 1619804
ae23c9
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
ae23c9
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
ae23c9
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
ae23c9
ae23c9
Enabling TOPOEXT is always allowed, but it can't be enabled
ae23c9
blindly by "-cpu host" because it may make guests crash if the
ae23c9
rest of the cache topology information isn't provided or isn't
ae23c9
consistent.
ae23c9
ae23c9
This addresses the bug reported at:
ae23c9
https://bugzilla.redhat.com/show_bug.cgi?id=1613277
ae23c9
ae23c9
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
Message-Id: <20180809221852.15285-1-ehabkost@redhat.com>
ae23c9
Tested-by: Richard W.M. Jones <rjones@redhat.com>
ae23c9
Reviewed-by: Babu Moger <babu.moger@amd.com>
ae23c9
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
(cherry picked from commit 7210a02c58572b2686a3a8d610c6628f87864aed)
ae23c9
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 target/i386/cpu.c | 6 ++++++
ae23c9
 1 file changed, 6 insertions(+)
ae23c9
ae23c9
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
ae23c9
index 605d0fa..e16dba7 100644
ae23c9
--- a/target/i386/cpu.c
ae23c9
+++ b/target/i386/cpu.c
ae23c9
@@ -852,6 +852,12 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
ae23c9
         },
ae23c9
         .cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
ae23c9
         .tcg_features = TCG_EXT3_FEATURES,
ae23c9
+        /*
ae23c9
+         * TOPOEXT is always allowed but can't be enabled blindly by
ae23c9
+         * "-cpu host", as it requires consistent cache topology info
ae23c9
+         * to be provided so it doesn't confuse guests.
ae23c9
+         */
ae23c9
+        .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
ae23c9
     },
ae23c9
     [FEAT_C000_0001_EDX] = {
ae23c9
         .feat_names = {
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9