Skip to content

Commit

Permalink
i386: kvm: reformat filter_features_for_kvm() code
Browse files Browse the repository at this point in the history
Cosmetic, but it will also help to make futher patches easier to review.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
ehabkost authored and matosatti committed Oct 31, 2012
1 parent bc74b7d commit b8091f2
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions target-i386/cpu.c
Expand Up @@ -1374,22 +1374,20 @@ static void filter_features_for_kvm(X86CPU *cpu)
CPUX86State *env = &cpu->env;
KVMState *s = kvm_state;

env->cpuid_features &= kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX);

env->cpuid_ext_features &= kvm_arch_get_supported_cpuid(s, 1, 0, R_ECX);

env->cpuid_ext2_features &= kvm_arch_get_supported_cpuid(s, 0x80000001,
0, R_EDX);
env->cpuid_ext3_features &= kvm_arch_get_supported_cpuid(s, 0x80000001,
0, R_ECX);
env->cpuid_svm_features &= kvm_arch_get_supported_cpuid(s, 0x8000000A,
0, R_EDX);

env->cpuid_features &=
kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX);
env->cpuid_ext_features &=
kvm_arch_get_supported_cpuid(s, 1, 0, R_ECX);
env->cpuid_ext2_features &=
kvm_arch_get_supported_cpuid(s, 0x80000001, 0, R_EDX);
env->cpuid_ext3_features &=
kvm_arch_get_supported_cpuid(s, 0x80000001, 0, R_ECX);
env->cpuid_svm_features &=
kvm_arch_get_supported_cpuid(s, 0x8000000A, 0, R_EDX);
env->cpuid_kvm_features &=
kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX);

env->cpuid_ext4_features &= kvm_arch_get_supported_cpuid(s, 0xC0000001,
0, R_EDX);
kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX);
env->cpuid_ext4_features &=
kvm_arch_get_supported_cpuid(s, 0xC0000001, 0, R_EDX);

}
#endif
Expand Down

0 comments on commit b8091f2

Please sign in to comment.