Lines Matching refs:pi_desc

32 static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu)  in vcpu_to_pi_desc()
34 return &(to_vmx(vcpu)->pi_desc); in vcpu_to_pi_desc()
37 static int pi_try_set_control(struct pi_desc *pi_desc, u64 *pold, u64 new) in pi_try_set_control() argument
45 if (!try_cmpxchg64(&pi_desc->control, pold, new)) in pi_try_set_control()
53 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local
55 struct pi_desc old, new; in vmx_vcpu_pi_load()
72 if (pi_desc->nv != POSTED_INTR_WAKEUP_VECTOR && vcpu->cpu == cpu) { in vmx_vcpu_pi_load()
77 if (pi_test_and_clear_sn(pi_desc)) in vmx_vcpu_pi_load()
89 if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR) { in vmx_vcpu_pi_load()
99 old.control = READ_ONCE(pi_desc->control); in vmx_vcpu_pi_load()
115 } while (pi_try_set_control(pi_desc, &old.control, new.control)); in vmx_vcpu_pi_load()
129 if (!pi_is_pir_empty(pi_desc)) in vmx_vcpu_pi_load()
130 pi_set_on(pi_desc); in vmx_vcpu_pi_load()
146 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in pi_enable_wakeup_handler() local
148 struct pi_desc old, new; in pi_enable_wakeup_handler()
158 WARN(pi_desc->sn, "PI descriptor SN field set before blocking"); in pi_enable_wakeup_handler()
160 old.control = READ_ONCE(pi_desc->control); in pi_enable_wakeup_handler()
165 } while (pi_try_set_control(pi_desc, &old.control, new.control)); in pi_enable_wakeup_handler()
196 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_put() local
210 pi_set_sn(pi_desc); in vmx_vcpu_pi_put()
226 if (pi_test_on(&vmx->pi_desc)) in pi_wakeup_handler()
240 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in pi_has_pending_interrupt() local
242 return pi_test_on(pi_desc) || in pi_has_pending_interrupt()
243 (pi_test_sn(pi_desc) && !pi_is_pir_empty(pi_desc)); in pi_has_pending_interrupt()