View previous topic :: View next topic |
Author |
Message |
dE_logics Advocate


Joined: 02 Jan 2009 Posts: 2335 Location: $TERM
|
Posted: Sat Mar 22, 2025 5:25 am Post subject: Determining unsupported instructions in qemu softmmu |
|
|
I'm trying to chroot into an x86-64 (built using -march=icelake-client) system from another x86-64 system who's CPU has incompatible instructions to icelake-client (znver1). Therefore I used qemu softmmu (user space emulation) to chroot into it --
chroot /usr/x86_64-mypl-linux-gnu/ /qemu-x86_64 -cpu max /bin/bash
Where /qemu-x86_64 is a static binary copied over from the host machine to /usr/x86_64-mypl-linux-gnu/
However the chroot fails with --
Code: | qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction (core dumped) |
So some instructions in icelake-client is not supported by qemu. I want to figure out these instructions and disable them in C(XX)FLAGS. How do I determine these instructions?
BTW I very well know this is some avx512 thing -- but exactly which one in avx512, I don't know. _________________ My blog |
|
Back to top |
|
 |
dE_logics Advocate


Joined: 02 Jan 2009 Posts: 2335 Location: $TERM
|
Posted: Sun Mar 23, 2025 5:00 am Post subject: |
|
|
Disabling avx512 makes qemu-softmmu and even the znver1 machine execute bash successfully.
Now question is, qemu does not support avx512?
Code: | qemu-x86_64 -cpu Icelake-Server-v7 /usr/x86_64-mypl-linux-gnu/bin/bash
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512f [bit 16]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512dq [bit 17]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512ifma [bit 21]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512cd [bit 28]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512bw [bit 30]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.avx512vl [bit 31]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.avx512vbmi [bit 1]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.avx512vbmi2 [bit 6]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.gfni [bit 8]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.vpclmulqdq [bit 10]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.avx512vnni [bit 11]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.avx512bitalg [bit 12]
qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:ECX.avx512-vpopcntdq [bit 14] |
Is this really true, or is it some USE flag problem? note all the avx512 above in qemu's output. _________________ My blog |
|
Back to top |
|
 |
dE_logics Advocate


Joined: 02 Jan 2009 Posts: 2335 Location: $TERM
|
Posted: Sun Mar 23, 2025 9:14 am Post subject: |
|
|
Ok, intel's SDE manages to execute the binary, but I can't chroot using it. This calls in for a new thread.
[Administrator note: the new thread appears to be Using intel's sde to chroot into a ROOT. -Hu] _________________ My blog |
|
Back to top |
|
 |
|