thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-target-i386-Add-ARCH_CAPABILITIES-related-bits-into-.patch

ddf19c
From 4c9201a83e3ff48d2a55e45a34eb27966a1e4ab0 Mon Sep 17 00:00:00 2001
ddf19c
From: "plai@redhat.com" <plai@redhat.com>
ddf19c
Date: Fri, 5 Jun 2020 18:37:33 -0400
ddf19c
Subject: [PATCH 3/3] target/i386: Add ARCH_CAPABILITIES related bits into
ddf19c
 Icelake-Server CPU model
ddf19c
MIME-Version: 1.0
ddf19c
Content-Type: text/plain; charset=UTF-8
ddf19c
Content-Transfer-Encoding: 8bit
ddf19c
ddf19c
RH-Author: plai@redhat.com
ddf19c
Message-id: <20200605183733.8269-1-plai@redhat.com>
ddf19c
Patchwork-id: 97380
ddf19c
O-Subject: [RHEL8.2.1 AV qemu-kvm PATCH] target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model
ddf19c
Bugzilla: 1840342
ddf19c
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
ddf19c
RH-Acked-by: Bandan Das <bsd@redhat.com>
ddf19c
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
ddf19c
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
ddf19c
ddf19c
From: Xiaoyao Li <xiaoyao.li@intel.com>
ddf19c
ddf19c
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1840342
ddf19c
Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=28983822
ddf19c
Branch: rhel-av-8.2.1
ddf19c
ddf19c
Tested on HOST: intel-whitley-09.khw1.lab.eng.bos.redhat.com
ddf19c
ddf19c
1. qemu-kvm -cpu host …
ddf19c
        VM guest does have arch_capabilities in cpuinfo/flags.
ddf19c
	[Expected success]
ddf19c
ddf19c
2. qemu-kvm -cpu Icelake-Server …
ddf19c
        VM guest does NOT have arch_capabilities in cpuinfo/flags.
ddf19c
	[Expected failure]
ddf19c
ddf19c
3. qemu-kvm -cpu Icelake-Server-v3 …
ddf19c
        VM guest does have arch_capabilities in cpuinfo/flags.
ddf19c
	[Expected success]
ddf19c
ddf19c
---
ddf19c
ddf19c
Current Icelake-Server CPU model lacks all the features enumerated by
ddf19c
MSR_IA32_ARCH_CAPABILITIES.
ddf19c
ddf19c
Add them, so that guest of "Icelake-Server" can see all of them.
ddf19c
ddf19c
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
ddf19c
Message-Id: <20200316095605.12318-1-xiaoyao.li@intel.com>
ddf19c
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
ddf19c
(cherry picked from commit d965dc35592d24c0c1519f1c566223c6277cb80e)
ddf19c
Signed-off-by: Paul Lai <plai@redhat.com>
ddf19c
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
ddf19c
---
ddf19c
 target/i386/cpu.c | 13 +++++++++++++
ddf19c
 1 file changed, 13 insertions(+)
ddf19c
ddf19c
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
ddf19c
index b763adcdc5..7d7b016bb7 100644
ddf19c
--- a/target/i386/cpu.c
ddf19c
+++ b/target/i386/cpu.c
ddf19c
@@ -3496,6 +3496,19 @@ static X86CPUDefinition builtin_x86_defs[] = {
ddf19c
                     { /* end of list */ }
ddf19c
                 },
ddf19c
             },
ddf19c
+            {
ddf19c
+                .version = 3,
ddf19c
+                .props = (PropValue[]) {
ddf19c
+                    { "arch-capabilities", "on" },
ddf19c
+                    { "rdctl-no", "on" },
ddf19c
+                    { "ibrs-all", "on" },
ddf19c
+                    { "skip-l1dfl-vmentry", "on" },
ddf19c
+                    { "mds-no", "on" },
ddf19c
+                    { "pschange-mc-no", "on" },
ddf19c
+                    { "taa-no", "on" },
ddf19c
+                    { /* end of list */ }
ddf19c
+                },
ddf19c
+            },
ddf19c
             { /* end of list */ }
ddf19c
         }
ddf19c
     },
ddf19c
-- 
ddf19c
2.27.0
ddf19c