diff options
| author | Eduardo Habkost | 2014-09-26 22:45:24 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2014-10-04 08:59:15 +0200 |
| commit | 782c3f2939a8faefa4c5a324dfb472a534048510 (patch) | |
| tree | e90e3c17ca9e0aa8646f3e49885e61fc91b45012 /accel.c | |
| parent | accel: Report unknown accelerator as "not found" instead of "does not exist" (diff) | |
| download | qemu-782c3f2939a8faefa4c5a324dfb472a534048510.tar.gz qemu-782c3f2939a8faefa4c5a324dfb472a534048510.tar.xz qemu-782c3f2939a8faefa4c5a324dfb472a534048510.zip | |
accel: Move KVM accel registration to kvm-all.c
Note that this has an user-visible side-effect: instead of reporting
"KVM is not supported for this target", QEMU binaries not supporting KVM
will report "kvm accelerator does not exist".
As kvm_availble() always return 1 when CONFIG_KVM is enabled, we don't
need to set AccelClass.available anymore. kvm_enabled() is not being
completely removed yet only because qmp_query_kvm() still uses it.
This also allows us to make kvm_init() static.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel.c')
| -rw-r--r-- | accel.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -149,23 +149,6 @@ static const TypeInfo xen_accel_type = { .class_init = xen_accel_class_init, }; -static void kvm_accel_class_init(ObjectClass *oc, void *data) -{ - AccelClass *ac = ACCEL_CLASS(oc); - ac->name = "KVM"; - ac->available = kvm_available; - ac->init = kvm_init; - ac->allowed = &kvm_allowed; -} - -#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm") - -static const TypeInfo kvm_accel_type = { - .name = TYPE_KVM_ACCEL, - .parent = TYPE_ACCEL, - .class_init = kvm_accel_class_init, -}; - static void qtest_accel_class_init(ObjectClass *oc, void *data) { AccelClass *ac = ACCEL_CLASS(oc); @@ -188,7 +171,6 @@ static void register_accel_types(void) type_register_static(&accel_type); type_register_static(&tcg_accel_type); type_register_static(&xen_accel_type); - type_register_static(&kvm_accel_type); type_register_static(&qtest_accel_type); } |
