bhyve PICs should use unsigned levels
Both the AT-PIC and IO-APIC in the bhyve kernel device emulation use signed integers to record the level of their represented interrupt pins. Since a negative level is nonsensical in both cases, they should be updated to use an unsigned value instead.
Updated by Patrick Mooney 5 months ago
The old (signed integer) logic dealing with interrupt pin levels did nothing when those values would overflow/underflow. As part of updating that logic, we should instead emit an error if the value(s) would otherwise exceed the acceptable range. Some dtrace probes, as well as in-memory (mdb accessible) stats would be useful in cases where one wants to observe those potential errors.
Updated by Patrick Mooney 4 months ago
This was tested on the typical battery of guests, with all booting and running as expected. During guest operation, the newly-added statistics were inspected with
mdb -k, showing the IOAPIC (and occasionally ATPIC) interrupt counts rising, but the saturation counts staying zero. A guest was also booted with propolis which also behaved as normal.
Updated by Electric Monk 4 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit c6282d59cf9020f4e180f8297038e65177088092 Author: Patrick Mooney <email@example.com> Date: 2022-01-13T00:42:20.000Z 14260 bhyve PICs should use unsigned levels Reviewed by: Dan Cross <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>