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 }})

wcwang

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.

Signed-off-by: Wenchao Wang wenchao.wang@intel.com

@wcwang

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

@wcwang

Optimize host supported features cache algorithm during HAXM initialization.

Signed-off-by: Wenchao Wang wenchao.wang@intel.com

@wcwang

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

@wcwang

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

@wcwang

Enable support for guest CPUID instructions CPUID.15H and CPUID.16H.

Signed-off-by: Wenchao Wang wenchao.wang@intel.com

2 participants

@wcwang @hyuan3