diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-11-13 09:59:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-12-17 19:32:25 +0100 |
commit | 28a0961757fcf1354a8a8f4df9f40d75c5b633dc (patch) | |
tree | c4b753cc93ae5e6590006a96f6c2e1328d3ec405 /include/sysemu/accel.h | |
parent | deda73e89f271e15044334ad6c0dcdae5341b71d (diff) |
vl: merge -accel processing into configure_accelerators
The next step is to move the parsing of "-machine accel=..." into vl.c,
unifying it with the configure_accelerators() function that has just
been introduced. This way, we will be able to desugar it into multiple
"-accel" options, without polluting accel/accel.c.
The CONFIG_TCG and CONFIG_KVM symbols are not available in vl.c, but
we can use accel_find instead to find their value at runtime. Once we
know that the binary has one of TCG or KVM, the default accelerator
can be expressed simply as "tcg:kvm", because TCG never fails to initialize.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu/accel.h')
-rw-r--r-- | include/sysemu/accel.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index 8eb60b870b..90b6213283 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -66,7 +66,9 @@ typedef struct AccelClass { extern unsigned long tcg_tb_size; -void configure_accelerator(MachineState *ms, const char *progname); +AccelClass *accel_find(const char *opt_name); +int accel_init_machine(AccelClass *acc, MachineState *ms); + /* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post(MachineState *ms); |