qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disable cpu features


From: strixner
Subject: disable cpu features
Date: Fri, 4 Nov 2022 18:29:41 +0100

Hi,
 
I have a real hardware with these features:
 
$ less /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 598.67
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2
Hardware        : Generic AM33XX (Flattened Device Tree)
 
Now I want to emulate this as closely as possible with qemu in order to compile software for that real hardware (there is not enough RAM to compile on the real machine). But qemu (for machine virt and cpu max) simulates this cpu instead:
 
$ less /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 125.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0xd07
CPU revision    : 0
Hardware        : Generic DT based system
 
Thus when compiling an application in qemu with -march=native in qemu then it raises an "illegal instruction" error when executing the binary on the real target machine (it runs in qemu).

So long story short - is there a viable way to disable the additional features on the qemu cpu that the real hardware doesn't have?
I can recompile qemu if needed. Tried to find the place in the source code where to e.g. disable features like "evtstrm" (which only has a few occurances)  - but couldn't find the right place. Or is there even a (potentially undocumented?) command line option for that?
 
Thank you!
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]