Page MenuHomeFreeBSD

vmm: Synchronize long-mode state when emulating CR0 writes
AcceptedPublic

Authored by hayzam_gmail.com on Thu, Sep 17, 9:16 AM.
Tags
None
Referenced Files
F172346944: D59756.diff
Thu, Sep 17, 9:18 PM
F172316474: D59756.diff
Thu, Sep 17, 4:47 PM
F172308865: D59756.diff
Thu, Sep 17, 3:36 PM
F172298626: D59756.diff
Thu, Sep 17, 1:48 PM
F172275039: D59756.id186954.diff
Thu, Sep 17, 10:13 AM
F172274936: D59756.diff
Thu, Sep 17, 10:12 AM
F172268060: D59756.diff
Thu, Sep 17, 9:21 AM
Subscribers

Details

Reviewers
markj
Group Reviewers
bhyve
Summary

vmx_emulate_cr0_access() sets EFER.LMA and the IA-32e guest VM-entry
control when enabling paging with EFER.LME set, but does not clear them
when disabling paging. This can leave an inconsistent guest state that
fails VM entry.

Update both fields in either direction based on EFER.LME and the CR0
value written to the VMCS. Use the mask-adjusted CR0 value so the
resulting state remains consistent with the VMX fixed-bit requirements.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77015
Build 73898: arc lint + arc unit