1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /******************************************************************************
3  * arch/x86/guest/hyperv/private.h
4  *
5  * Definitions / declarations only useful to Hyper-V code.
6  *
7  * Copyright (c) 2020 Microsoft.
8  */
9 
10 #ifndef __XEN_HYPERV_PRIVIATE_H__
11 #define __XEN_HYPERV_PRIVIATE_H__
12 
13 #include <xen/cpumask.h>
14 #include <xen/percpu.h>
15 
16 DECLARE_PER_CPU(void *, hv_input_page);
17 DECLARE_PER_CPU(void *, hv_vp_assist);
18 DECLARE_PER_CPU(unsigned int, hv_vp_index);
19 extern unsigned int hv_max_vp_index;
20 
hv_vp_index(unsigned int cpu)21 static inline unsigned int hv_vp_index(unsigned int cpu)
22 {
23     return per_cpu(hv_vp_index, cpu);
24 }
25 
26 int hyperv_flush_tlb(const cpumask_t *mask, const void *va,
27                      unsigned int flags);
28 
29 /* Returns number of banks, -ev if error */
30 int cpumask_to_vpset(struct hv_vpset *vpset, const cpumask_t *mask);
31 
32 #endif /* __XEN_HYPERV_PRIVIATE_H__  */
33