mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
target/i386: fail if toggling LA57 in 64-bit mode
This fixes kvm-unit-tests access.flat with -cpu qemu64,la57. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b818413583
commit
da3f3b020f
1 changed files with 4 additions and 0 deletions
|
|
@ -167,6 +167,10 @@ void helper_write_crN(CPUX86State *env, int reg, target_ulong t0)
|
||||||
cpu_x86_update_cr3(env, t0);
|
cpu_x86_update_cr3(env, t0);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
if (((t0 ^ env->cr[4]) & CR4_LA57_MASK) &&
|
||||||
|
(env->hflags & HF_CS64_MASK)) {
|
||||||
|
raise_exception_ra(env, EXCP0D_GPF, GETPC());
|
||||||
|
}
|
||||||
cpu_x86_update_cr4(env, t0);
|
cpu_x86_update_cr4(env, t0);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue