mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
x86: make a20_mask int32_t
This makes the savevm code correct, and sign extensins gives us exactly what we need (namely, sign extend to 64 bits when used with 64bit addresess. Once there, change 0x100000 for 1 << 20, that maks all a20 use the same syntax. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1f76b9b9b3
commit
5ee0ffaa42
3 changed files with 6 additions and 11 deletions
|
@ -780,7 +780,7 @@ void cpu_dump_state(CPUState *env, FILE *f,
|
|||
eflags & CC_C ? 'C' : '-',
|
||||
env->hflags & HF_CPL_MASK,
|
||||
(env->hflags >> HF_INHIBIT_IRQ_SHIFT) & 1,
|
||||
(int)(env->a20_mask >> 20) & 1,
|
||||
(env->a20_mask >> 20) & 1,
|
||||
(env->hflags >> HF_SMM_SHIFT) & 1,
|
||||
env->halted);
|
||||
} else
|
||||
|
@ -807,7 +807,7 @@ void cpu_dump_state(CPUState *env, FILE *f,
|
|||
eflags & CC_C ? 'C' : '-',
|
||||
env->hflags & HF_CPL_MASK,
|
||||
(env->hflags >> HF_INHIBIT_IRQ_SHIFT) & 1,
|
||||
(int)(env->a20_mask >> 20) & 1,
|
||||
(env->a20_mask >> 20) & 1,
|
||||
(env->hflags >> HF_SMM_SHIFT) & 1,
|
||||
env->halted);
|
||||
}
|
||||
|
@ -938,7 +938,7 @@ void cpu_x86_set_a20(CPUX86State *env, int a20_state)
|
|||
/* when a20 is changed, all the MMU mappings are invalid, so
|
||||
we must flush everything */
|
||||
tlb_flush(env, 1);
|
||||
env->a20_mask = (~0x100000) | (a20_state << 20);
|
||||
env->a20_mask = ~(1 << 20) | (a20_state << 20);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue