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 <address@hidden>
---
target-i386/cpu.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)