diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-02-25 15:30:57 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-02-25 15:30:57 +0000 |
commit | 586fc27e6a2ade22e35089e8972bc678b113e1db (patch) | |
tree | 3757f6e443da156b390e913c0c8437c3d5e4ddb4 /target-i386/cpu.c | |
parent | 774ae4254d3910f1c94ad6ed44d14cbea0e6a2f2 (diff) | |
parent | cfc3b074de4b4ccee2540edbf8cfdb026dc19943 (diff) | |
download | qemu-586fc27e6a2ade22e35089e8972bc678b113e1db.tar.gz qemu-586fc27e6a2ade22e35089e8972bc678b113e1db.tar.bz2 qemu-586fc27e6a2ade22e35089e8972bc678b113e1db.zip |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Asynchronous dump-guest-memory from Peter
* improved logging with -D -daemonize from Dimitris
* more address_space_* optimization from Gonglei
* TCG xsave/xrstor thinko fix
* chardev bugfix and documentation patch
# gpg: Signature made Thu 25 Feb 2016 15:12:27 GMT using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
* remotes/bonzini/tags/for-upstream:
target-i386: fix confusion in xcr0 bit position vs. mask
chardev: Properly initialize ChardevCommon components
memory: Remove unreachable return statement
memory: optimize qemu_get_ram_ptr and qemu_ram_ptr_length
exec: store RAMBlock pointer into memory region
log: Redirect stderr to logfile if deamonized
dump-guest-memory: add qmp event DUMP_COMPLETED
Dump: add hmp command "info dump"
Dump: add qmp command "query-dump"
DumpState: adding total_size and written_size fields
dump-guest-memory: add "detach" support
dump-guest-memory: disable dump when in INMIGRATE state
dump-guest-memory: introduce dump_process() helper function.
dump-guest-memory: add dump_in_progress() helper function
dump-guest-memory: using static DumpState, add DumpStatus
dump-guest-memory: add "detach" flag for QMP/HMP interfaces.
dump-guest-memory: cleanup: removing dump_{error|cleanup}().
scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
qemu-options.hx: Improve documentation of chardev multiplexing mode
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r-- | target-i386/cpu.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index c78f824678..0f38d1eae3 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -470,19 +470,26 @@ static const X86RegisterInfo32 x86_reg_info_32[CPU_NB_REGS32] = { #undef REGISTER const ExtSaveArea x86_ext_save_areas[] = { - [2] = { .feature = FEAT_1_ECX, .bits = CPUID_EXT_AVX, + [XSTATE_YMM_BIT] = + { .feature = FEAT_1_ECX, .bits = CPUID_EXT_AVX, .offset = 0x240, .size = 0x100 }, - [3] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX, + [XSTATE_BNDREGS_BIT] = + { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX, .offset = 0x3c0, .size = 0x40 }, - [4] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX, + [XSTATE_BNDCSR_BIT] = + { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX, .offset = 0x400, .size = 0x40 }, - [5] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, + [XSTATE_OPMASK_BIT] = + { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, .offset = 0x440, .size = 0x40 }, - [6] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, + [XSTATE_ZMM_Hi256_BIT] = + { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, .offset = 0x480, .size = 0x200 }, - [7] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, + [XSTATE_Hi16_ZMM_BIT] = + { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_AVX512F, .offset = 0x680, .size = 0x400 }, - [9] = { .feature = FEAT_7_0_ECX, .bits = CPUID_7_0_ECX_PKU, + [XSTATE_PKRU_BIT] = + { .feature = FEAT_7_0_ECX, .bits = CPUID_7_0_ECX_PKU, .offset = 0xA80, .size = 0x8 }, }; @@ -2480,7 +2487,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *ecx = MAX(*ecx, esa->offset + esa->size); } } - *eax |= ena_mask & (XSTATE_FP | XSTATE_SSE); + *eax |= ena_mask & (XSTATE_FP_MASK | XSTATE_SSE_MASK); *ebx = *ecx; } else if (count == 1) { *eax = env->features[FEAT_XSAVE]; @@ -2714,15 +2721,15 @@ static void x86_cpu_reset(CPUState *s) cpu_watchpoint_remove_all(s, BP_CPU); cr4 = 0; - xcr0 = XSTATE_FP; + xcr0 = XSTATE_FP_MASK; #ifdef CONFIG_USER_ONLY /* Enable all the features for user-mode. */ if (env->features[FEAT_1_EDX] & CPUID_SSE) { - xcr0 |= XSTATE_SSE; + xcr0 |= XSTATE_SSE_MASK; } if (env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_MPX) { - xcr0 |= XSTATE_BNDREGS | XSTATE_BNDCSR; + xcr0 |= XSTATE_BNDREGS_MASK | XSTATE_BNDCSR_MASK; } if (env->features[FEAT_1_ECX] & CPUID_EXT_XSAVE) { cr4 |= CR4_OSFXSR_MASK | CR4_OSXSAVE_MASK; |