Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request'…
Browse files Browse the repository at this point in the history
… into staging

X86 queue, 2015-11-05

# gpg: Signature made Thu 05 Nov 2015 19:35:31 GMT using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: Enable clflushopt/clwb/pcommit instructions
  target-i386: Remove POPCNT from qemu64 and qemu32 CPU models
  target-i386: Remove ABM from qemu64 CPU model
  target-i386: Remove SSE4a from qemu64 CPU model
  target-i386: Set "check=off" by default on pc-*-2.4 and older

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Nov 6, 2015
2 parents 496c1b1 + f7fda28 commit 5744181
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
25 changes: 25 additions & 0 deletions include/hw/i386/pc.h
Expand Up @@ -322,6 +322,31 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "host" "-" TYPE_X86_CPU,\
.property = "host-cache-info",\
.value = "on",\
},\
{\
.driver = TYPE_X86_CPU,\
.property = "check",\
.value = "off",\
},\
{\
.driver = "qemu64" "-" TYPE_X86_CPU,\
.property = "sse4a",\
.value = "on",\
},\
{\
.driver = "qemu64" "-" TYPE_X86_CPU,\
.property = "abm",\
.value = "on",\
},\
{\
.driver = "qemu64" "-" TYPE_X86_CPU,\
.property = "popcnt",\
.value = "on",\
},\
{\
.driver = "qemu32" "-" TYPE_X86_CPU,\
.property = "popcnt",\
.value = "on",\
},

#define PC_COMPAT_2_3 \
Expand Down
11 changes: 5 additions & 6 deletions target-i386/cpu.c
Expand Up @@ -259,8 +259,8 @@ static const char *svm_feature_name[] = {
static const char *cpuid_7_0_ebx_feature_name[] = {
"fsgsbase", "tsc_adjust", NULL, "bmi1", "hle", "avx2", NULL, "smep",
"bmi2", "erms", "invpcid", "rtm", NULL, NULL, "mpx", NULL,
"avx512f", NULL, "rdseed", "adx", "smap", NULL, NULL, NULL,
NULL, NULL, "avx512pf", "avx512er", "avx512cd", NULL, NULL, NULL,
"avx512f", NULL, "rdseed", "adx", "smap", NULL, "pcommit", "clflushopt",
"clwb", NULL, "avx512pf", "avx512er", "avx512cd", NULL, NULL, NULL,
};

static const char *cpuid_apm_edx_feature_name[] = {
Expand Down Expand Up @@ -671,12 +671,11 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
CPUID_PSE36,
.features[FEAT_1_ECX] =
CPUID_EXT_SSE3 | CPUID_EXT_CX16 | CPUID_EXT_POPCNT,
CPUID_EXT_SSE3 | CPUID_EXT_CX16,
.features[FEAT_8000_0001_EDX] =
CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
.features[FEAT_8000_0001_ECX] =
CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM |
CPUID_EXT3_ABM | CPUID_EXT3_SSE4A,
CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM,
.xlevel = 0x8000000A,
},
{
Expand Down Expand Up @@ -772,7 +771,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
.features[FEAT_1_EDX] =
PPRO_FEATURES,
.features[FEAT_1_ECX] =
CPUID_EXT_SSE3 | CPUID_EXT_POPCNT,
CPUID_EXT_SSE3,
.xlevel = 0x80000004,
},
{
Expand Down
3 changes: 3 additions & 0 deletions target-i386/cpu.h
Expand Up @@ -576,6 +576,9 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
#define CPUID_7_0_EBX_RDSEED (1U << 18)
#define CPUID_7_0_EBX_ADX (1U << 19)
#define CPUID_7_0_EBX_SMAP (1U << 20)
#define CPUID_7_0_EBX_PCOMMIT (1U << 22) /* Persistent Commit */
#define CPUID_7_0_EBX_CLFLUSHOPT (1U << 23) /* Flush a Cache Line Optimized */
#define CPUID_7_0_EBX_CLWB (1U << 24) /* Cache Line Write Back */
#define CPUID_7_0_EBX_AVX512PF (1U << 26) /* AVX-512 Prefetch */
#define CPUID_7_0_EBX_AVX512ER (1U << 27) /* AVX-512 Exponential and Reciprocal */
#define CPUID_7_0_EBX_AVX512CD (1U << 28) /* AVX-512 Conflict Detection */
Expand Down

0 comments on commit 5744181

Please sign in to comment.