<div dir="ltr"><div dir="ltr">Dear Mr.Eiraku,<br><br>I have run the test to confirm the supposed behaviour without the hypervisor -</div><div dir="ltr">the real hardware generated #GP in this case.<br><br></div><div dir="ltr">On earlier CPUs the bit CR4.CET was reserved (read as 0),</div><div dir="ltr">thus not causing the issue.<br><br>I have added check in do_mov_cr and injection of #GP in case of violation.<br>The issue appears to be fixed.</div><div dir="ltr">Sending patch. </div><div dir="ltr">Could you please review the change?</div><div dir="ltr"><br>--<br>=============<br>Best regards,<br>  Dmitriy</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">вт, 15 июл. 2025 г. в 04:37, Hideki EIRAKU <<a href="mailto:hdk@igel.co.jp">hdk@igel.co.jp</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
> RAX 80040033    RCX 80050033    RDX 00000000    RBX 00000001<br>
<br>
> CR0 80040033    CR2 FFFFCF8381ADD000    CR3 0032C000    CR4 00B50EF8<br>
<br>
The log contains interesting CR0 values.  Only the guest CR0 of CPU8<br>
is 80040033H while the guest CR0 of others are 80050033.  The<br>
different bit 16 is WP bit.  The value is also in RAX, so maybe CR0 is<br>
just set by mov %rax,%cr0 instruction.  Maybe.  I did not know about<br>
the case that recent operating systems clear WP bit.<br>
<br>
Intel(R) 64 and IA-32 Architectures Software Developer's Manual says<br>
the following check is performed during VM Entry, described in "Checks<br>
on Guest Control Registers, Debug Registers, and MSRs" section:<br>
<br>
> If bit 23 in the CR4 field (corresponding to CET) is 1, bit 16 in the CR0 field (WP) must also be 1.<br>
<br>
The bit 23 in the guest CR4 value, 00B50EF8, is 1.  Therefore this<br>
might cause the panic.  BitVisor currently does not handle such case<br>
correctly.  The Intel manual also says the CR0.CET "must be clear<br>
before CR0.WP can be cleared" so the guest behavior looks illegal, but<br>
VMM needs to do something for such illegal case i.e. generating<br>
general protection exception, ignoring the modification, etc. like a<br>
real processor.<br>
<br>
-- <br>
Hideki EIRAKU <<a href="mailto:hdk@igel.co.jp" target="_blank">hdk@igel.co.jp</a>><br>
<br>
From: "A.S." <<a href="mailto:an4smith@gmail.com" target="_blank">an4smith@gmail.com</a>><br>
Subject: [BitVisor-users-en:70] Panic on Windows 11<br>
Date: Tue, 15 Jul 2025 01:07:55 +0300<br>
<br>
> Hi,<br>
> <br>
> I experience Bitvisor panic when trying to startup Windows 11 after loading<br>
> Bitvisor.<br>
> Platform: 12th Gen CPU, Chipset: Q670<br>
> Older hardware and older OS runs fine.<br>
> Logs with panic in attachment.<br>
> Could you please help diagnose and possibly fix the problem?<br>
> <br>
> --<br>
> =========<br>
> Best Regards,<br>
>   Dmitriy</blockquote></div></div>