[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/12] i386: Allow TOPOEXT to be enabled on older ker
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 09/12] i386: Allow TOPOEXT to be enabled on older kernels |
Date: |
Mon, 25 Jun 2018 19:25:21 -0300 |
From: Babu Moger <address@hidden>
Enabling TOPOEXT feature might cause compatibility issues if
older kernels does not set this feature. Lets set this feature
unconditionally.
Signed-off-by: Babu Moger <address@hidden>
Message-Id: <address@hidden>
[ehabkost: rewrite comment and commit message]
Signed-off-by: Eduardo Habkost <address@hidden>
---
target/i386/kvm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 445e0e0b11..2d174f3a91 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -372,6 +372,13 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s,
uint32_t function,
if (host_tsx_blacklisted()) {
ret &= ~(CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_HLE);
}
+ } else if (function == 0x80000001 && reg == R_ECX) {
+ /*
+ * It's safe to enable TOPOEXT even if it's not returned by
+ * GET_SUPPORTED_CPUID. Unconditionally enabling TOPOEXT here allows
+ * us to keep CPU models including TOPOEXT runnable on older kernels.
+ */
+ ret |= CPUID_EXT3_TOPOEXT;
} else if (function == 0x80000001 && reg == R_EDX) {
/* On Intel, kvm returns cpuid according to the Intel spec,
* so add missing bits according to the AMD spec:
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-devel] [PULL 00/12] x86 queue, 2018-06-25, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 01/12] i386: Add support for CPUID_8000_001E for AMD, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 02/12] i386: improve alignment of CPU model listing, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 03/12] i386: improve sorting of CPU model names, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 04/12] i386: display known CPUID features linewrapped, in alphabetical order, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 05/12] i386: Remove osxsave CPUID flag name, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 06/12] i386: Remove ospke CPUID flag name, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 07/12] i386: define the AMD 'amd-ssbd' CPUID feature bit, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 08/12] i386: Define AMD's no SSB mitigation needed., Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 09/12] i386: Allow TOPOEXT to be enabled on older kernels,
Eduardo Habkost <=
- [Qemu-devel] [PULL 10/12] i386: Fix up the Node id for CPUID_8000_001E, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 11/12] i386: Enable TOPOEXT feature on AMD EPYC CPU, Eduardo Habkost, 2018/06/25
- [Qemu-devel] [PULL 12/12] i386: Remove generic SMT thread check, Eduardo Habkost, 2018/06/25
- Re: [Qemu-devel] [PULL 00/12] x86 queue, 2018-06-25, Peter Maydell, 2018/06/26