qemu-arm
[Top][All Lists]
Advanced

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

Re: disable cpu features


From: Peter Maydell
Subject: Re: disable cpu features
Date: Fri, 4 Nov 2022 18:38:28 +0000

On Fri, 4 Nov 2022 at 17:45, <strixner@web.de> wrote:
> 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?

No, QEMU doesn't support individual feature enable/disable,
except for a very few cases (eg neon).

Generally your compiler ought to be compiling for a sensible
ABI target (eg armhf is a common Linux one), not "whatever
the maximum possible the host CPU happens to do", though
(aka, don't use -march=native...)

That said, this:

CPU part        : 0xc08

is a Cortex-A8. So "-cpu cortex-a8" will probably be
basically what you want. The catch is that the virt board
doesn't support a CPU type that old, so if you're using 'virt'
you'd need to sort out a setup that works on a Cortex-A8 based
board, which would be a pain.

The simplest thing would be to tell your compiler to build
for a Cortex-A8 with Neon.

thanks
-- PMM



reply via email to

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