accel: Replace current_machine->accelerator by current_accel() wrapper

We actually want to access the accelerator, not the machine, so
use the current_accel() wrapper instead.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200121110349.25842-10-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-01-21 12:03:48 +01:00 committed by Paolo Bonzini
parent ce7cdebdb5
commit 4f7f589381
7 changed files with 10 additions and 11 deletions

View file

@ -124,7 +124,7 @@ static void tcg_accel_instance_init(Object *obj)
static int tcg_init(MachineState *ms)
{
TCGState *s = TCG_STATE(current_machine->accelerator);
TCGState *s = TCG_STATE(current_accel());
tcg_exec_init(s->tb_size * 1024 * 1024);
cpu_interrupt_handler = tcg_handle_interrupt;