/kernel/linux/linux-6.6/arch/x86/kvm/vmx/ |
H A D | posted_intr.h | 11 struct pi_desc { struct 33 static inline bool pi_test_and_set_on(struct pi_desc *pi_desc) in pi_test_and_set_on() argument 36 (unsigned long *)&pi_desc->control); in pi_test_and_set_on() 39 static inline bool pi_test_and_clear_on(struct pi_desc *pi_desc) in pi_test_and_clear_on() argument 42 (unsigned long *)&pi_desc->control); in pi_test_and_clear_on() 45 static inline bool pi_test_and_clear_sn(struct pi_desc *pi_desc) in pi_test_and_clear_sn() argument 48 (unsigned long *)&pi_desc in pi_test_and_clear_sn() 51 pi_test_and_set_pir(int vector, struct pi_desc *pi_desc) pi_test_and_set_pir() argument 56 pi_is_pir_empty(struct pi_desc *pi_desc) pi_is_pir_empty() argument 61 pi_set_sn(struct pi_desc *pi_desc) pi_set_sn() argument 67 pi_set_on(struct pi_desc *pi_desc) pi_set_on() argument 73 pi_clear_on(struct pi_desc *pi_desc) pi_clear_on() argument 79 pi_clear_sn(struct pi_desc *pi_desc) pi_clear_sn() argument 85 pi_test_on(struct pi_desc *pi_desc) pi_test_on() argument 91 pi_test_sn(struct pi_desc *pi_desc) pi_test_sn() argument [all...] |
H A D | posted_intr.c | 34 static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu) in vcpu_to_pi_desc() 36 return &(to_vmx(vcpu)->pi_desc); in vcpu_to_pi_desc() 39 static int pi_try_set_control(struct pi_desc *pi_desc, u64 *pold, u64 new) in pi_try_set_control() argument 47 if (!try_cmpxchg64(&pi_desc->control, pold, new)) in pi_try_set_control() 55 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local 57 struct pi_desc old, new; in vmx_vcpu_pi_load() 74 if (pi_desc->nv != POSTED_INTR_WAKEUP_VECTOR && vcpu->cpu == cpu) { in vmx_vcpu_pi_load() 79 if (pi_test_and_clear_sn(pi_desc)) in vmx_vcpu_pi_load() 148 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); pi_enable_wakeup_handler() local 198 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); vmx_vcpu_pi_put() local 242 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); pi_has_pending_interrupt() local [all...] |
H A D | vmx.h | 206 struct pi_desc *pi_desc; member 321 struct pi_desc pi_desc; member
|
H A D | nested.c | 330 vmx->nested.pi_desc = NULL; in free_nested() 3256 vmx->nested.pi_desc = in nested_get_vmcs12_pages() 3257 (struct pi_desc *)(((void *)map->hva) + in nested_get_vmcs12_pages() 3268 vmx->nested.pi_desc = NULL; in nested_get_vmcs12_pages() 3825 if (!vmx->nested.pi_desc) in vmx_complete_nested_posted_interrupt() 3830 if (!pi_test_and_clear_on(vmx->nested.pi_desc)) in vmx_complete_nested_posted_interrupt() 3833 max_irr = find_last_bit((unsigned long *)vmx->nested.pi_desc->pir, 256); in vmx_complete_nested_posted_interrupt() 3839 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, in vmx_complete_nested_posted_interrupt() 4844 vmx->nested.pi_desc = NULL; in nested_vmx_vmexit()
|
H A D | vmx.c | 4262 if (pi_test_and_set_pir(vector, &vmx->pi_desc)) in vmx_deliver_posted_interrupt() 4266 if (pi_test_and_set_on(&vmx->pi_desc)) in vmx_deliver_posted_interrupt() 4746 vmcs_write64(POSTED_INTR_DESC_ADDR, __pa((&vmx->pi_desc))); in init_vmcs() 4851 * Enforce invariant: pi_desc.nv is always either POSTED_INTR_VECTOR in __vmx_vcpu_reset() 4854 vmx->pi_desc.nv = POSTED_INTR_VECTOR; in __vmx_vcpu_reset() 4855 vmx->pi_desc.sn = 1; in __vmx_vcpu_reset() 6876 if (pi_test_on(&vmx->pi_desc)) { in vmx_sync_pir_to_irr() 6877 pi_clear_on(&vmx->pi_desc); in vmx_sync_pir_to_irr() 6884 kvm_apic_update_irr(vcpu, vmx->pi_desc.pir, &max_irr); in vmx_sync_pir_to_irr() 6928 pi_clear_on(&vmx->pi_desc); in vmx_apicv_pre_state_restore() [all...] |
/kernel/linux/linux-5.10/arch/x86/kvm/vmx/ |
H A D | posted_intr.h | 9 struct pi_desc { struct 31 static inline bool pi_test_and_set_on(struct pi_desc *pi_desc) in pi_test_and_set_on() argument 34 (unsigned long *)&pi_desc->control); in pi_test_and_set_on() 37 static inline bool pi_test_and_clear_on(struct pi_desc *pi_desc) in pi_test_and_clear_on() argument 40 (unsigned long *)&pi_desc->control); in pi_test_and_clear_on() 43 static inline int pi_test_and_set_pir(int vector, struct pi_desc *pi_desc) in pi_test_and_set_pir() argument 45 return test_and_set_bit(vector, (unsigned long *)pi_desc in pi_test_and_set_pir() 48 pi_is_pir_empty(struct pi_desc *pi_desc) pi_is_pir_empty() argument 53 pi_set_sn(struct pi_desc *pi_desc) pi_set_sn() argument 59 pi_set_on(struct pi_desc *pi_desc) pi_set_on() argument 65 pi_clear_on(struct pi_desc *pi_desc) pi_clear_on() argument 71 pi_clear_sn(struct pi_desc *pi_desc) pi_clear_sn() argument 77 pi_test_on(struct pi_desc *pi_desc) pi_test_on() argument 83 pi_test_sn(struct pi_desc *pi_desc) pi_test_sn() argument [all...] |
H A D | posted_intr.c | 20 static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu) in vcpu_to_pi_desc() 22 return &(to_vmx(vcpu)->pi_desc); in vcpu_to_pi_desc() 27 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); in vmx_vcpu_pi_load() local 28 struct pi_desc old, new; in vmx_vcpu_pi_load() 37 if (!pi_test_sn(pi_desc) && vcpu->cpu == cpu) in vmx_vcpu_pi_load() 47 if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR || vcpu->cpu == cpu) { in vmx_vcpu_pi_load() 48 pi_clear_sn(pi_desc); in vmx_vcpu_pi_load() 54 old.control = new.control = pi_desc->control; in vmx_vcpu_pi_load() 64 } while (cmpxchg64(&pi_desc in vmx_vcpu_pi_load() 90 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); vmx_vcpu_pi_put() local 102 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); __pi_post_block() local 148 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); pi_pre_block() local 221 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); pi_wakeup_handler() local 237 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); pi_has_pending_interrupt() local [all...] |
H A D | vmx.h | 170 struct pi_desc *pi_desc; member 274 struct pi_desc pi_desc; member
|
H A D | nested.c | 313 vmx->nested.pi_desc = NULL; in free_nested() 3227 vmx->nested.pi_desc = in nested_get_vmcs12_pages() 3228 (struct pi_desc *)(((void *)map->hva) + in nested_get_vmcs12_pages() 3763 if (!vmx->nested.pi_desc || !vmx->nested.pi_pending) in vmx_complete_nested_posted_interrupt() 3767 if (!pi_test_and_clear_on(vmx->nested.pi_desc)) in vmx_complete_nested_posted_interrupt() 3770 max_irr = find_last_bit((unsigned long *)vmx->nested.pi_desc->pir, 256); in vmx_complete_nested_posted_interrupt() 3776 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, in vmx_complete_nested_posted_interrupt() 4598 vmx->nested.pi_desc = NULL; in nested_vmx_vmexit()
|
H A D | vmx.c | 4119 if (pi_test_and_set_pir(vector, &vmx->pi_desc)) in vmx_deliver_posted_interrupt() 4123 if (pi_test_and_set_on(&vmx->pi_desc)) in vmx_deliver_posted_interrupt() 4446 vmcs_write64(POSTED_INTR_DESC_ADDR, __pa((&vmx->pi_desc))); in init_vmcs() 6454 if (pi_test_on(&vmx->pi_desc)) { in vmx_sync_pir_to_irr() 6455 pi_clear_on(&vmx->pi_desc); in vmx_sync_pir_to_irr() 6462 kvm_apic_update_irr(vcpu, vmx->pi_desc.pir, &max_irr); in vmx_sync_pir_to_irr() 6495 pi_clear_on(&vmx->pi_desc); in vmx_apicv_post_state_restore() 6496 memset(vmx->pi_desc.pir, 0, sizeof(vmx->pi_desc.pir)); in vmx_apicv_post_state_restore() 7126 * Enforce invariant: pi_desc in vmx_create_vcpu() [all...] |