x86 bug fixes
Fix for a XSAVE regression when using "-cpu host", and a fix on the Opteron_G3 CPU model. -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJX8qydAAoJECgHk2+YTcWm4xsP/1ht2HSL7keujGJmYtqueuAN GLsldvqewqlGdaSpAoMNB7IcS54Hvi/WGeqdebZl5bs3sNTbryrqwqQu6uCyBfRu UyuifIchuY0Rq4iys5tjBvodhOzGBW9zZzOl2zM84uZCVHdTKgS1oQGkeN63clY0 0NiGQAfJ2xbaXMJRaSxkE5/SeQie52HjIvJu3uGwSaAJ7rk82p9HJeaemBLFOarD IPWirpkYtQYIrjfZXaP187Z7bXQYEzsZPWtsoBFlTaRc+yyCZtzoSLSA/T+VwN4Q 0hCSQU7Fk0JUfjphFOLRx4U0NzUf9NrTxHYtSIM1zdBa/W6dNLomi5GrEEmvK6ih VBrIWqw70SnrDN5kn5jVu6zlqYNKmG8TWHv+pna4iDF3Pn3odx3+KjfZsq9GF8NU aPr4tt8BUljKRdMw392GCC9seII7oJP0uu1oyHkpH6tKFmfb103nSWRsdF98rdUT rNxqacUdOiZzfm/OB3FYYgJDKSp5/KtKKsrxauO1lYgcEn7LOWI+jvbijSssr5L4 o2RRWz4uS2u2KKxaFR7GdOr7P94py2H/SsPUsuOwwS/RkWuy7oPZBlLfT5jJpFve 01NNcXbDwHS6WLh1c17sPZ4e81lYt9lecBbQObv8x1+r7wXJ/KCaerPOxnuzXqsB i8vDPJGUwgnPWmBC7Zz0 =HmoZ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging x86 bug fixes Fix for a XSAVE regression when using "-cpu host", and a fix on the Opteron_G3 CPU model. # gpg: Signature made Mon 03 Oct 2016 20:08:13 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-pull-request: target-i386: Correct family/model/stepping for Opteron_G3 target-i386: Report known CPUID[EAX=0xD,ECX=0]:EAX bits as migratable Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
1bb4710705
@ -379,6 +379,21 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
|
||||
.driver = TYPE_X86_CPU,\
|
||||
.property = "full-cpuid-auto-level",\
|
||||
.value = "off",\
|
||||
},\
|
||||
{\
|
||||
.driver = "Opteron_G3" "-" TYPE_X86_CPU,\
|
||||
.property = "family",\
|
||||
.value = "15",\
|
||||
},\
|
||||
{\
|
||||
.driver = "Opteron_G3" "-" TYPE_X86_CPU,\
|
||||
.property = "model",\
|
||||
.value = "6",\
|
||||
},\
|
||||
{\
|
||||
.driver = "Opteron_G3" "-" TYPE_X86_CPU,\
|
||||
.property = "stepping",\
|
||||
.value = "1",\
|
||||
},
|
||||
|
||||
#define PC_COMPAT_2_6 \
|
||||
|
@ -258,6 +258,7 @@ typedef struct FeatureWordInfo {
|
||||
int cpuid_reg; /* output register (R_* constant) */
|
||||
uint32_t tcg_features; /* Feature flags supported by TCG */
|
||||
uint32_t unmigratable_flags; /* Feature flags known to be unmigratable */
|
||||
uint32_t migratable_flags; /* Feature flags known to be migratable */
|
||||
} FeatureWordInfo;
|
||||
|
||||
static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
||||
@ -494,6 +495,10 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
||||
.cpuid_needs_ecx = true, .cpuid_ecx = 0,
|
||||
.cpuid_reg = R_EAX,
|
||||
.tcg_features = ~0U,
|
||||
.migratable_flags = XSTATE_FP_MASK | XSTATE_SSE_MASK |
|
||||
XSTATE_YMM_MASK | XSTATE_BNDREGS_MASK | XSTATE_BNDCSR_MASK |
|
||||
XSTATE_OPMASK_MASK | XSTATE_ZMM_Hi256_MASK | XSTATE_Hi16_ZMM_MASK |
|
||||
XSTATE_PKRU_MASK,
|
||||
},
|
||||
[FEAT_XSAVE_COMP_HI] = {
|
||||
.cpuid_eax = 0xD,
|
||||
@ -600,15 +605,13 @@ static uint32_t x86_cpu_get_migratable_flags(FeatureWord w)
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
uint32_t f = 1U << i;
|
||||
/* If the feature name is unknown, it is not supported by QEMU yet */
|
||||
if (!wi->feat_names[i]) {
|
||||
continue;
|
||||
|
||||
/* If the feature name is known, it is implicitly considered migratable,
|
||||
* unless it is explicitly set in unmigratable_flags */
|
||||
if ((wi->migratable_flags & f) ||
|
||||
(wi->feat_names[i] && !(wi->unmigratable_flags & f))) {
|
||||
r |= f;
|
||||
}
|
||||
/* Skip features known to QEMU, but explicitly marked as unmigratable */
|
||||
if (wi->unmigratable_flags & f) {
|
||||
continue;
|
||||
}
|
||||
r |= f;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@ -1425,9 +1428,9 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
||||
.name = "Opteron_G3",
|
||||
.level = 5,
|
||||
.vendor = CPUID_VENDOR_AMD,
|
||||
.family = 15,
|
||||
.model = 6,
|
||||
.stepping = 1,
|
||||
.family = 16,
|
||||
.model = 2,
|
||||
.stepping = 3,
|
||||
.features[FEAT_1_EDX] =
|
||||
CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
|
||||
CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
|
||||
|
Loading…
Reference in New Issue
Block a user