Lines Matching refs:hv_cpu
100 struct hv_per_cpu_context *hv_cpu; in hv_synic_alloc() local
108 hv_cpu = per_cpu_ptr(hv_context.cpu_context, cpu); in hv_synic_alloc()
109 memset(hv_cpu, 0, sizeof(*hv_cpu)); in hv_synic_alloc()
120 hv_cpu = per_cpu_ptr(hv_context.cpu_context, cpu); in hv_synic_alloc()
122 tasklet_init(&hv_cpu->msg_dpc, in hv_synic_alloc()
123 vmbus_on_msg_dpc, (unsigned long) hv_cpu); in hv_synic_alloc()
126 hv_cpu->post_msg_page = (void *)get_zeroed_page(GFP_ATOMIC); in hv_synic_alloc()
127 if (hv_cpu->post_msg_page == NULL) { in hv_synic_alloc()
132 ret = set_memory_decrypted((unsigned long)hv_cpu->post_msg_page, 1); in hv_synic_alloc()
136 hv_cpu->post_msg_page = NULL; in hv_synic_alloc()
140 memset(hv_cpu->post_msg_page, 0, PAGE_SIZE); in hv_synic_alloc()
148 hv_cpu->synic_message_page = in hv_synic_alloc()
150 if (hv_cpu->synic_message_page == NULL) { in hv_synic_alloc()
155 hv_cpu->synic_event_page = in hv_synic_alloc()
157 if (hv_cpu->synic_event_page == NULL) { in hv_synic_alloc()
160 free_page((unsigned long)hv_cpu->synic_message_page); in hv_synic_alloc()
161 hv_cpu->synic_message_page = NULL; in hv_synic_alloc()
169 hv_cpu->synic_message_page, 1); in hv_synic_alloc()
172 hv_cpu->synic_message_page = NULL; in hv_synic_alloc()
178 free_page((unsigned long)hv_cpu->synic_event_page); in hv_synic_alloc()
179 hv_cpu->synic_event_page = NULL; in hv_synic_alloc()
184 hv_cpu->synic_event_page, 1); in hv_synic_alloc()
187 hv_cpu->synic_event_page = NULL; in hv_synic_alloc()
191 memset(hv_cpu->synic_message_page, 0, PAGE_SIZE); in hv_synic_alloc()
192 memset(hv_cpu->synic_event_page, 0, PAGE_SIZE); in hv_synic_alloc()
212 struct hv_per_cpu_context *hv_cpu in hv_synic_free() local
217 if (hv_cpu->post_msg_page) { in hv_synic_free()
219 hv_cpu->post_msg_page, 1); in hv_synic_free()
222 hv_cpu->post_msg_page = NULL; in hv_synic_free()
229 if (hv_cpu->synic_message_page) { in hv_synic_free()
231 hv_cpu->synic_message_page, 1); in hv_synic_free()
234 hv_cpu->synic_message_page = NULL; in hv_synic_free()
238 if (hv_cpu->synic_event_page) { in hv_synic_free()
240 hv_cpu->synic_event_page, 1); in hv_synic_free()
243 hv_cpu->synic_event_page = NULL; in hv_synic_free()
248 free_page((unsigned long)hv_cpu->post_msg_page); in hv_synic_free()
249 free_page((unsigned long)hv_cpu->synic_event_page); in hv_synic_free()
250 free_page((unsigned long)hv_cpu->synic_message_page); in hv_synic_free()
265 struct hv_per_cpu_context *hv_cpu in hv_synic_enable_regs() local
280 hv_cpu->synic_message_page in hv_synic_enable_regs()
282 if (!hv_cpu->synic_message_page) in hv_synic_enable_regs()
285 simp.base_simp_gpa = virt_to_phys(hv_cpu->synic_message_page) in hv_synic_enable_regs()
299 hv_cpu->synic_event_page in hv_synic_enable_regs()
301 if (!hv_cpu->synic_event_page) in hv_synic_enable_regs()
304 siefp.base_siefp_gpa = virt_to_phys(hv_cpu->synic_event_page) in hv_synic_enable_regs()
353 struct hv_per_cpu_context *hv_cpu in hv_synic_disable_regs() local
379 iounmap(hv_cpu->synic_message_page); in hv_synic_disable_regs()
380 hv_cpu->synic_message_page = NULL; in hv_synic_disable_regs()
391 iounmap(hv_cpu->synic_event_page); in hv_synic_disable_regs()
392 hv_cpu->synic_event_page = NULL; in hv_synic_disable_regs()
420 struct hv_per_cpu_context *hv_cpu = this_cpu_ptr(hv_context.cpu_context); in hv_synic_event_pending() local
422 (union hv_synic_event_flags *)hv_cpu->synic_event_page + VMBUS_MESSAGE_SINT; in hv_synic_event_pending()