thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-i386-Add-Icelake-Server-v6-CPU-model-with-5-level-EP.patch

60061b
From f2578175ee0e0b0a7a99118e5fdf23ec0ad29ff4 Mon Sep 17 00:00:00 2001
60061b
From: Vitaly Kuznetsov <vkuznets@redhat.com>
60061b
Date: Wed, 16 Mar 2022 09:48:04 +0100
60061b
Subject: [PATCH 02/12] i386: Add Icelake-Server-v6 CPU model with 5-level EPT
60061b
 support
60061b
60061b
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
60061b
RH-MergeRequest: 127: i386: Add Icelake-Server-v6 CPU model with 5-level EPT support
60061b
RH-Commit: [2/2] 72eaf5608490f5b1fb94b6decb95d4092c57dd85
60061b
RH-Bugzilla: 2056986
60061b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
60061b
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
60061b
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
60061b
60061b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2056986
60061b
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43862707
60061b
60061b
commit 12cab535db6440af41ed8dfefe908a594321b6ce
60061b
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
60061b
Date:   Mon Feb 21 15:53:15 2022 +0100
60061b
60061b
    i386: Add Icelake-Server-v6 CPU model with 5-level EPT support
60061b
60061b
    Windows 11 with WSL2 enabled (Hyper-V) fails to boot with Icelake-Server
60061b
    {-v5} CPU model but boots well with '-cpu host'. Apparently, it expects
60061b
    5-level paging and 5-level EPT support to come in pair but QEMU's
60061b
    Icelake-Server CPU model lacks the later. Introduce 'Icelake-Server-v6'
60061b
    CPU model with 'vmx-page-walk-5' enabled by default.
60061b
60061b
    Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
60061b
    Message-Id: <20220221145316.576138-1-vkuznets@redhat.com>
60061b
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
60061b
60061b
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
60061b
---
60061b
 target/i386/cpu.c | 8 ++++++++
60061b
 1 file changed, 8 insertions(+)
60061b
60061b
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
60061b
index aa9e636800..6e25d13339 100644
60061b
--- a/target/i386/cpu.c
60061b
+++ b/target/i386/cpu.c
60061b
@@ -3505,6 +3505,14 @@ static const X86CPUDefinition builtin_x86_defs[] = {
60061b
                     { /* end of list */ }
60061b
                 },
60061b
             },
60061b
+            {
60061b
+                .version = 6,
60061b
+                .note = "5-level EPT",
60061b
+                .props = (PropValue[]) {
60061b
+                    { "vmx-page-walk-5", "on" },
60061b
+                    { /* end of list */ }
60061b
+                },
60061b
+            },
60061b
             { /* end of list */ }
60061b
         }
60061b
     },
60061b
-- 
60061b
2.27.0
60061b