From b152b05a35acc0ff3da5648fd5cb97136853838c Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 26 Sep 2014 17:45:25 -0300 Subject: accel: Move Xen registration code to xen-common.c Note that this has an user-visible side-effect: instead of reporting "Xen is not supported for this target", QEMU binaries not supporting Xen will report "xen accelerator does not exist". As xen_available() always return 1 when CONFIG_XEN is enabled, we don't need to set AccelClass.available anymore. xen_enabled() is not being removed yet, but only because vl.c is still using it. This also allows us to make xen_init() static. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- accel.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'accel.c') diff --git a/accel.c b/accel.c index a20e427..2cefbb0 100644 --- a/accel.c +++ b/accel.c @@ -132,23 +132,6 @@ static const TypeInfo tcg_accel_type = { .class_init = tcg_accel_class_init, }; -static void xen_accel_class_init(ObjectClass *oc, void *data) -{ - AccelClass *ac = ACCEL_CLASS(oc); - ac->name = "Xen"; - ac->available = xen_available; - ac->init = xen_init; - ac->allowed = &xen_allowed; -} - -#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen") - -static const TypeInfo xen_accel_type = { - .name = TYPE_XEN_ACCEL, - .parent = TYPE_ACCEL, - .class_init = xen_accel_class_init, -}; - static void qtest_accel_class_init(ObjectClass *oc, void *data) { AccelClass *ac = ACCEL_CLASS(oc); @@ -170,7 +153,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(&qtest_accel_type); } -- cgit v1.1