Blame SOURCES/kvm-target-i386-enable-monitor-and-ucode-revision-with-c.patch

902636
From 7b71a7011437ebfa3bc7df9297e892b82293ec98 Mon Sep 17 00:00:00 2001
902636
From: Paolo Bonzini <pbonzini@redhat.com>
902636
Date: Mon, 17 Feb 2020 16:23:16 +0000
902636
Subject: [PATCH 6/9] target/i386: enable monitor and ucode revision with -cpu
902636
 max
902636
MIME-Version: 1.0
902636
Content-Type: text/plain; charset=UTF-8
902636
Content-Transfer-Encoding: 8bit
902636
902636
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
902636
Message-id: <20200217162316.2464-7-pbonzini@redhat.com>
902636
Patchwork-id: 93910
902636
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 6/6] target/i386: enable monitor and ucode revision with -cpu max
902636
Bugzilla: 1791648
902636
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
902636
RH-Acked-by: Maxim Levitsky <mlevitsk@redhat.com>
902636
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
902636
902636
These two features were incorrectly tied to host_cpuid_required rather than
902636
cpu->max_features.  As a result, -cpu max was not enabling either MONITOR
902636
features or ucode revision.
902636
902636
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
902636
(cherry picked from commit be02cda3afde60d219786e23c3f8edb53aec8e17)
902636
902636
[RHEL7: context, upstream uses g_autofree]
902636
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 target/i386/cpu.c | 2 ++
902636
 1 file changed, 2 insertions(+)
902636
902636
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
902636
index 5ac843d..1685a8c 100644
902636
--- a/target/i386/cpu.c
902636
+++ b/target/i386/cpu.c
902636
@@ -6317,7 +6317,9 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
902636
             g_free(name);
902636
             goto out;
902636
         }
902636
+    }
902636
 
902636
+    if (cpu->max_features && accel_uses_host_cpuid()) {
902636
         if (enable_cpu_pm) {
902636
             host_cpuid(5, 0, &cpu->mwait.eax, &cpu->mwait.ebx,
902636
                        &cpu->mwait.ecx, &cpu->mwait.edx);
902636
-- 
902636
1.8.3.1
902636