mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00

Move the generic cpu_synchronize_ functions to the common hw_accel.h header, in order to prepare for the addition of a second hardware accelerator. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Message-Id: <f5c3cffe8d520011df1c2e5437bb814989b48332.1484045952.git.vpalatin@chromium.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
39 lines
776 B
C
39 lines
776 B
C
/*
|
|
* QEMU Hardware accelertors support
|
|
*
|
|
* Copyright 2016 Google, Inc.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef QEMU_HW_ACCEL_H
|
|
#define QEMU_HW_ACCEL_H
|
|
|
|
#include "qom/cpu.h"
|
|
#include "sysemu/hax.h"
|
|
#include "sysemu/kvm.h"
|
|
|
|
static inline void cpu_synchronize_state(CPUState *cpu)
|
|
{
|
|
if (kvm_enabled()) {
|
|
kvm_cpu_synchronize_state(cpu);
|
|
}
|
|
}
|
|
|
|
static inline void cpu_synchronize_post_reset(CPUState *cpu)
|
|
{
|
|
if (kvm_enabled()) {
|
|
kvm_cpu_synchronize_post_reset(cpu);
|
|
}
|
|
}
|
|
|
|
static inline void cpu_synchronize_post_init(CPUState *cpu)
|
|
{
|
|
if (kvm_enabled()) {
|
|
kvm_cpu_synchronize_post_init(cpu);
|
|
}
|
|
}
|
|
|
|
#endif /* QEMU_HW_ACCEL_H */
|