From 6f0a7016d3a777e3064e53034fe005e0fe11dd13 Mon Sep 17 00:00:00 2001 From: Liang Yi Date: Tue, 2 Mar 2021 17:25:53 +0800 Subject: [PATCH] hv/mod_irq: move IPI declarations out of x86/irq.h They are moved into the new header file x86/notify.h. Tracked-On: #5825 Signed-off-by: Jason Chen CJ --- hypervisor/include/arch/x86/irq.h | 14 -------------- hypervisor/include/arch/x86/notify.h | 23 +++++++++++++++++++++++ hypervisor/include/arch/x86/per_cpu.h | 1 + 3 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 hypervisor/include/arch/x86/notify.h diff --git a/hypervisor/include/arch/x86/irq.h b/hypervisor/include/arch/x86/irq.h index bf74e1dc7..bce1a0cdc 100644 --- a/hypervisor/include/arch/x86/irq.h +++ b/hypervisor/include/arch/x86/irq.h @@ -96,20 +96,6 @@ struct x86_irq_data { struct intr_excp_ctx; -struct acrn_vm; - -typedef void (*smp_call_func_t)(void *data); -struct smp_call_info_data { - smp_call_func_t func; - void *data; -}; - -void smp_call_function(uint64_t mask, smp_call_func_t func, void *data); -bool is_notification_nmi(const struct acrn_vm *vm); - -void setup_notification(void); -void setup_pi_notification(void); - /** * @brief Allocate a vectror and bind it to irq * diff --git a/hypervisor/include/arch/x86/notify.h b/hypervisor/include/arch/x86/notify.h new file mode 100644 index 000000000..0aede50e1 --- /dev/null +++ b/hypervisor/include/arch/x86/notify.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2020 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef NOTIFY_H +#define NOTIFY_H + +typedef void (*smp_call_func_t)(void *data); +struct smp_call_info_data { + smp_call_func_t func; + void *data; +}; + +struct acrn_vm; +void smp_call_function(uint64_t mask, smp_call_func_t func, void *data); +bool is_notification_nmi(const struct acrn_vm *vm); + +void setup_notification(void); +void setup_pi_notification(void); + +#endif diff --git a/hypervisor/include/arch/x86/per_cpu.h b/hypervisor/include/arch/x86/per_cpu.h index 3abf117ab..1a138bacf 100644 --- a/hypervisor/include/arch/x86/per_cpu.h +++ b/hypervisor/include/arch/x86/per_cpu.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include