|
From: | Xiaoyao Li |
Subject: | Re: [PATCH v1] target/i386: Always set leaf 0x1f |
Date: | Wed, 31 Jul 2024 15:02:15 +0800 |
User-agent: | Mozilla Thunderbird |
On 7/24/2024 6:29 PM, Manish wrote:
Thanks Igor On 24/07/24 2:30 pm, Igor Mammedov wrote:Sorry for earlier response, i do not see blue screen it seems to be falling in uefi back quickly and i do not see any details here. I am attaching image.!-------------------------------------------------------------------| CAUTION: External Email |-------------------------------------------------------------------! On Wed, 24 Jul 2024 07:52:26 +0000 "manish.mishra"<manish.mishra@nutanix.com> wrote:BSOD usually has error code displayed, it would be better to specify it hereFrom: Manish Mishra<manish.mishra@nutanix.com> QEMU does not set 0x1f in case VM does not have extended CPU topology and expects guests to fallback to 0xb. Some versions of Windows does notlike this behavior and expects this leaf to be populated. As a result WindowsVM fails with blue screen.this way whomever searching for the error, can find this patch/commitLeaf 0x1f is superset of 0xb, so it makes sense to set 0x1f equivalent to 0xb by default and workaround windows issue.> This change adds a new property 'cpuid-0x1f-enforce' to set leaf 0x1f equivalent to 0xb incase extended CPU topology is not configured and behave as before otherwise.repeating questionwhy we need to use extra property instead of just adding 0x1f leaf for CPU modelsthat supposed to have it?As i mentioned in earlier response. "Windows expects it only when we have set max cpuid level greater than or equal to 0x1f. I mean if it is exposed it should not be all zeros. SapphireRapids CPU definition raised cpuid level to 0x20, so we starting seeing it with SapphireRapids."Windows does not expect 0x1f to be present for any CPU model. But if it is exposed to the guest, it expects non-zero values.
Please fix Windows!No guarantee from Intel that leaf 0x1f should report non-zero value when max cpuid level >= 0x1f.
Please see SDM.vol2.CPUID chapter. INPUT EAX = 1FH: Returns V2 Extended Topology InformationWhen CPUID executes with EAX set to 1FH, the processor returns information about extended topology enumeration data. Software must detect the presence of CPUID leaf 1FH by verifying (a) the highest leaf index supported by CPUID is >= 1FH, and (b) CPUID.1FH:EBX[15:0] reports a non-zero value. See Table 3-17.
[Prev in Thread] | Current Thread | [Next in Thread] |