Lines Matching refs:pi_desc

38 static struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu)  in vcpu_to_pi_desc()
40 return &(to_vt(vcpu)->pi_desc); in vcpu_to_pi_desc()
43 static int pi_try_set_control(struct pi_desc *pi_desc, u64 *pold, u64 new) in pi_try_set_control() argument
51 if (!try_cmpxchg64(&pi_desc->control, pold, new)) in pi_try_set_control()
59 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local
61 struct pi_desc old, new; in vmx_vcpu_pi_load()
79 if (pi_desc->nv != POSTED_INTR_WAKEUP_VECTOR && vcpu->cpu == cpu) { in vmx_vcpu_pi_load()
80 if (pi_test_and_clear_sn(pi_desc)) in vmx_vcpu_pi_load()
92 if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR) { in vmx_vcpu_pi_load()
113 old.control = READ_ONCE(pi_desc->control); in vmx_vcpu_pi_load()
129 } while (pi_try_set_control(pi_desc, &old.control, new.control)); in vmx_vcpu_pi_load()
143 if (!pi_is_pir_empty(pi_desc)) in vmx_vcpu_pi_load()
144 pi_set_on(pi_desc); in vmx_vcpu_pi_load()
164 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in pi_enable_wakeup_handler() local
166 struct pi_desc old, new; in pi_enable_wakeup_handler()
188 WARN(pi_test_sn(pi_desc), "PI descriptor SN field set before blocking"); in pi_enable_wakeup_handler()
190 old.control = READ_ONCE(pi_desc->control); in pi_enable_wakeup_handler()
195 } while (pi_try_set_control(pi_desc, &old.control, new.control)); in pi_enable_wakeup_handler()
225 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_put() local
247 pi_set_sn(pi_desc); in vmx_vcpu_pi_put()
263 if (pi_test_on(&vt->pi_desc)) in pi_wakeup_handler()
277 struct pi_desc *pi = vcpu_to_pi_desc(vcpu); in pi_apicv_pre_state_restore()
285 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in pi_has_pending_interrupt() local
287 return pi_test_on(pi_desc) || in pi_has_pending_interrupt()
288 (pi_test_sn(pi_desc) && !pi_is_pir_empty(pi_desc)); in pi_has_pending_interrupt()