Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Determining unsupported instructions in qemu softmmu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2335
Location: $TERM

PostPosted: Sat Mar 22, 2025 5:25 am    Post subject: Determining unsupported instructions in qemu softmmu Reply with quote

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
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2335
Location: $TERM

PostPosted: Sun Mar 23, 2025 5:00 am    Post subject: Reply with quote

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
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2335
Location: $TERM

PostPosted: Sun Mar 23, 2025 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum