|
|
8b1478 |
From a746ca268865ce21cf72710577e1fc3f69ce9506 Mon Sep 17 00:00:00 2001
|
|
|
8b1478 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
Date: Fri, 4 Oct 2019 19:57:13 +0200
|
|
|
8b1478 |
Subject: [PATCH 3/4] i386: Disable OSPKE on Cascadelake-Server
|
|
|
8b1478 |
|
|
|
8b1478 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
Message-id: <20191004195714.10176-3-ehabkost@redhat.com>
|
|
|
8b1478 |
Patchwork-id: 90962
|
|
|
8b1478 |
O-Subject: [RHEL-7.8 qemu-kvm-rhev PATCH 2/3] i386: Disable OSPKE on Cascadelake-Server
|
|
|
8b1478 |
Bugzilla: 1638472
|
|
|
8b1478 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
This is a partial cherry pick of upstream commit:
|
|
|
8b1478 |
|
|
|
8b1478 |
commit bb4928c7cafe50ab2137a0034e350ef1bfa044d9
|
|
|
8b1478 |
Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
Date: Tue Mar 19 17:05:15 2019 -0300
|
|
|
8b1478 |
|
|
|
8b1478 |
i386: Disable OSPKE on CPU model definitions
|
|
|
8b1478 |
|
|
|
8b1478 |
Currently, the Cascadelake-Server, Icelake-Client, and
|
|
|
8b1478 |
Icelake-Server are always generating the following warning:
|
|
|
8b1478 |
|
|
|
8b1478 |
qemu-system-x86_64: warning: \
|
|
|
8b1478 |
host doesn't support requested feature: CPUID.07H:ECX [bit 4]
|
|
|
8b1478 |
|
|
|
8b1478 |
This happens because OSPKE was never returned by
|
|
|
8b1478 |
GET_SUPPORTED_CPUID or x86_cpu_get_supported_feature_word().
|
|
|
8b1478 |
OSPKE is a runtime flag automatically set by the KVM module or by
|
|
|
8b1478 |
TCG code, was always cleared by x86_cpu_filter_features(), and
|
|
|
8b1478 |
was not supposed to appear on the CPU model table.
|
|
|
8b1478 |
|
|
|
8b1478 |
Remove the OSPKE flag from the CPU model table entries, to avoid
|
|
|
8b1478 |
the bogus warning and avoid returning invalid feature data on
|
|
|
8b1478 |
query-cpu-* QMP commands. As OSPKE was always cleared by
|
|
|
8b1478 |
x86_cpu_filter_features(), this won't have any guest-visible
|
|
|
8b1478 |
impact.
|
|
|
8b1478 |
|
|
|
8b1478 |
Include a test case that should detect the problem if we introduce
|
|
|
8b1478 |
a similar bug again.
|
|
|
8b1478 |
|
|
|
8b1478 |
Fixes: c7a88b52f62b ("i386: Add new model of Cascadelake-Server")
|
|
|
8b1478 |
Fixes: 8a11c62da914 ("i386: Add new CPU model Icelake-{Server,Client}")
|
|
|
8b1478 |
Cc: Tao Xu <tao3.xu@intel.com>
|
|
|
8b1478 |
Cc: Robert Hoo <robert.hu@linux.intel.com>
|
|
|
8b1478 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
Message-Id: <20190319200515.14999-1-ehabkost@redhat.com>
|
|
|
8b1478 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
It includes only the Cascadelake-Server change, because Icelake*
|
|
|
8b1478 |
is not present in the RHEL7 tree.
|
|
|
8b1478 |
|
|
|
8b1478 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
8b1478 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
8b1478 |
---
|
|
|
8b1478 |
target/i386/cpu.c | 2 +-
|
|
|
8b1478 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
8b1478 |
|
|
|
8b1478 |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
|
8b1478 |
index 2b85193..b377564 100644
|
|
|
8b1478 |
--- a/target/i386/cpu.c
|
|
|
8b1478 |
+++ b/target/i386/cpu.c
|
|
|
8b1478 |
@@ -2518,7 +2518,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
|
|
8b1478 |
CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
|
|
|
8b1478 |
CPUID_7_0_EBX_INTEL_PT,
|
|
|
8b1478 |
.features[FEAT_7_0_ECX] =
|
|
|
8b1478 |
- CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
|
|
|
8b1478 |
+ CPUID_7_0_ECX_PKU |
|
|
|
8b1478 |
CPUID_7_0_ECX_AVX512VNNI,
|
|
|
8b1478 |
.features[FEAT_7_0_EDX] =
|
|
|
8b1478 |
CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_SPEC_CTRL_SSBD,
|
|
|
8b1478 |
--
|
|
|
8b1478 |
1.8.3.1
|
|
|
8b1478 |
|