| /kernel/linux/linux-5.10/arch/x86/kvm/ |
| D | lapic.c | 4 * Local APIC virtualization 78 struct kvm_lapic *apic = vcpu->arch.apic; in kvm_apic_pending_eoi() local 80 return apic_test_vector(vector, apic->regs + APIC_ISR) || in kvm_apic_pending_eoi() 81 apic_test_vector(vector, apic->regs + APIC_IRR); in kvm_apic_pending_eoi() 97 static inline int apic_enabled(struct kvm_lapic *apic) in apic_enabled() argument 99 return kvm_apic_sw_enabled(apic) && kvm_apic_hw_enabled(apic); in apic_enabled() 109 static inline u32 kvm_x2apic_id(struct kvm_lapic *apic) in kvm_x2apic_id() argument 111 return apic->vcpu->vcpu_id; in kvm_x2apic_id() 199 * (if clean) or the APIC registers (if dirty). in kvm_recalculate_apic_map() 210 max_id = max(max_id, kvm_x2apic_id(vcpu->arch.apic)); in kvm_recalculate_apic_map() [all …]
|
| D | lapic.h | 58 * APIC register page. The layout matches the register layout seen by 86 int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val); 87 int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len, 98 int kvm_apic_local_deliver(struct kvm_lapic *apic, int lvt_type); 103 void kvm_apic_send_ipi(struct kvm_lapic *apic, u32 icr_low, u32 icr_high); 150 static inline void kvm_lapic_set_irr(int vec, struct kvm_lapic *apic) in kvm_lapic_set_irr() argument 152 kvm_lapic_set_vector(vec, apic->regs + APIC_IRR); in kvm_lapic_set_irr() 157 apic->irr_pending = true; in kvm_lapic_set_irr() 160 static inline u32 kvm_lapic_get_reg(struct kvm_lapic *apic, int reg_off) in kvm_lapic_get_reg() argument 162 return *((u32 *) (apic->regs + reg_off)); in kvm_lapic_get_reg() [all …]
|
| /kernel/linux/linux-6.6/arch/x86/kvm/ |
| D | lapic.c | 4 * Local APIC virtualization 69 static int kvm_lapic_msr_read(struct kvm_lapic *apic, u32 reg, u64 *data); 70 static int kvm_lapic_msr_write(struct kvm_lapic *apic, u32 reg, u64 data); 77 static inline void kvm_lapic_set_reg(struct kvm_lapic *apic, int reg_off, u32 val) in kvm_lapic_set_reg() argument 79 __kvm_lapic_set_reg(apic->regs, reg_off, val); in kvm_lapic_set_reg() 88 static __always_inline u64 kvm_lapic_get_reg64(struct kvm_lapic *apic, int reg) in kvm_lapic_get_reg64() argument 90 return __kvm_lapic_get_reg64(apic->regs, reg); in kvm_lapic_get_reg64() 99 static __always_inline void kvm_lapic_set_reg64(struct kvm_lapic *apic, in kvm_lapic_set_reg64() argument 102 __kvm_lapic_set_reg64(apic->regs, reg, val); in kvm_lapic_set_reg64() 112 struct kvm_lapic *apic = vcpu->arch.apic; in kvm_apic_pending_eoi() local [all …]
|
| D | lapic.h | 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() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/apic/ |
| D | probe_32.c | 3 * Default generic APIC driver. This handles up to 8 CPUs. 7 * Generic x86 APIC driver probe layer. 14 #include <asm/apic.h> 28 "Enabling APIC mode: Flat. Using %d I/O APICs\n", in setup_apic_flat_routing() 40 * TPR before enabling an APIC. See e.g. "AP-388 82489DX User's Manual" 64 static struct apic apic_default __ro_after_init = { 116 struct apic *apic __ro_after_init = &apic_default; 117 EXPORT_SYMBOL_GPL(apic); 122 struct apic **drv; in parse_apic() 129 apic = *drv; in parse_apic() [all …]
|
| D | apic.c | 3 * Local APIC handling, local APIC timers 13 * Mikael Pettersson : Power Management for UP-APIC. 49 #include <asm/apic.h> 75 * The highest APIC ID seen during enumeration. 98 * Map cpu index to physical APIC ID 111 * depending on apic in use. The following early percpu variable is 117 /* Local APIC was disabled by the BIOS and enabled by the kernel */ 124 * local APIC. Before entering Symmetric I/O Mode, either 132 /* NMI and 8259 INTR go through APIC */ in imcr_pic_to_apic() 146 * Knob to control our willingness to enable the local APIC. [all …]
|
| D | probe_64.c | 5 * Generic APIC sub-arch probe layer. 12 #include <asm/apic.h> 17 * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. 21 struct apic **drv; in default_setup_apic_routing() 27 if (apic != *drv) { in default_setup_apic_routing() 28 apic = *drv; in default_setup_apic_routing() 29 pr_info("Switched APIC routing to %s.\n", in default_setup_apic_routing() 30 apic->name); in default_setup_apic_routing() 39 struct apic **drv; in default_acpi_madt_oem_check() 43 if (apic != *drv) { in default_acpi_madt_oem_check() [all …]
|
| D | io_apic.c | 3 * Intel IO-APIC support for multi-Pentium hosts. 10 * (c) 1999, Multiple IO-APIC support, developed by 25 * - SiS APIC rmw bug: 67 #include <asm/apic.h> 88 int apic, pin; member 114 /* I/O APIC config */ 116 /* IO APIC gsi routing info */ 195 /* disable IO-APIC */ in parse_noapic() 207 " IRQ %02x, APIC ID %x, APIC INT %02x\n", in mp_save_irq() 267 static inline void io_apic_eoi(unsigned int apic, unsigned int vector) in io_apic_eoi() argument [all …]
|
| D | apic_flat_64.c | 5 * Flat APIC subarch code. 16 #include <asm/apic.h> 20 static struct apic apic_physflat; 21 static struct apic apic_flat; 23 struct apic *apic __ro_after_init = &apic_flat; 24 EXPORT_SYMBOL_GPL(apic); 35 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel 56 __default_send_IPI_dest_field(mask, vector, apic->dest_logical); in _flat_send_IPI_mask() 109 static struct apic apic_flat __ro_after_init = { 164 * Quirk: some x86_64 machines can only use physical APIC mode in physflat_acpi_madt_oem_check() [all …]
|
| D | ipi.c | 37 * The latter is important as the local APIC might be in some in apic_smt_update() 55 apic->send_IPI_allbutself(vector); in apic_send_IPI_allbutself() 57 apic->send_IPI_mask_allbutself(cpu_online_mask, vector); in apic_send_IPI_allbutself() 71 apic->send_IPI(cpu, RESCHEDULE_VECTOR); in native_smp_send_reschedule() 76 apic->send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR); in native_send_call_func_single_ipi() 88 apic->send_IPI_all(CALL_FUNCTION_VECTOR); in native_send_call_func_ipi() 90 apic->send_IPI_allbutself(CALL_FUNCTION_VECTOR); in native_send_call_func_ipi() 95 apic->send_IPI_mask(mask, CALL_FUNCTION_VECTOR); in native_send_call_func_ipi() 118 * to the APIC. in __default_send_IPI_shortcut() 191 * Hack. The clustered APIC addressing mode doesn't allow us to send in default_send_IPI_mask_sequence_phys() [all …]
|
| D | apic_noop.c | 3 * NOOP APIC driver. 5 * Does almost nothing and should be substituted by a real apic driver via 8 * Though in case if apic is disabled (for some reason) we try 9 * to not uglify the caller's code and allow to call (some) apic routines 15 #include <asm/apic.h> 55 * NOOP apic should not ever be in noop_probe() 66 * but since NOOP suppose APIC ID = 0 in noop_apic_id_registered() 90 struct apic apic_noop __ro_after_init = {
|
| /kernel/linux/linux-6.6/arch/x86/kernel/apic/ |
| D | init.c | 2 #define pr_fmt(fmt) "APIC: " fmt 4 #include <asm/apic.h> 15 DEFINE_STATIC_CALL_NULL(apic_call_##__cb, *apic->__cb) 41 apic->__cb = __x86_apic_override.__cb 62 static_call_update(apic_call_##__cb, *apic->__cb) 85 /* Ensure that the default APIC has native_eoi populated */ in apic_setup_apic_calls() 86 apic->native_eoi = apic->eoi; in apic_setup_apic_calls() 91 void __init apic_install_driver(struct apic *driver) in apic_install_driver() 93 if (apic == driver) in apic_install_driver() 96 apic = driver; in apic_install_driver() [all …]
|
| D | apic.c | 3 * Local APIC handling, local APIC timers 13 * Mikael Pettersson : Power Management for UP-APIC. 52 #include <asm/apic.h> 99 * Hypervisor supports 15 bits of APIC ID in MSI Extended Destination ID 112 * Map cpu index to physical APIC ID 120 /* Local APIC was disabled by the BIOS and enabled by the kernel */ 127 * local APIC. Before entering Symmetric I/O Mode, either 133 /* NMI and 8259 INTR go through APIC */ in imcr_pic_to_apic() 145 * Knob to control our willingness to enable the local APIC. 152 * APIC command line parameters [all …]
|
| D | io_apic.c | 3 * Intel IO-APIC support for multi-Pentium hosts. 10 * (c) 1999, Multiple IO-APIC support, developed by 25 * - SiS APIC rmw bug: 67 #include <asm/apic.h> 90 int apic, pin; member 116 /* I/O APIC config */ 118 /* IO APIC gsi routing info */ 197 /* disable IO-APIC */ in parse_noapic() 209 " IRQ %02x, APIC ID %x, APIC INT %02x\n", in mp_save_irq() 269 static inline void io_apic_eoi(unsigned int apic, unsigned int vector) in io_apic_eoi() argument [all …]
|
| D | apic_flat_64.c | 5 * Flat APIC subarch code. 16 #include <asm/apic.h> 20 static struct apic apic_physflat; 21 static struct apic apic_flat; 23 struct apic *apic __ro_after_init = &apic_flat; 24 EXPORT_SYMBOL_GPL(apic); 79 static struct apic apic_flat __ro_after_init = { 126 * Quirk: some x86_64 machines can only use physical APIC mode in physflat_acpi_madt_oem_check() 132 printk(KERN_DEBUG "system APIC only can use physical flat"); in physflat_acpi_madt_oem_check() 137 printk(KERN_DEBUG "IBM Summit detected, will use apic physical"); in physflat_acpi_madt_oem_check() [all …]
|
| D | probe_32.c | 3 * Default generic APIC driver. This handles up to 8 CPUs. 7 * Generic x86 APIC driver probe layer. 16 #include <asm/apic.h> 32 static struct apic apic_default __ro_after_init = { 72 struct apic *apic __ro_after_init = &apic_default; 73 EXPORT_SYMBOL_GPL(apic); 78 struct apic **drv; in parse_apic() 94 early_param("apic", parse_apic); 128 struct apic **drv; in x86_32_probe_apic() 138 panic("Didn't find an APIC driver"); in x86_32_probe_apic()
|
| D | apic_noop.c | 3 * NOOP APIC driver. 5 * Does almost nothing and should be substituted by a real apic driver via 8 * Though in case if apic is disabled (for some reason) we try 9 * to not uglify the caller's code and allow to call (some) apic routines 14 * APIC::read/write() have a WARN_ON_ONCE() in them. Sigh... 19 #include <asm/apic.h> 45 struct apic apic_noop __ro_after_init = {
|
| /kernel/linux/linux-5.10/drivers/iommu/ |
| D | hyperv-iommu.c | 17 #include <asm/apic.h> 29 * According 82093AA IO-APIC spec , IO APIC has a 24-entry Interrupt 30 * Redirection Table. Hyper-V exposes one single IO-APIC and so define 31 * 24 IO APIC remmapping entries. 95 * support interrupt remapping function, setting irq affinity of IO-APIC in hyperv_irq_remapping_alloc() 96 * interrupts still needs to change IO-APIC registers. But ioapic_ in hyperv_irq_remapping_alloc() 98 * dest_apicid when IO-APIC's parent irq domain is not the vector in hyperv_irq_remapping_alloc() 100 * and dest_apicid to IO-APIC register, IO-APIC entry pointer is saved in hyperv_irq_remapping_alloc() 102 * affinity() set vector and dest_apicid directly into IO-APIC entry. in hyperv_irq_remapping_alloc() 107 * Hypver-V IO APIC irq affinity should be in the scope of in hyperv_irq_remapping_alloc() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/include/asm/ |
| D | apic.h | 32 * This can be turned up by using apic=verbose for more 33 * information and apic=debug for _lots_ of information. 34 * apic_verbosity is defined in apic.c 82 * With 82489DX we can't rely on apic feature bit 84 * such an apic chip so we assume that SMP configuration 276 * Generic APIC sub-arch data struct. 282 struct apic { struct 352 * Pointer to the local APIC driver in use on this system (there's 356 extern struct apic *apic; argument 359 * APIC drivers are probed based on how they are listed in the .apicdrivers [all …]
|
| /kernel/linux/linux-6.6/arch/x86/include/asm/ |
| D | apic.h | 34 * This can be turned up by using apic=verbose for more 35 * information and apic=debug for _lots_ of information. 36 * apic_verbosity is defined in apic.c 70 * With 82489DX we can't rely on apic feature bit 72 * such an apic chip so we assume that SMP configuration 252 * Generic APIC sub-arch data struct. 258 struct apic { struct 289 /* The limit of the APIC ID space. */ 332 * Pointer to the local APIC driver in use on this system (there's 336 extern struct apic *apic; [all …]
|
| /kernel/linux/linux-5.10/arch/x86/hyperv/ |
| D | hv_apic.c | 4 * Hyper-V specific APIC code. 31 #include <asm/apic.h> 35 static struct apic orig_apic; 262 orig_apic = *apic; in hv_apic_init() 264 apic->send_IPI = hv_send_ipi; in hv_apic_init() 265 apic->send_IPI_mask = hv_send_ipi_mask; in hv_apic_init() 266 apic->send_IPI_mask_allbutself = hv_send_ipi_mask_allbutself; in hv_apic_init() 267 apic->send_IPI_allbutself = hv_send_ipi_allbutself; in hv_apic_init() 268 apic->send_IPI_all = hv_send_ipi_all; in hv_apic_init() 269 apic->send_IPI_self = hv_send_ipi_self; in hv_apic_init() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/xen/ |
| D | apic.c | 6 #include <asm/apic.h> 16 static unsigned int xen_io_apic_read(unsigned apic, unsigned reg) in xen_io_apic_read() argument 21 apic_op.apic_physbase = mpc_ioapic_addr(apic); in xen_io_apic_read() 31 return apic << 24; in xen_io_apic_read() 56 /* Shouldn't need this as APIC is turned off for PV, and we only in xen_apic_read() 144 static struct apic xen_pv_apic = { 194 if (apic == &xen_pv_apic) in xen_apic_check() 197 pr_info("Switched APIC routing from %s to %s.\n", apic->name, in xen_apic_check() 199 apic = &xen_pv_apic; in xen_apic_check() 204 /* On PV guests the APIC CPUID bit is disabled so none of the in xen_init_apic() [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/interrupt-controller/ |
| D | intel,ce4100-ioapic.yaml | 7 title: Intel I/O Advanced Programmable Interrupt Controller (IO APIC) 13 Intel's Advanced Programmable Interrupt Controller (APIC) is a 14 family of interrupt controllers. The APIC is a split 16 into the processor itself and an external I/O APIC. Local APIC 18 from internal sources and from an external I/O APIC (ioapic). 26 This schema defines bindings for I/O APIC interrupt controller.
|
| /kernel/linux/linux-6.6/drivers/iommu/ |
| D | hyperv-iommu.c | 17 #include <asm/apic.h> 30 * According 82093AA IO-APIC spec , IO APIC has a 24-entry Interrupt 31 * Redirection Table. Hyper-V exposes one single IO-APIC and so define 32 * 24 IO APIC remmapping entries. 89 * Hypver-V IO APIC irq affinity should be in the scope of in hyperv_irq_remapping_alloc() 107 /* Claim the only I/O APIC emulated by Hyper-V */ in hyperv_irq_remapping_select() 159 * IO-APIC and so IO-APIC only accepts 8-bit APIC ID. in hyperv_prepare_irq_remapping() 160 * Cpu's APIC ID is read from ACPI MADT table and APIC IDs in hyperv_prepare_irq_remapping() 162 * APIC ID reflects cpu topology. There maybe some APIC ID in hyperv_prepare_irq_remapping() 165 * into ioapic_max_cpumask if its APIC ID is less than 256. in hyperv_prepare_irq_remapping()
|
| /kernel/linux/linux-5.10/arch/x86/kvm/svm/ |
| D | avic.c | 41 * 0xff is broadcast, so the max index allowed for physical APIC ID 42 * table is 0xfe. APIC IDs above 0xff are reserved. 155 /* Allocating physical APIC ID table (4KB) */ in avic_vm_init() 162 /* Allocating logical APIC ID table (4KB) */ in avic_vm_init() 270 if (!svm->vcpu.arch.apic->regs) in avic_init_backing_page() 281 svm->avic_backing_page = virt_to_page(svm->vcpu.arch.apic->regs); in avic_init_backing_page() 283 /* Setting AVIC backing page address in the phy APIC ID table */ in avic_init_backing_page() 304 struct kvm_lapic *apic = svm->vcpu.arch.apic; in avic_incomplete_ipi_interception() local 317 * field of the ICRL. Logical and physical APIC ID in avic_incomplete_ipi_interception() 321 kvm_lapic_reg_write(apic, APIC_ICR2, icrh); in avic_incomplete_ipi_interception() [all …]
|