Coverage Report

Created: 2026-11-20 08:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qemu/include/system/hw_accel.h
Line
Count
Source
1
/*
2
 * QEMU Hardware accelerators support
3
 *
4
 * Copyright 2016 Google, Inc.
5
 *
6
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7
 * See the COPYING file in the top-level directory.
8
 *
9
 */
10
11
#ifndef QEMU_HW_ACCEL_H
12
#define QEMU_HW_ACCEL_H
13
14
#include "hw/core/cpu.h"
15
#include "system/kvm.h"
16
#include "system/hvf.h"
17
#include "system/mshv.h"
18
#include "system/whpx.h"
19
#include "system/nvmm.h"
20
#include "system/nitro-accel.h"
21
22
/**
23
 * cpu_synchronize_state:
24
 * cpu_synchronize_pre_loadvm:
25
 * @cpu: The vCPU to synchronize.
26
 *
27
 * Request to synchronize QEMU vCPU registers from the hardware accelerator
28
 * (the hardware accelerator is the reference).
29
 */
30
void cpu_synchronize_state(CPUState *cpu);
31
void cpu_synchronize_pre_loadvm(CPUState *cpu);
32
33
/**
34
 * cpu_synchronize_post_reset:
35
 * cpu_synchronize_post_init:
36
 * @cpu: The vCPU to synchronize.
37
 *
38
 * Request to synchronize QEMU vCPU registers to the hardware accelerator
39
 * (QEMU is the reference).
40
 */
41
void cpu_synchronize_post_reset(CPUState *cpu);
42
void cpu_synchronize_post_init(CPUState *cpu);
43
44
/**
45
 * hwaccel_enabled:
46
 *
47
 * Returns: %true if a hardware accelerator is enabled, %false otherwise.
48
 */
49
static inline bool hwaccel_enabled(void)
50
0
{
51
0
    return hvf_enabled()
52
0
        || kvm_enabled()
53
0
        || nvmm_enabled()
54
0
        || whpx_enabled();
55
0
}
Unexecuted instantiation: cpu-common.c:hwaccel_enabled
Unexecuted instantiation: hmp-cmds.c:hwaccel_enabled
Unexecuted instantiation: cpu-system.c:hwaccel_enabled
Unexecuted instantiation: machine-qmp-cmds.c:hwaccel_enabled
Unexecuted instantiation: cpus.c:hwaccel_enabled
Unexecuted instantiation: physmem.c:hwaccel_enabled
Unexecuted instantiation: gdbstub.c:hwaccel_enabled
Unexecuted instantiation: cpu-apic.c:hwaccel_enabled
Unexecuted instantiation: kvm.c:hwaccel_enabled
Unexecuted instantiation: vapic.c:hwaccel_enabled
Unexecuted instantiation: vmport.c:hwaccel_enabled
Unexecuted instantiation: sgx.c:hwaccel_enabled
Unexecuted instantiation: clock.c:hwaccel_enabled
Unexecuted instantiation: apic.c:hwaccel_enabled
Unexecuted instantiation: helper.c:hwaccel_enabled
Unexecuted instantiation: kvm-all.c:hwaccel_enabled
56
57
#endif /* QEMU_HW_ACCEL_H */