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

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