Add CPUID manager for guest CPUID instructions by wcwang · Pull Request #335 · intel/haxm (original) (raw)
This repository was archived by the owner on Jan 28, 2023. It is now read-only.
Conversation0 Commits5 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Optimizes the implementation of setting CPUID feature. It supports to manage guest supported CPUID leaves and configurable leaves, and adds support for setting two CPUID leaves.
- Adds CPUID manager to manage the supported guest CPUID instructions
- Adds CPUID controller to control the user's settings for CPUID leaves
- Enables support for guest CPUID instructions CPUID.15H and CPUID.16H
- Optimizes the calculation of host supported features' cache
- Caches the supported guest CPUID values
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
Add CPUID controller to control the user's settings for CPUID leaves, including the management of the configurable leaves, the validity checking and adjustment of input values.
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
Optimize host supported features cache algorithm during HAXM initialization.
- Simplify the storage type for both host and guest supported features
- Improve the calculation method of host supported features to be more efficient
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
Add CPUID manager to manage the supported guest CPUID instructions. For the leaves in the manager list, if the execution function is specified, the return values of the host CPUID instruction will be overwritten; If not specified, the host values will be returned directly. For the leaves not in the manager list, it will return that those CPUID instructions are not supported.
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
Cache the supported guest CPUID instruction values in the initialization phase to avoid repeated calculations each time a guest CPUID instruction is executed. The supported guest CPUID leaves are managed by the CPUID manager, and the cache memory size is dynamically calculated. When setting the CPUID values, modify the cached values directly.
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
Enable support for guest CPUID instructions CPUID.15H and CPUID.16H.
- Add CPUID.15H and CPUID.16H into CPUID manager as the supported guest CPUID instructions
- Add CPUID.15H and CPUID.16H into CPUID controller to allow user to set their values
- Adjust maximum return value of basic CPUID information to 0x16
Signed-off-by: Wenchao Wang wenchao.wang@intel.com
2 participants