Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151819045
D55857.id173698.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55857.id173698.diff
View Options
diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c
--- a/sys/x86/x86/io_apic.c
+++ b/sys/x86/x86/io_apic.c
@@ -269,6 +269,8 @@
mtx_lock_spin(&icu_lock);
if (intpin->io_masked) {
flags = intpin->io_lowreg & ~IOART_INTMASK;
+ if (intpin->io_cpu > IOAPIC_MAX_ID)
+ flags |= IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin),
flags);
intpin->io_masked = 0;
@@ -361,10 +363,18 @@
/*
* Set the destination. Note that with Intel interrupt remapping,
* the previously reserved bits 55:48 now have a purpose so ensure
- * these are zero.
+ * these are zero. If the CPU number (in fact, APIC ID) is too
+ * large, mask the interrupt, and set it to target CPU #0.
*/
- low = IOART_DESTPHY;
- high = intpin->io_cpu << APIC_ID_SHIFT;
+ if (intpin->io_cpu <= IOAPIC_MAX_ID) {
+ low = IOART_DESTPHY;
+ high = intpin->io_cpu << APIC_ID_SHIFT;
+ } else {
+ printf("%s: unsupported destination APIC ID %u\n",
+ __func__, intpin->io_cpu);
+ low = IOART_DESTPHY | IOART_INTMSET;
+ high = 0 << APIC_ID_SHIFT;
+ }
/* Program the rest of the low word. */
if (intpin->io_edgetrigger)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 9:14 PM (1 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29727433
Default Alt Text
D55857.id173698.diff (1 KB)
Attached To
Mode
D55857: io_apic: Don't route to APIC ID > 255
Attached
Detach File
Event Timeline
Log In to Comment