diff options
author | Avi Kivity <avi@redhat.com> | 2010-06-01 15:33:44 +0300 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-06-02 13:23:03 -0300 |
commit | 00dc445d3d8a92f4a0515787e128d7528dc87819 (patch) | |
tree | d3c60ef4bf72bdd65b8b4d710d13c546c1317411 /qemu-kvm-x86.c | |
parent | 6ef32a64cdb73185d216435d267d58a3cf1c4957 (diff) |
Use get_para_features() from upstream
Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r-- | qemu-kvm-x86.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 0eb406062..3b9be6d00 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1116,34 +1116,6 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *e, uint32_t function, e->edx = env->regs[R_EDX]; } -struct kvm_para_features { - int cap; - int feature; -} para_features[] = { -#ifdef KVM_CAP_CLOCKSOURCE - { KVM_CAP_CLOCKSOURCE, KVM_FEATURE_CLOCKSOURCE }, -#endif -#ifdef KVM_CAP_NOP_IO_DELAY - { KVM_CAP_NOP_IO_DELAY, KVM_FEATURE_NOP_IO_DELAY }, -#endif -#ifdef KVM_CAP_PV_MMU - { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP }, -#endif - { -1, -1 } -}; - -static int get_para_features(CPUState *env) -{ - int i, features = 0; - - for (i = 0; i < ARRAY_SIZE(para_features)-1; i++) { - if (kvm_check_extension(kvm_state, para_features[i].cap)) - features |= (1 << para_features[i].feature); - } - - return features; -} - static void kvm_trim_features(uint32_t *features, uint32_t supported) { int i; |