| 1 | /* |
| 2 | * QEMU Windows Hypervisor Platform accelerator (WHPX) support |
| 3 | * |
| 4 | * Copyright Microsoft, Corp. 2017 |
| 5 | * |
| 6 | * Authors: |
| 7 | * |
| 8 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 9 | * See the COPYING file in the top-level directory. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | /* header to be included in non-WHPX-specific code */ |
| 14 | |
| 15 | #ifndef QEMU_WHPX_H |
| 16 | #define QEMU_WHPX_H |
| 17 | |
| 18 | #ifdef COMPILING_PER_TARGET |
| 19 | # ifdef CONFIG_WHPX |
| 20 | # define CONFIG_WHPX_IS_POSSIBLE |
| 21 | # endif /* !CONFIG_WHPX */ |
| 22 | #else |
| 23 | # define CONFIG_WHPX_IS_POSSIBLE |
| 24 | #endif /* COMPILING_PER_TARGET */ |
| 25 | |
| 26 | #ifdef CONFIG_WHPX_IS_POSSIBLE |
| 27 | extern bool whpx_allowed; |
| 28 | extern bool whpx_irqchip_in_kernel; |
| 29 | #define whpx_enabled() (whpx_allowed) |
| 30 | #define whpx_irqchip_in_kernel() (whpx_irqchip_in_kernel) |
| 31 | #else /* !CONFIG_WHPX_IS_POSSIBLE */ |
| 32 | #define whpx_enabled() 0 |
| 33 | #define whpx_irqchip_in_kernel() (0) |
| 34 | #endif /* !CONFIG_WHPX_IS_POSSIBLE */ |
| 35 | |
| 36 | #endif /* QEMU_WHPX_H */ |