Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emulate Intel Silicon Debug MSR (fixes OpenBSD guests) #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adaugherity
Copy link
Contributor

OpenBSD since 6.1 reads this register and attempts to disable the debug interface if enabled. Ref: openbsd/src@61bf105

Returning 0 will satifsy OpenBSD guests that this feature is disabled and allow running xhyve without -w.

This might also need to be upstreamed to bhyve, as I found a similar report for it (and workaround with -w): https://marc.info/?t=149136054700003&r=1&w=2
A reply to that thread indicated the hardenedbsd fork fixed it via returning a "locked and disabled" value in that MSR, but that doesn't seem to have made it into FreeBSD bhyve. Also, in my testing simply returning 0 (disabled) is sufficient.

This only affects certain host CPUs (those with the SDBG CPU ID bit, which bhyve/xhyve pass through), but they're apparently common among recent-ish Macs. An alternative solution would be to mask off that CPU ID bit, but this seemed like a simpler solution.

OpenBSD since 6.1 reads this register and attempts to disable the debug
interface if enabled.  Ref: openbsd/src@61bf105

Returning 0 will satifsy OpenBSD guests that this feature is disabled
and allow running xhyve without '-w'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant