File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg);
37
37
u32 hv_max_vp_index ;
38
38
EXPORT_SYMBOL_GPL (hv_max_vp_index );
39
39
40
+ void * hv_alloc_hyperv_page (void )
41
+ {
42
+ BUILD_BUG_ON (PAGE_SIZE != HV_HYP_PAGE_SIZE );
43
+
44
+ return (void * )__get_free_page (GFP_KERNEL );
45
+ }
46
+ EXPORT_SYMBOL_GPL (hv_alloc_hyperv_page );
47
+
48
+ void hv_free_hyperv_page (unsigned long addr )
49
+ {
50
+ free_page (addr );
51
+ }
52
+ EXPORT_SYMBOL_GPL (hv_free_hyperv_page );
53
+
40
54
static int hv_cpu_init (unsigned int cpu )
41
55
{
42
56
u64 msr_vp_index ;
Original file line number Diff line number Diff line change @@ -218,7 +218,8 @@ static inline struct hv_vp_assist_page *hv_get_vp_assist_page(unsigned int cpu)
218
218
219
219
void __init hyperv_init (void );
220
220
void hyperv_setup_mmu_ops (void );
221
-
221
+ void * hv_alloc_hyperv_page (void );
222
+ void hv_free_hyperv_page (unsigned long addr );
222
223
void hyperv_reenlightenment_intr (struct pt_regs * regs );
223
224
void set_hv_tscchange_cb (void (* cb )(void ));
224
225
void clear_hv_tscchange_cb (void );
@@ -241,6 +242,8 @@ static inline void hv_apic_init(void) {}
241
242
#else /* CONFIG_HYPERV */
242
243
static inline void hyperv_init (void ) {}
243
244
static inline void hyperv_setup_mmu_ops (void ) {}
245
+ static inline void * hv_alloc_hyperv_page (void ) { return NULL ; }
246
+ static inline void hv_free_hyperv_page (unsigned long addr ) {}
244
247
static inline void set_hv_tscchange_cb (void (* cb )(void )) {}
245
248
static inline void clear_hv_tscchange_cb (void ) {}
246
249
static inline void hyperv_stop_tsc_emulation (void ) {};
You can’t perform that action at this time.
0 commit comments