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

Set CR4[18] OSXSAVE in cr4_guest_host_mask #135

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

Conversation

clydergriffin
Copy link

Set CR4[18] OSXSAVE in cr4_guest_host_mask

During boot Windows 11 as a guest VM was
faulting on XSETBV instruction because
CR4[18] OSXSAVE was not set. (XSETBEV is
undefined if CR4[18] OSXSAVE is not set.)

This patch sets cr4_guest_host_mask[18]
causing the the corresponding cr4 shadow
register to virtualize the state of
CR4[18].  This results in a more robust
CR4 implementation and removes the chance
of CR4[18] OSXSAVE corruption.

During boot Windows 11 as a guest VM was
faulting on XSETBV instruction because
CR4[18] OSXSAVE was not set. (XSETBEV is
undefined if CR4[18] OSXSAVE is not set.)

This patch sets cr4_guest_host_mask[18]
causing the the corresponding cr4 shadow
register to virtualize the state of
CR4[18].  This results in a more robust
CR4 implementation and removes the chance
of CR4[18] OSXSAVE corruption.
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