mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 22:31:15 +00:00

Currently nvmm_enabled() is restricted to target-specific code. By defining CONFIG_NVMM_IS_POSSIBLE we allow its use anywhere. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250703173248.44995-25-philmd@linaro.org>
31 lines
769 B
C
31 lines
769 B
C
/*
|
|
* Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
|
|
*
|
|
* NetBSD Virtual Machine Monitor (NVMM) accelerator support.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
/* header to be included in non-NVMM-specific code */
|
|
|
|
#ifndef QEMU_NVMM_H
|
|
#define QEMU_NVMM_H
|
|
|
|
#ifdef COMPILING_PER_TARGET
|
|
# ifdef CONFIG_NVMM
|
|
# define CONFIG_NVMM_IS_POSSIBLE
|
|
# endif /* !CONFIG_NVMM */
|
|
#else
|
|
# define CONFIG_NVMM_IS_POSSIBLE
|
|
#endif /* COMPILING_PER_TARGET */
|
|
|
|
#ifdef CONFIG_NVMM_IS_POSSIBLE
|
|
extern bool nvmm_allowed;
|
|
#define nvmm_enabled() (nvmm_allowed)
|
|
#else /* !CONFIG_NVMM_IS_POSSIBLE */
|
|
#define nvmm_enabled() 0
|
|
#endif /* !CONFIG_NVMM_IS_POSSIBLE */
|
|
|
|
#endif /* QEMU_NVMM_H */
|