/* * According 82093AA IO-APIC spec , IO APIC has a 24-entry Interrupt * Redirection Table. Hyper-V exposes one single IO-APIC and so define * 24 IO APIC remmapping entries.
*/ #define IOAPIC_REMAPPING_ENTRY 24
/* * Hypver-V IO APIC irq affinity should be in the scope of * ioapic_max_cpumask because no irq remapping support.
*/
irq_data_update_affinity(irq_data, &ioapic_max_cpumask);
/* * For a Hyper-V root partition, ms_hyperv_msi_ext_dest_id() * will always return false.
*/ if (!hypervisor_is_type(X86_HYPER_MS_HYPERV) ||
x86_init.hyper.msi_ext_dest_id()) return -ENODEV;
if (hv_root_partition()) {
name = "HYPERV-ROOT-IR";
ops = &hyperv_root_ir_domain_ops;
} else {
name = "HYPERV-IR";
ops = &hyperv_ir_domain_ops;
}
fn = irq_domain_alloc_named_id_fwnode(name, 0); if (!fn) return -ENOMEM;
if (!ioapic_ir_domain) {
irq_domain_free_fwnode(fn); return -ENOMEM;
}
if (hv_root_partition()) return 0; /* The rest is only relevant to guests */
/* * Hyper-V doesn't provide irq remapping function for * IO-APIC and so IO-APIC only accepts 8-bit APIC ID. * Cpu's APIC ID is read from ACPI MADT table and APIC IDs * in the MADT table on Hyper-v are sorted monotonic increasingly. * APIC ID reflects cpu topology. There maybe some APIC ID * gaps when cpu number in a socket is not power of two. Prepare * max cpu affinity for IOAPIC irqs. Scan cpu 0-255 and set cpu * into ioapic_max_cpumask if its APIC ID is less than 256.
*/ for (i = min_t(unsignedint, nr_cpu_ids - 1, 255); i >= 0; i--) if (cpu_possible(i) && cpu_physical_id(i) < 256)
cpumask_set_cpu(i, &ioapic_max_cpumask);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.