accel: Make AccelClass.available() optional

When we move accel classes outside accel.c, the available() function
won't be necessary anymore, because the classes will be registered only
if the accelerator code is really enabled at build time.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Eduardo Habkost 2014-09-26 17:45:22 -03:00 committed by Paolo Bonzini
parent b14a0b7469
commit f6dfb83547

View File

@ -82,7 +82,7 @@ int configure_accelerator(MachineClass *mc)
fprintf(stderr, "\"%s\" accelerator does not exist.\n", buf);
continue;
}
if (!acc->available()) {
if (acc->available && !acc->available()) {
printf("%s not supported for this target\n",
acc->name);
continue;