]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu: Drop unused KVM features
authorJiri Denemark <jdenemar@redhat.com>
Fri, 26 Jul 2019 13:44:59 +0000 (15:44 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 29 Jul 2019 13:41:50 +0000 (15:41 +0200)
Most of the internally defined KVM CPUID features are not actually used
by libvirt. The QEMU driver may enable or disable them on the command
line, but we don't check for the associated CPU properties or CPUID
bits. They would be useless with QEMU 4.1 anyway since their names were
only remotely similar to the actual feature names.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/cpu/cpu_x86.c
src/cpu/cpu_x86_data.h

index f8a51dedf64bbb99d7ac3f15a922b560cc49eeb5..387c365512dd4b247c1759f9888e862938dc72b4 100644 (file)
@@ -73,24 +73,8 @@ struct _virCPUx86Feature {
         } \
     }
 
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE,
-                0x40000001, 0x00000001);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_NOP_IO_DELAY,
-                0x40000001, 0x00000002);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_MMU_OP,
-                0x40000001, 0x00000004);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE2,
-                0x40000001, 0x00000008);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_ASYNC_PF,
-                0x40000001, 0x00000010);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_STEAL_TIME,
-                0x40000001, 0x00000020);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_EOI,
-                0x40000001, 0x00000040);
 KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT,
                 0x40000001, 0x00000080);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
-                0x40000001, 0x01000000);
 
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME,
                 0x40000003, 0x00000001);
@@ -121,15 +105,7 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
 
 static virCPUx86Feature x86_kvm_features[] =
 {
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE),
-    KVM_FEATURE(VIR_CPU_x86_KVM_NOP_IO_DELAY),
-    KVM_FEATURE(VIR_CPU_x86_KVM_MMU_OP),
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE2),
-    KVM_FEATURE(VIR_CPU_x86_KVM_ASYNC_PF),
-    KVM_FEATURE(VIR_CPU_x86_KVM_STEAL_TIME),
-    KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI),
     KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT),
-    KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT),
     KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME),
     KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
     KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
index 85aaab709c564858df2681e1b866af74c9b10c40..2607dd96b16903589ed4fb57a02b486f59689201 100644 (file)
@@ -43,15 +43,7 @@ struct _virCPUx86MSR {
 #define CPUX86_KVM      0x40000000
 #define CPUX86_EXTENDED 0x80000000
 
-#define VIR_CPU_x86_KVM_CLOCKSOURCE  "__kvm_clocksource"
-#define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay"
-#define VIR_CPU_x86_KVM_MMU_OP       "__kvm_mmu_op"
-#define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2"
-#define VIR_CPU_x86_KVM_ASYNC_PF     "__kvm_async_pf"
-#define VIR_CPU_x86_KVM_STEAL_TIME   "__kvm_steal_time"
-#define VIR_CPU_x86_KVM_PV_EOI       "__kvm_pv_eoi"
 #define VIR_CPU_x86_KVM_PV_UNHALT    "__kvm_pv_unhalt"
-#define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable"
 
 /*
  * The following HyperV feature names suffixes must exactly match corresponding