On 09/23/2016 12:45 PM, Eduardo Habkost wrote:
Instead of checking both env->features and ena_mask at two
different places in the CPUID code, initialize ena_mask based on
the features that are enabled for the CPU, and then clear
unsupported bits based on kvm_arch_get_supported_cpuid().

The results should be exactly the same, but it will make it
easier to move the mask calculation elsewhare, and reuse
x86_cpu_filter_features() for the kvm_arch_get_supported_cpuid()
check.

Signed-off-by: Eduardo Habkost <[email protected]>
---
 target-i386/cpu.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>


r~

Reply via email to