What about CR0.NE, which, like CR4.VMXE, will always be set while running the guest, but which may not be set in the vCPU? On Thu, Apr 27, 2017 at 8:49 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > > On 27/04/2017 17:32, Jim Mattson wrote: >> Also, the allowed/required CR0/CR4 bits may not be the same for the >> vCPU as for the physical hardware, so more than just CR4.VMXE may have >> to be checked. > > I think we can pass on that. For CR0 we know the two cases are > fundamentally unrestricted guest and !unrestricted guest, and they both > are covered (via CR0.PE and EFLAGS.VM respectively). > > For CR4, we also pretty much know the only FIXED1 bit is VMXE, and > FIXED0 bits match the values that are checked by MOV to CR4. > > Paolo