073345
From 3ad9cd82d4fe7e87665a0233662712725f5d3d5d Mon Sep 17 00:00:00 2001
073345
Message-Id: <3ad9cd82d4fe7e87665a0233662712725f5d3d5d@dist-git>
073345
From: Jiri Denemark <jdenemar@redhat.com>
073345
Date: Fri, 7 Feb 2020 10:41:44 +0100
073345
Subject: [PATCH] cpu: Drop unused KVM features
073345
MIME-Version: 1.0
073345
Content-Type: text/plain; charset=UTF-8
073345
Content-Transfer-Encoding: 8bit
073345
073345
Most of the internally defined KVM CPUID features are not actually used
073345
by libvirt. The QEMU driver may enable or disable them on the command
073345
line, but we don't check for the associated CPU properties or CPUID
073345
bits. They would be useless with QEMU 4.1 anyway since their names were
073345
only remotely similar to the actual feature names.
073345
073345
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
073345
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
073345
Reviewed-by: Ján Tomko <jtomko@redhat.com>
073345
(cherry picked from commit 9e6172937f8d8f832359dd5eeb4e7c92f9defcbf)
073345
073345
https://bugzilla.redhat.com/show_bug.cgi?id=1794868
073345
073345
Conflicts:
073345
	src/cpu/cpu_x86_data.h
073345
            - all defines are indented as downstream lacks #pragma once
073345
073345
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
073345
Message-Id: <763f5d57b6cb930d9edbfbe8edbb7d5797a48150.1581064395.git.jdenemar@redhat.com>
073345
Reviewed-by: Ján Tomko <jtomko@redhat.com>
073345
---
073345
 src/cpu/cpu_x86.c      | 24 ------------------------
073345
 src/cpu/cpu_x86_data.h |  8 --------
073345
 2 files changed, 32 deletions(-)
073345
073345
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
073345
index ecf11926b4..0459a0d1c8 100644
073345
--- a/src/cpu/cpu_x86.c
073345
+++ b/src/cpu/cpu_x86.c
073345
@@ -77,24 +77,8 @@ struct _virCPUx86Feature {
073345
         } \
073345
     }
073345
 
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE,
073345
-                0x40000001, 0x00000001);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_NOP_IO_DELAY,
073345
-                0x40000001, 0x00000002);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_MMU_OP,
073345
-                0x40000001, 0x00000004);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE2,
073345
-                0x40000001, 0x00000008);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_ASYNC_PF,
073345
-                0x40000001, 0x00000010);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_STEAL_TIME,
073345
-                0x40000001, 0x00000020);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_EOI,
073345
-                0x40000001, 0x00000040);
073345
 KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT,
073345
                 0x40000001, 0x00000080);
073345
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
073345
-                0x40000001, 0x01000000);
073345
 
073345
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME,
073345
                 0x40000003, 0x00000001);
073345
@@ -121,15 +105,7 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
073345
 
073345
 static virCPUx86Feature x86_kvm_features[] =
073345
 {
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_NOP_IO_DELAY),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_MMU_OP),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE2),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_ASYNC_PF),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_STEAL_TIME),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI),
073345
     KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT),
073345
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT),
073345
     KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME),
073345
     KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
073345
     KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
073345
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
073345
index 9668b13eb9..8a189f854e 100644
073345
--- a/src/cpu/cpu_x86_data.h
073345
+++ b/src/cpu/cpu_x86_data.h
073345
@@ -49,15 +49,7 @@ struct _virCPUx86MSR {
073345
 # define CPUX86_KVM      0x40000000
073345
 # define CPUX86_EXTENDED 0x80000000
073345
 
073345
-# define VIR_CPU_x86_KVM_CLOCKSOURCE  "__kvm_clocksource"
073345
-# define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay"
073345
-# define VIR_CPU_x86_KVM_MMU_OP       "__kvm_mmu_op"
073345
-# define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2"
073345
-# define VIR_CPU_x86_KVM_ASYNC_PF     "__kvm_async_pf"
073345
-# define VIR_CPU_x86_KVM_STEAL_TIME   "__kvm_steal_time"
073345
-# define VIR_CPU_x86_KVM_PV_EOI       "__kvm_pv_eoi"
073345
 # define VIR_CPU_x86_KVM_PV_UNHALT    "__kvm_pv_unhalt"
073345
-# define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable"
073345
 
073345
 /*
073345
  * The following HyperV feature names suffixes must exactly match corresponding
073345
-- 
073345
2.25.0
073345