commit | bdc0c4d1c7f847cf0d43ab119a74eba0fa4f8bb7 | [log] [tgz] |
---|---|---|
author | David Greenaway <dgreenaway@google.com> | Fri Dec 03 08:46:10 2021 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 03 08:46:10 2021 +0000 |
tree | c315cab84921c438937b6f58885042fb55ecfd75 | |
parent | 3d6527cb214a1546d632e9d320e6010a0bd0efe5 [diff] |
[vmm] Implement mask/unmask support in IO APIC Our current IO APIC doesn't support masking / unmasking interrupts. Instead, received interrupts will always be immediately forwarded to whatever is configured in their redirect entry. We have mostly gotten away with this imperfect implementation so far: guest kernels sometimes complain about spurious interrupts, but otherwise handle things just fine. More recent Linux kernels however have changed how they perform IO APIC shutdown. During shutdown, each IO APIC redirect register is set to masked, but otherwise zeroed out. If, during shutdown, an interrupt happens to fire, our IO APIC implementation will ignore the mask bit and instead deliver an interrupt to vector 0, which is interpreted by guests as a divide-by-zero exception. http://fxbug.dev/82015 is an example of such a bug. This CL adds support for masking/unmasking interrupts in the IO APIC: * If an IRQ is received while it is unmasked, nothing changes. * If an IRQ is received while it is masked, it is marked as pending. When it is finally unmasked, the current value in the IRQ's redirect register will be used as the destination. Fixed: 82015 Change-Id: I0c3d3b145fb8a025b33d7d169c8022cac2c2bc87 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/613549 Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Fuchsia-Auto-Submit: David Greenaway <dgreenaway@google.com> Reviewed-by: Abdulla Kamar <abdulla@google.com>
Fuchsia an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.