Lines Matching refs:pi_desc

420 	struct pi_desc *pi_desc;  member
457 struct pi_desc { struct
479 static bool pi_test_and_set_on(struct pi_desc *pi_desc) in pi_test_and_set_on() argument
482 (unsigned long *)&pi_desc->control); in pi_test_and_set_on()
485 static bool pi_test_and_clear_on(struct pi_desc *pi_desc) in pi_test_and_clear_on() argument
488 (unsigned long *)&pi_desc->control); in pi_test_and_clear_on()
491 static int pi_test_and_set_pir(int vector, struct pi_desc *pi_desc) in pi_test_and_set_pir() argument
493 return test_and_set_bit(vector, (unsigned long *)pi_desc->pir); in pi_test_and_set_pir()
496 static inline void pi_clear_sn(struct pi_desc *pi_desc) in pi_clear_sn() argument
499 (unsigned long *)&pi_desc->control); in pi_clear_sn()
502 static inline void pi_set_sn(struct pi_desc *pi_desc) in pi_set_sn() argument
505 (unsigned long *)&pi_desc->control); in pi_set_sn()
508 static inline int pi_test_on(struct pi_desc *pi_desc) in pi_test_on() argument
511 (unsigned long *)&pi_desc->control); in pi_test_on()
514 static inline int pi_test_sn(struct pi_desc *pi_desc) in pi_test_sn() argument
517 (unsigned long *)&pi_desc->control); in pi_test_sn()
586 struct pi_desc pi_desc; member
616 static struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu) in vcpu_to_pi_desc()
618 return &(to_vmx(vcpu)->pi_desc); in vcpu_to_pi_desc()
1991 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local
1992 struct pi_desc old, new; in vmx_vcpu_pi_load()
2000 old.control = new.control = pi_desc->control; in vmx_vcpu_pi_load()
2016 if (pi_desc->nv != POSTED_INTR_WAKEUP_VECTOR) { in vmx_vcpu_pi_load()
2032 } while (cmpxchg(&pi_desc->control, old.control, in vmx_vcpu_pi_load()
2099 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_put() local
2107 pi_set_sn(pi_desc); in vmx_vcpu_pi_put()
4505 if (vmx->nested.pi_desc && in vmx_complete_nested_posted_interrupt()
4508 if (!pi_test_and_clear_on(vmx->nested.pi_desc)) in vmx_complete_nested_posted_interrupt()
4512 (unsigned long *)vmx->nested.pi_desc->pir, 256); in vmx_complete_nested_posted_interrupt()
4522 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page); in vmx_complete_nested_posted_interrupt()
4553 WARN_ON_ONCE(pi_test_sn(&vmx->pi_desc)); in kvm_vcpu_trigger_posted_interrupt()
4598 if (pi_test_and_set_pir(vector, &vmx->pi_desc)) in vmx_deliver_posted_interrupt()
4601 r = pi_test_and_set_on(&vmx->pi_desc); in vmx_deliver_posted_interrupt()
4611 if (!pi_test_and_clear_on(&vmx->pi_desc)) in vmx_sync_pir_to_irr()
4614 kvm_apic_update_irr(vcpu, vmx->pi_desc.pir); in vmx_sync_pir_to_irr()
4807 vmcs_write64(POSTED_INTR_DESC_ADDR, __pa((&vmx->pi_desc))); in vmx_vcpu_setup()
4951 memset(&vmx->pi_desc, 0, sizeof(struct pi_desc)); in vmx_vcpu_reset()
6102 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in wakeup_handler() local
6104 if (pi_test_on(pi_desc) == 1) in wakeup_handler()
6885 vmx->nested.pi_desc = NULL; in free_nested()
9117 vmx->nested.pi_desc = in nested_get_vmcs12_pages()
9118 (struct pi_desc *)kmap(vmx->nested.pi_desc_page); in nested_get_vmcs12_pages()
9119 if (!vmx->nested.pi_desc) { in nested_get_vmcs12_pages()
9123 vmx->nested.pi_desc = in nested_get_vmcs12_pages()
9124 (struct pi_desc *)((void *)vmx->nested.pi_desc + in nested_get_vmcs12_pages()
10487 vmx->nested.pi_desc = NULL; in nested_vmx_vmexit()
10597 struct pi_desc old, new; in vmx_pre_block()
10598 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_pre_block() local
10614 old.control = new.control = pi_desc->control; in vmx_pre_block()
10620 if (pi_test_on(pi_desc) == 1) { in vmx_pre_block()
10632 WARN((pi_desc->sn == 1), in vmx_pre_block()
10653 } while (cmpxchg(&pi_desc->control, old.control, in vmx_pre_block()
10661 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_post_block() local
10662 struct pi_desc old, new; in vmx_post_block()
10671 old.control = new.control = pi_desc->control; in vmx_post_block()
10685 } while (cmpxchg(&pi_desc->control, old.control, in vmx_post_block()