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

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