@@ -52,6 +52,7 @@
#include "exec/ram_addr.h"
#include "hw/acpi/acpi.h"
#include "qemu/host-utils.h"
+#include "hw/accel.h"
#ifdef DEBUG_ARCH_INIT
#define DPRINTF(fmt, ...) \
@@ -155,6 +156,11 @@ int qemu_read_default_config_files(bool userconfig)
return 0;
}
+int configure_accelerator(MachineState *ms)
+{
+ return init_accelerator(ms, TARGET_NAME);
+}
+
static inline bool is_zero_range(uint8_t *p, uint64_t size)
{
return buffer_find_nonzero_offset(p, size) == size;
@@ -76,7 +76,7 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)
return ret;
}
-int configure_accelerator(MachineState *ms)
+int init_accelerator(MachineState *ms, const char *target_name)
{
const char *p;
char buf[10];
@@ -55,5 +55,6 @@ typedef struct AccelClass {
extern int tcg_tb_size;
int configure_accelerator(MachineState *ms);
+int init_accelerator(MachineState *ms, const char *target_name);
#endif
We will look for target-specific accel subclasses, if available. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- arch_init.c | 6 ++++++ hw/core/accel.c | 2 +- include/hw/accel.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-)