Skip to contentSkip to conversation

i386: Add Icelake-Server-v6 CPU model with 5-level EPT support

PATCH Applied Vitaly Kuznetsov 2 participants 3 messages Feb 21, 2022 – Feb 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 i386: Add Icelake-Server-v6 CPU model with 5-level EPT support

Windows 11 with WSL2 enabled (Hyper-V) fails to boot with Icelake-Server {-v5} CPU model but boots well with '-cpu host'. Apparently, it expects 5-level paging and 5-level EPT support to come in pair but QEMU's Icelake-Server CPU model lacks the later. Introduce 'Icelake-Server-v6' CPU model with 'vmx-page-walk-5' enabled by default.

---
 target/i386/cpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)
target/i386/cpu.c +8 -0
index aa9e6368004c..6e25d1333971 100644
@@ -3505,6 +3505,14 @@ static const X86CPUDefinition builtin_x86_defs[] = {
                     { /* end of list */ }
                 },
             },
+            {
+                .version = 6,
+                .note = "5-level EPT",
+                .props = (PropValue[]) {
+                    { "vmx-page-walk-5", "on" },
+                    { /* end of list */ }
+                },
+            },
             { /* end of list */ }
         }
     },
Signature · 1 line
2.35.1
#1 lore raw

PATCH 2/2 vmxcap: Add 5-level EPT bit

5-level EPT is present in Icelake Server CPUs and is supported by QEMU ('vmx-page-walk-5').

---
 scripts/kvm/vmxcap | 1 +
 1 file changed, 1 insertion(+)
scripts/kvm/vmxcap +1 -0
index 6fe66d5f5753..f140040104bf 100755
@@ -249,6 +249,7 @@ controls = [
         bits = {
             0: 'Execute-only EPT translations',
             6: 'Page-walk length 4',
+            7: 'Page-walk length 5',
             8: 'Paging-structure memory type UC',
             14: 'Paging-structure memory type WB',
             16: '2MB EPT pages',
Signature · 1 line
2.35.1
#2 lore raw

Re: [PATCH 2/2] vmxcap: Add 5-level EPT bit

Quoted 13 lines · Vitaly Kuznetsov

5-level EPT is present in Icelake Server CPUs and is supported by QEMU ('vmx-page-walk-5').

---
  scripts/kvm/vmxcap | 1 +
  1 file changed, 1 insertion(+)
scripts/kvm/vmxcap +0 -0
index 6fe66d5f5753..f140040104bf 100755

scripts/kvm/vmxcap controls = [ · line 255

Quoted 7 lines
scripts/kvm/vmxcap +1 -0
@@ -249,6 +249,7 @@ controls = [
          bits = {
              0: 'Execute-only EPT translations',
              6: 'Page-walk length 4',
+            7: 'Page-walk length 5',
              8: 'Paging-structure memory type UC',
              14: 'Paging-structure memory type WB',
              16: '2MB EPT pages',

Queued both, thanks.

Paolo