Lines Matching refs:hv
94 struct hv_vcpu *hv; in setup_cpu() local
100 hv = &hv_vcpus[vcpu]; in setup_cpu()
102 hv->msg_page = alloc_page(); in setup_cpu()
103 hv->evt_page = alloc_page(); in setup_cpu()
104 hv->post_msg = alloc_page(); in setup_cpu()
105 if (!hv->msg_page || !hv->evt_page || !hv->post_msg) in setup_cpu()
107 hv->msg_conn = MSG_CONN_BASE + vcpu; in setup_cpu()
108 hv->evt_conn = EVT_CONN_BASE + vcpu; in setup_cpu()
111 (u64)virt_to_phys(hv->msg_page) | HV_SYNIC_SIMP_ENABLE); in setup_cpu()
113 (u64)virt_to_phys(hv->evt_page) | HV_SYNIC_SIEFP_ENABLE); in setup_cpu()
116 msg_conn_create(MSG_SINT, MSG_VEC, hv->msg_conn); in setup_cpu()
117 evt_conn_create(EVT_SINT, EVT_VEC, hv->evt_conn); in setup_cpu()
119 hv->post_msg->connectionid = hv->msg_conn; in setup_cpu()
120 hv->post_msg->message_type = MSG_TYPE; in setup_cpu()
121 hv->post_msg->payload_size = 8; in setup_cpu()
122 hv->post_msg->payload[0] = (u64)vcpu << 16; in setup_cpu()
128 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in teardown_cpu() local
130 evt_conn_destroy(EVT_SINT, hv->evt_conn); in teardown_cpu()
131 msg_conn_destroy(MSG_SINT, hv->msg_conn); in teardown_cpu()
137 free_page(hv->post_msg); in teardown_cpu()
138 free_page(hv->evt_page); in teardown_cpu()
139 free_page(hv->msg_page); in teardown_cpu()
145 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in do_msg() local
146 struct hv_input_post_message *msg = hv->post_msg; in do_msg()
149 atomic_set(&hv->sint_received, 0); in do_msg()
150 hv->hvcall_status = do_hypercall(HVCALL_POST_MESSAGE, in do_msg()
159 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in clear_msg() local
160 struct hv_message *msg = &hv->msg_page->sint_message[MSG_SINT]; in clear_msg()
162 atomic_set(&hv->sint_received, 0); in clear_msg()
171 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in msg_ok() local
172 struct hv_input_post_message *post_msg = hv->post_msg; in msg_ok()
173 struct hv_message *msg = &hv->msg_page->sint_message[MSG_SINT]; in msg_ok()
179 hv->hvcall_status == 0 && in msg_ok()
180 atomic_read(&hv->sint_received) == 1; in msg_ok()
185 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in msg_busy() local
186 struct hv_input_post_message *post_msg = hv->post_msg; in msg_busy()
187 struct hv_message *msg = &hv->msg_page->sint_message[MSG_SINT]; in msg_busy()
193 hv->hvcall_status == 0 && in msg_busy()
194 atomic_read(&hv->sint_received) == 0; in msg_busy()
200 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in do_evt() local
202 atomic_set(&hv->sint_received, 0); in do_evt()
203 hv->hvcall_status = do_hypercall(HVCALL_SIGNAL_EVENT, in do_evt()
204 hv->evt_conn, 1); in do_evt()
212 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in clear_evt() local
213 ulong *flags = hv->evt_page->slot[EVT_SINT].flags; in clear_evt()
215 atomic_set(&hv->sint_received, 0); in clear_evt()
216 flags[BIT_WORD(hv->evt_conn)] &= ~BIT_MASK(hv->evt_conn); in clear_evt()
223 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in evt_ok() local
224 ulong *flags = hv->evt_page->slot[EVT_SINT].flags; in evt_ok()
226 return flags[BIT_WORD(hv->evt_conn)] == BIT_MASK(hv->evt_conn) && in evt_ok()
227 hv->hvcall_status == 0 && in evt_ok()
228 atomic_read(&hv->sint_received) == 1; in evt_ok()
233 struct hv_vcpu *hv = &hv_vcpus[vcpu]; in evt_busy() local
234 ulong *flags = hv->evt_page->slot[EVT_SINT].flags; in evt_busy()
236 return flags[BIT_WORD(hv->evt_conn)] == BIT_MASK(hv->evt_conn) && in evt_busy()
237 hv->hvcall_status == 0 && in evt_busy()
238 atomic_read(&hv->sint_received) == 0; in evt_busy()