Skip to content

ps2: misc controller fixes - #1223

Merged
iximeow merged 2 commits into
masterfrom
ixi/ps2-fixes
Sep 30, 2026
Merged

iximeow merged 2 commits into
masterfrom
ixi/ps2-fixes

Conversation

@iximeow

@iximeow iximeow commented Sep 30, 2026

Copy link
Copy Markdown
Member

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".

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..
@iximeow iximeow added the bug Something that isn't working. label Sep 30, 2026
@iximeow

iximeow commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

"running live migration protocol: failed to migrate device state: could not deserialize device state: Expected an array of length 31 but found 30 elements instead"

... 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.

@iximeow
iximeow merged commit 1caf33f into master Sep 30, 2026
13 of 14 checks passed
@iximeow
iximeow deleted the ixi/ps2-fixes branch September 30, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something that isn't working.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants