Lines Matching full:apic
74 * APIC register page. The layout matches the register layout seen by
113 int kvm_apic_local_deliver(struct kvm_lapic *apic, int lvt_type);
120 void kvm_apic_send_ipi(struct kvm_lapic *apic, u32 icr_low, u32 icr_high);
139 int kvm_x2apic_icr_write(struct kvm_lapic *apic, u64 data);
149 u64 kvm_lapic_readable_reg_mask(struct kvm_lapic *apic);
164 static inline void kvm_lapic_set_irr(int vec, struct kvm_lapic *apic) in kvm_lapic_set_irr() argument
166 kvm_lapic_set_vector(vec, apic->regs + APIC_IRR); in kvm_lapic_set_irr()
171 apic->irr_pending = true; in kvm_lapic_set_irr()
179 static inline u32 kvm_lapic_get_reg(struct kvm_lapic *apic, int reg_off) in kvm_lapic_get_reg() argument
181 return __kvm_lapic_get_reg(apic->regs, reg_off); in kvm_lapic_get_reg()
189 return vcpu->arch.apic; in lapic_in_kernel()
195 static inline bool kvm_apic_hw_enabled(struct kvm_lapic *apic) in kvm_apic_hw_enabled() argument
198 return apic->vcpu->arch.apic_base & MSR_IA32_APICBASE_ENABLE; in kvm_apic_hw_enabled()
204 static inline bool kvm_apic_sw_enabled(struct kvm_lapic *apic) in kvm_apic_sw_enabled() argument
207 return apic->sw_enabled; in kvm_apic_sw_enabled()
213 return lapic_in_kernel(vcpu) && kvm_apic_hw_enabled(vcpu->arch.apic); in kvm_apic_present()
218 return kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic); in kvm_lapic_enabled()
221 static inline int apic_x2apic_mode(struct kvm_lapic *apic) in apic_x2apic_mode() argument
223 return apic->vcpu->arch.apic_base & X2APIC_ENABLE; in apic_x2apic_mode()
228 return lapic_in_kernel(vcpu) && vcpu->arch.apic->apicv_active; in kvm_vcpu_apicv_active()
233 return lapic_in_kernel(vcpu) && vcpu->arch.apic->pending_events; in kvm_apic_has_pending_init_or_sipi()
250 return lapic_in_kernel(vcpu) && test_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events); in kvm_lapic_latched_init()
276 static inline u8 kvm_xapic_id(struct kvm_lapic *apic) in kvm_xapic_id() argument
278 return kvm_lapic_get_reg(apic, APIC_ID) >> 24; in kvm_xapic_id()