Lines Matching refs:pi_desc
850 struct pi_desc *pi_desc; member
879 struct pi_desc { struct
901 static bool pi_test_and_set_on(struct pi_desc *pi_desc) in pi_test_and_set_on() argument
904 (unsigned long *)&pi_desc->control); in pi_test_and_set_on()
907 static bool pi_test_and_clear_on(struct pi_desc *pi_desc) in pi_test_and_clear_on() argument
910 (unsigned long *)&pi_desc->control); in pi_test_and_clear_on()
913 static int pi_test_and_set_pir(int vector, struct pi_desc *pi_desc) in pi_test_and_set_pir() argument
915 return test_and_set_bit(vector, (unsigned long *)pi_desc->pir); in pi_test_and_set_pir()
918 static inline void pi_clear_sn(struct pi_desc *pi_desc) in pi_clear_sn() argument
921 (unsigned long *)&pi_desc->control); in pi_clear_sn()
924 static inline void pi_set_sn(struct pi_desc *pi_desc) in pi_set_sn() argument
927 (unsigned long *)&pi_desc->control); in pi_set_sn()
930 static inline void pi_clear_on(struct pi_desc *pi_desc) in pi_clear_on() argument
933 (unsigned long *)&pi_desc->control); in pi_clear_on()
936 static inline int pi_test_on(struct pi_desc *pi_desc) in pi_test_on() argument
939 (unsigned long *)&pi_desc->control); in pi_test_on()
942 static inline int pi_test_sn(struct pi_desc *pi_desc) in pi_test_sn() argument
945 (unsigned long *)&pi_desc->control); in pi_test_sn()
1014 struct pi_desc pi_desc; member
1067 static struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu) in vcpu_to_pi_desc()
1069 return &(to_vmx(vcpu)->pi_desc); in vcpu_to_pi_desc()
3004 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local
3005 struct pi_desc old, new; in vmx_vcpu_pi_load()
3014 if (!pi_test_sn(pi_desc) && vcpu->cpu == cpu) in vmx_vcpu_pi_load()
3026 if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR || in vmx_vcpu_pi_load()
3028 pi_clear_sn(pi_desc); in vmx_vcpu_pi_load()
3034 old.control = new.control = pi_desc->control; in vmx_vcpu_pi_load()
3044 } while (cmpxchg64(&pi_desc->control, old.control, in vmx_vcpu_pi_load()
3127 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_put() local
3136 pi_set_sn(pi_desc); in vmx_vcpu_pi_put()
6144 if (!vmx->nested.pi_desc || !vmx->nested.pi_pending) in vmx_complete_nested_posted_interrupt()
6148 if (!pi_test_and_clear_on(vmx->nested.pi_desc)) in vmx_complete_nested_posted_interrupt()
6151 max_irr = find_last_bit((unsigned long *)vmx->nested.pi_desc->pir, 256); in vmx_complete_nested_posted_interrupt()
6154 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, in vmx_complete_nested_posted_interrupt()
6270 if (pi_test_and_set_pir(vector, &vmx->pi_desc)) in vmx_deliver_posted_interrupt()
6274 if (pi_test_and_set_on(&vmx->pi_desc)) in vmx_deliver_posted_interrupt()
6607 vmcs_write64(POSTED_INTR_DESC_ADDR, __pa((&vmx->pi_desc))); in vmx_vcpu_setup()
7838 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in wakeup_handler() local
7840 if (pi_test_on(pi_desc) == 1) in wakeup_handler()
8483 vmx->nested.pi_desc = NULL; in free_nested()
10330 if (pi_test_on(&vmx->pi_desc)) { in vmx_sync_pir_to_irr()
10331 pi_clear_on(&vmx->pi_desc); in vmx_sync_pir_to_irr()
10338 kvm_apic_update_irr(vcpu, vmx->pi_desc.pir, &max_irr); in vmx_sync_pir_to_irr()
10384 pi_clear_on(&vmx->pi_desc); in vmx_apicv_post_state_restore()
10385 memset(vmx->pi_desc.pir, 0, sizeof(vmx->pi_desc.pir)); in vmx_apicv_post_state_restore()
11074 vmx->pi_desc.nv = POSTED_INTR_VECTOR; in vmx_create_vcpu()
11075 vmx->pi_desc.sn = 1; in vmx_create_vcpu()
11467 vmx->nested.pi_desc = kmap(vmx->nested.pi_desc_page); in nested_get_vmcs12_pages()
11468 vmx->nested.pi_desc = in nested_get_vmcs12_pages()
11469 (struct pi_desc *)((void *)vmx->nested.pi_desc + in nested_get_vmcs12_pages()
13367 vmx->nested.pi_desc = NULL; in nested_vmx_vmexit()
13624 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in __pi_post_block() local
13625 struct pi_desc old, new; in __pi_post_block()
13629 old.control = new.control = pi_desc->control; in __pi_post_block()
13642 } while (cmpxchg64(&pi_desc->control, old.control, in __pi_post_block()
13669 struct pi_desc old, new; in pi_pre_block()
13670 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in pi_pre_block() local
13689 old.control = new.control = pi_desc->control; in pi_pre_block()
13691 WARN((pi_desc->sn == 1), in pi_pre_block()
13712 } while (cmpxchg64(&pi_desc->control, old.control, in pi_pre_block()
13716 if (pi_test_on(pi_desc) == 1) in pi_pre_block()