
6 Mar
2023
6 Mar
'23
1:48 p.m.
On 06/03/2023 10.27, Daniel P. Berrangé wrote:
On Mon, Mar 06, 2023 at 09:46:55AM +0100, Thomas Huth wrote:
[...] If a 32-bit CPU guest +environment should be enforced, you can switch off the "long mode" CPU +flag, e.g. with ``-cpu max,lm=off``.
I had the idea to check this today and this is not quite sufficient, [...] A further difference is that qemy-system-i686 does not appear to enable the 'syscall' flag, but I've not figured out where that difference is coming from in the code.
I think I just spotted this by accident in target/i386/cpu.c around line 637: #ifdef TARGET_X86_64 #define TCG_EXT2_X86_64_FEATURES (CPUID_EXT2_SYSCALL | CPUID_EXT2_LM) #else #define TCG_EXT2_X86_64_FEATURES 0 #endif Thomas