Skip to content

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