sys/lapic: Preserve I/O APIC redirection entries when masking
diff --git a/common/sys/lapic.c b/common/sys/lapic.c
index 0efc1213..b95d1a95 100644
--- a/common/sys/lapic.c
+++ b/common/sys/lapic.c
@@ -475,8 +475,7 @@ void io_apic_mask_all(bool mask_nmi_and_extint) {
continue;
}
- io_apic_write(i, ioredtbl, (1 << 16)); // mask
- io_apic_write(i, ioredtbl + 1, 0);
+ io_apic_write(i, ioredtbl, io_apic_read(i, ioredtbl) | (1 << 16));
}
}
}
