ps2: misc controller fixes - #1223
Merged
Merged
Conversation
practically speaking, no driver ever issues reads or writes against PS/2 I/O ports that are not one byte wide, but if you do we shouldn't panic over it. that is to say, `mdb -KFe '0x60::out -L 2 0'` should not kill Propolis..
trying to use byte 31 of controller RAM would go out of bounds and panic Propolis. additionally, the accessed offset for a multi-part PS/2 controller write was mapped to RAM offsets incorrectly, so such writes would get processed incorrectly. that is to say, `mdb -KFe '0x64::out 0L 1 0x3f'` should not kill Propolis..
Member
Author
... well, it's good that the test caught that, because I would have overlooked the migration incompatibility. good thing we're not live-migrating yet. |
jordanhendricks
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
there are a pair of unfortunate issues in the PS/2 controller, one left the last byte of controller RAM incorrectly modeled (as in, it would panic the hypervisor on use, instead of "work"). the other meant that weird accesses to the controller which.. maybe should work? instead also .. panic the hypervisor. in both cases it's really just "if you are ring 0 you can stop the VM by poking these registers .. or you can go write to 0xcf9 and do a normal power off".