Commit a9ded601 authored by Yang Zhong's avatar Yang Zhong Committed by Paolo Bonzini
Browse files

accel: split the tcg accelerator from accel.c file



there are some types of accelerators in qemu, and all accelerators
have their own file except tcg. tcg accelerator is also defined in
accel.c file. tcg accelerator file will be splited from accel.c and
re-name to tcg-all.c. accel/ directory will be created to include
kvm and tcg related files.

Signed-off-by: default avatarYang Zhong <yang.zhong@intel.com>
Message-Id: <1496383606-18060-2-git-send-email-yang.zhong@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 041e32b8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ common-obj-y += migration/

common-obj-y += audio/
common-obj-y += hw/
common-obj-y += accel.o

common-obj-y += replay/

+1 −0
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@ obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
obj-y += qtest.o bootdevice.o
obj-y += hw/
obj-$(CONFIG_KVM) += kvm-all.o
obj-y += accel/
obj-y += memory.o cputlb.o
obj-y += memory_mapping.o
obj-y += dump.o

accel/Makefile.objs

0 → 100644
+2 −0
Original line number Diff line number Diff line
obj-$(CONFIG_SOFTMMU) += accel.o
obj-y += tcg/
+0 −27
Original line number Diff line number Diff line
@@ -34,15 +34,6 @@
#include "hw/xen/xen.h"
#include "qom/object.h"

int tcg_tb_size;
static bool tcg_allowed = true;

static int tcg_init(MachineState *ms)
{
    tcg_exec_init(tcg_tb_size * 1024 * 1024);
    return 0;
}

static const TypeInfo accel_type = {
    .name = TYPE_ACCEL,
    .parent = TYPE_OBJECT,
@@ -129,27 +120,9 @@ void configure_accelerator(MachineState *ms)
    }
}


static void tcg_accel_class_init(ObjectClass *oc, void *data)
{
    AccelClass *ac = ACCEL_CLASS(oc);
    ac->name = "tcg";
    ac->init_machine = tcg_init;
    ac->allowed = &tcg_allowed;
}

#define TYPE_TCG_ACCEL ACCEL_CLASS_NAME("tcg")

static const TypeInfo tcg_accel_type = {
    .name = TYPE_TCG_ACCEL,
    .parent = TYPE_ACCEL,
    .class_init = tcg_accel_class_init,
};

static void register_accel_types(void)
{
    type_register_static(&accel_type);
    type_register_static(&tcg_accel_type);
}

type_init(register_accel_types);
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_SOFTMMU) += tcg-all.o
Loading