qemu-e2k/target/i386/tcg
Paolo Bonzini 40a205da41 target/i386: emulate 64-bit ring 0 for linux-user if LM feature is set
32-bit binaries can run on a long mode processor even if the kernel
is 64-bit, of course, and this can have slightly different behavior;
for example, SYSCALL is allowed on Intel processors.

Allow reporting LM to programs running under user mode emulation,
so that "-cpu" can be used with named CPU models even for qemu-i386
and even without disabling LM by hand.

Fortunately, most of the runtime code in QEMU has to depend on HF_LMA_MASK
or on HF_CS64_MASK (which is anyway false for qemu-i386's 32-bit code
segment) rather than TARGET_X86_64, therefore all that is needed is an
update of linux-user's ring 0 setup.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1534
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-06-29 10:49:43 +02:00
..
sysemu target/i386: implement SYSCALL/SYSRET in 32-bit emulators 2023-06-26 10:23:56 +02:00
user target/i386: implement SYSCALL/SYSRET in 32-bit emulators 2023-06-26 10:23:56 +02:00
bpt_helper.c compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
cc_helper_template.h.inc target/i386: Rename helper template headers as '.h.inc' 2023-06-13 11:28:58 +02:00
cc_helper.c target/i386: Rename helper template headers as '.h.inc' 2023-06-13 11:28:58 +02:00
decode-new.c.inc target/i386: Fix exception classes for MOVNTPS/MOVNTPD. 2023-05-18 08:53:50 +02:00
decode-new.h target/i386: implement FMA instructions 2022-10-22 09:05:54 +02:00
emit.c.inc target/i386: fix avx2 instructions vzeroall and vpermdq 2023-05-18 08:53:50 +02:00
excp_helper.c target/i386: Raise #GP on unaligned m128 accesses when required. 2022-09-18 09:17:40 +02:00
fpu_helper.c target/i386: introduce function to set rounding mode from FPCW or MXCSR bits 2022-10-20 15:16:13 +02:00
helper-tcg.h target/i386: Raise #GP on unaligned m128 accesses when required. 2022-09-18 09:17:40 +02:00
int_helper.c target/i386: Rename helper template headers as '.h.inc' 2023-06-13 11:28:58 +02:00
mem_helper.c target/i386: Inline cmpxchg16b 2023-02-04 06:19:43 -10:00
meson.build i386: split svm_helper into sysemu and stub-only user 2021-05-10 15:41:51 -04:00
misc_helper.c target/i386: implement RDPID in TCG 2023-06-26 10:23:56 +02:00
mpx_helper.c
ops_sse_header.h.inc target/i386: Rename helper template headers as '.h.inc' 2023-06-13 11:28:58 +02:00
seg_helper.c target/i386: implement SYSCALL/SYSRET in 32-bit emulators 2023-06-26 10:23:56 +02:00
seg_helper.h i386: split seg_helper into user-only and sysemu parts 2021-05-10 15:41:52 -04:00
shift_helper_template.h.inc target/i386: Rename helper template headers as '.h.inc' 2023-06-13 11:28:58 +02:00
tcg-cpu.c target/i386: Replace tb_pc() with tb->pc 2023-03-01 07:33:20 -10:00
tcg-cpu.h target/i386: Move X86XSaveArea into TCG 2021-07-06 08:33:51 +02:00
tcg-stub.c
translate.c target/i386: emulate 64-bit ring 0 for linux-user if LM feature is set 2023-06-29 10:49:43 +02:00