Bug 386851 - Please add support for CPUID override
Summary: Please add support for CPUID override
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.13.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 11:33 UTC by Daniel
Modified: 2017-11-13 11:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2017-11-13 11:33:29 UTC
Please allow to override CPUID values. This would be helpful to test apps which has few versions of code, and selects one of them at runtime after checking data returned by CPUID. Second use case is to simulate code with instructions which are not supported natively by CPU, e.g. to test code which uses AVX512 on some non-AVX512 CPU.

Simulation of CPUs with less features should be pretty straightforward to implement. Adding new features may be more complex, if VG internally delegates instruction execution to real CPU - it would have to simulate them in software.

To make this feature easy to use, VG should provide predefined CPUID profiles for various CPUs, e.g. like Intel SDE does (link below). You can also add separate option(s) to fine-tune CPUID data, some users may find this useful too.
https://software.intel.com/en-us/articles/intel-software-development-emulator#BASIC