master
h 30 lines 769 Bytes
Raw
1 /*
2 * Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
3 *
4 * NetBSD Virtual Machine Monitor (NVMM) accelerator support.
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 /* header to be included in non-NVMM-specific code */
11
12 #ifndef QEMU_NVMM_H
13 #define QEMU_NVMM_H
14
15 #ifdef COMPILING_PER_TARGET
16 # ifdef CONFIG_NVMM
17 # define CONFIG_NVMM_IS_POSSIBLE
18 # endif /* !CONFIG_NVMM */
19 #else
20 # define CONFIG_NVMM_IS_POSSIBLE
21 #endif /* COMPILING_PER_TARGET */
22
23 #ifdef CONFIG_NVMM_IS_POSSIBLE
24 extern bool nvmm_allowed;
25 #define nvmm_enabled() (nvmm_allowed)
26 #else /* !CONFIG_NVMM_IS_POSSIBLE */
27 #define nvmm_enabled() 0
28 #endif /* !CONFIG_NVMM_IS_POSSIBLE */
29
30 #endif /* QEMU_NVMM_H */