[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/8] target/i386: fail if toggling LA57 in 64-bit mode
From: |
Paolo Bonzini |
Subject: |
[PULL 3/8] target/i386: fail if toggling LA57 in 64-bit mode |
Date: |
Fri, 19 Mar 2021 10:39:19 -0400 |
This fixes kvm-unit-tests access.flat with -cpu qemu64,la57.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/misc_helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index 90b87fdef0..a25428c36e 100644
--- a/target/i386/tcg/misc_helper.c
+++ b/target/i386/tcg/misc_helper.c
@@ -167,6 +167,10 @@ void helper_write_crN(CPUX86State *env, int reg,
target_ulong t0)
cpu_x86_update_cr3(env, t0);
break;
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);
break;
case 8:
--
2.26.2
- [PULL 0/8] Misc bugfixes for QEMU soft freeze, Paolo Bonzini, 2021/03/19
- [PULL 1/8] qom: use qemu_printf to print help for user-creatable objects, Paolo Bonzini, 2021/03/19
- [PULL 3/8] target/i386: fail if toggling LA57 in 64-bit mode,
Paolo Bonzini <=
- [PULL 2/8] target/i386: allow modifying TCG phys-addr-bits, Paolo Bonzini, 2021/03/19
- [PULL 8/8] tests/qtest: cleanup the testcase for bug 1878642, Paolo Bonzini, 2021/03/19
- [PULL 6/8] i386: Make migration fail when Hyper-V reenlightenment was enabled but 'user_tsc_khz' is unset, Paolo Bonzini, 2021/03/19
- [PULL 7/8] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable, Paolo Bonzini, 2021/03/19
- [PULL 4/8] target/i386: svm: do not discard high 32 bits of EXITINFO1, Paolo Bonzini, 2021/03/19
- [PULL 5/8] i386: Fix 'hypercall_hypercall' typo, Paolo Bonzini, 2021/03/19
- Re: [PULL 0/8] Misc bugfixes for QEMU soft freeze, no-reply, 2021/03/19
- Re: [PULL 0/8] Misc bugfixes for QEMU soft freeze, Peter Maydell, 2021/03/20
- Re: [PULL 0/8] Misc bugfixes for QEMU soft freeze, Thomas Huth, 2021/03/22