Page MenuHomeFreeBSD

D41618.id126597.diff
No OneTemporary

D41618.id126597.diff

Index: sys/x86/x86/mp_x86.c
===================================================================
--- sys/x86/x86/mp_x86.c
+++ sys/x86/x86/mp_x86.c
@@ -153,6 +153,10 @@
&hyperthreading_intr_allowed, 0,
"Allow interrupts on HTT logical CPUs");
+static int apic_id_limit = 0;
+SYSCTL_INT(_machdep, OID_AUTO, apic_id_limit, CTLFLAG_RDTUN,
+ &apic_id_limit, 0, "Maximum permitted APIC ID");
+
static struct topo_node topo_root;
static int pkg_id_shift;
@@ -258,6 +262,10 @@
if ((amd_feature2 & AMDID2_CMP) == 0)
return;
+ /* XXX Lack of an AMD IOMMU driver prevents use of APIC IDs over 255. */
+ if (apic_id_limit == 0)
+ apic_id_limit = 255;
+
/* For families 10h and newer. */
pkg_id_shift = (cpu_procinfo2 & AMDID_COREID_SIZE) >>
AMDID_COREID_SIZE_SHIFT;
@@ -1165,6 +1173,8 @@
continue;
if (cpu_info[apic_id].cpu_disabled)
continue;
+ if (apic_id_limit > 0 && apic_id > apic_id_limit)
+ continue;
/* Don't let hyperthreads service interrupts. */
if (cpu_info[apic_id].cpu_hyperthread &&

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 29, 10:06 PM (3 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27368611
Default Alt Text
D41618.id126597.diff (1 KB)

Event Timeline