mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
x86: Properly reset PAT MSR
Conforming to the Intel spec, set the power-on value of PAT also on reset, but save it across INIT. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
d841b6c4f1
commit
ebda377f8c
3 changed files with 7 additions and 3 deletions
|
@ -99,6 +99,8 @@ void cpu_reset(CPUX86State *env)
|
|||
|
||||
env->mxcsr = 0x1f80;
|
||||
|
||||
env->pat = 0x0007040600070406ULL;
|
||||
|
||||
memset(env->dr, 0, sizeof(env->dr));
|
||||
env->dr[6] = DR6_FIXED_1;
|
||||
env->dr[7] = DR7_FIXED_1;
|
||||
|
@ -1280,8 +1282,11 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
|
|||
void do_cpu_init(CPUState *env)
|
||||
{
|
||||
int sipi = env->interrupt_request & CPU_INTERRUPT_SIPI;
|
||||
uint64_t pat = env->pat;
|
||||
|
||||
cpu_reset(env);
|
||||
env->interrupt_request = sipi;
|
||||
env->pat = pat;
|
||||
apic_init_reset(env->apic_state);
|
||||
env->halted = !cpu_is_bsp(env);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue