SIM_INTERFACE(x86_cpuid) { cpuid_ret_t (*cpuid)(conf_object_t *obj, conf_object_t *cpu, uint32 in_eax, uint32 in_ebx, uint32 in_ecx, uint32 in_edx); }; #define X86_CPUID_INTERFACE "x86_cpuid"
The CPUID interface makes it possible to customize responses to CPUID requests. The cpuid method should set taken to nonzero if it managed to handle the request, zero otherwise. When taken is non-zero, then the returned values in out_a, out_b, out_c, and out_d will be written to the first four general purpose registers. Assigning external handlers to the leaf range reserved for MAGIC instruction implementation has no effect, because the MAGIC implementation always takes priority.