|
|
1bdc94 |
From 499c2933a848699a80edd44308e1c4f7497a8a66 Mon Sep 17 00:00:00 2001
|
|
|
1bdc94 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
1bdc94 |
Date: Thu, 26 Jul 2018 15:25:35 +0200
|
|
|
1bdc94 |
Subject: [PATCH 10/15] i386: Allow TOPOEXT to be enabled on older kernels
|
|
|
1bdc94 |
|
|
|
1bdc94 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
1bdc94 |
Message-id: <20180726152535.4493-2-ehabkost@redhat.com>
|
|
|
1bdc94 |
Patchwork-id: 81513
|
|
|
1bdc94 |
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/1] i386: Allow TOPOEXT to be enabled on older kernels
|
|
|
1bdc94 |
Bugzilla: 1608698
|
|
|
1bdc94 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
1bdc94 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
1bdc94 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
1bdc94 |
|
|
|
1bdc94 |
From: Babu Moger <babu.moger@amd.com>
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Enabling TOPOEXT feature might cause compatibility issues if
|
|
|
1bdc94 |
older kernels does not set this feature. Lets set this feature
|
|
|
1bdc94 |
unconditionally.
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Signed-off-by: Babu Moger <babu.moger@amd.com>
|
|
|
1bdc94 |
Message-Id: <1528939107-17193-2-git-send-email-babu.moger@amd.com>
|
|
|
1bdc94 |
[ehabkost: rewrite comment and commit message]
|
|
|
1bdc94 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
1bdc94 |
(cherry picked from commit f98bbd8304112187cafc3e636c31b2a3865d2717)
|
|
|
1bdc94 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
1bdc94 |
---
|
|
|
1bdc94 |
target/i386/kvm.c | 7 +++++++
|
|
|
1bdc94 |
1 file changed, 7 insertions(+)
|
|
|
1bdc94 |
|
|
|
1bdc94 |
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
|
|
1bdc94 |
index 447215b..00f2141 100644
|
|
|
1bdc94 |
--- a/target/i386/kvm.c
|
|
|
1bdc94 |
+++ b/target/i386/kvm.c
|
|
|
1bdc94 |
@@ -372,6 +372,13 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
|
|
|
1bdc94 |
if (host_tsx_blacklisted()) {
|
|
|
1bdc94 |
ret &= ~(CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_HLE);
|
|
|
1bdc94 |
}
|
|
|
1bdc94 |
+ } else if (function == 0x80000001 && reg == R_ECX) {
|
|
|
1bdc94 |
+ /*
|
|
|
1bdc94 |
+ * It's safe to enable TOPOEXT even if it's not returned by
|
|
|
1bdc94 |
+ * GET_SUPPORTED_CPUID. Unconditionally enabling TOPOEXT here allows
|
|
|
1bdc94 |
+ * us to keep CPU models including TOPOEXT runnable on older kernels.
|
|
|
1bdc94 |
+ */
|
|
|
1bdc94 |
+ ret |= CPUID_EXT3_TOPOEXT;
|
|
|
1bdc94 |
} else if (function == 0x80000001 && reg == R_EDX) {
|
|
|
1bdc94 |
/* On Intel, kvm returns cpuid according to the Intel spec,
|
|
|
1bdc94 |
* so add missing bits according to the AMD spec:
|
|
|
1bdc94 |
--
|
|
|
1bdc94 |
1.8.3.1
|
|
|
1bdc94 |
|