Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152541658
D55857.id174410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
920 B
Referenced Files
None
Subscribers
None
D55857.id174410.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
@@ -364,10 +364,20 @@
/*
* 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, mark the interrupt as invalid, and 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;
+ intpin->io_valid = 1;
+ } else {
+ printf("%s: unsupported destination APIC ID %u for pin %u\n",
+ __func__, intpin->io_cpu, intpin->io_intpin);
+ low = IOART_DESTPHY;
+ high = 0 << APIC_ID_SHIFT;
+ intpin->io_valid = 0;
+ }
/* Program the rest of the low word. */
if (intpin->io_edgetrigger)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 2:02 PM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30512080
Default Alt Text
D55857.id174410.diff (920 B)
Attached To
Mode
D55857: io_apic: Don't route to APIC ID > 255
Attached
Detach File
Event Timeline
Log In to Comment