apic: add global apic_get_class()

Every configuration has only up to one APIC class and we'll be extending
the class with a function that can be called without an instanced
object, so a direct access to the class is convenient.

This patch will break compilation if some code uses apic_get_class()
with CONFIG_USER_ONLY.

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Radim Krčmář 2016-10-10 17:28:42 +02:00 committed by Eduardo Habkost
parent 8ca30e8673
commit 2f114315dc
3 changed files with 13 additions and 3 deletions

View file

@ -222,4 +222,6 @@ static inline int apic_get_bit(uint32_t *tab, int index)
return !!(tab[i] & mask);
}
APICCommonClass *apic_get_class(void);
#endif /* QEMU_APIC_INTERNAL_H */