cpu: Drop KVM_ from hyperv feature macros

All the features are hyperv features even though they are provided by
KVM with QEMU. The "KVM" part in the macro names does not make a lot of
sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2019-07-25 17:07:18 +02:00
parent d99e8f01c7
commit 1ddf014fef
3 changed files with 41 additions and 40 deletions

View File

@ -91,31 +91,32 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT,
0x40000001, 0x00000080); 0x40000001, 0x00000080);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT, KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
0x40000001, 0x01000000); 0x40000001, 0x01000000);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RUNTIME,
KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME,
0x40000003, 0x00000001); 0x40000003, 0x00000001);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SYNIC, KVM_FEATURE_DEF(VIR_CPU_x86_HV_SYNIC,
0x40000003, 0x00000004); 0x40000003, 0x00000004);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_STIMER, KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
0x40000003, 0x00000008); 0x40000003, 0x00000008);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RELAXED, KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
0x40000003, 0x00000020); 0x40000003, 0x00000020);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCKS, KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
0x40000003, 0x00000022); 0x40000003, 0x00000022);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VAPIC, KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
0x40000003, 0x00000030); 0x40000003, 0x00000030);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VPINDEX, KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX,
0x40000003, 0x00000040); 0x40000003, 0x00000040);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RESET, KVM_FEATURE_DEF(VIR_CPU_x86_HV_RESET,
0x40000003, 0x00000080); 0x40000003, 0x00000080);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_FREQUENCIES, KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES,
0x40000003, 0x00000800); 0x40000003, 0x00000800);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT, KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT,
0x40000003, 0x00002000); 0x40000003, 0x00002000);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_TLBFLUSH, KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
0x40000004, 0x00000004); 0x40000004, 0x00000004);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_IPI, KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI,
0x40000004, 0x00000400); 0x40000004, 0x00000400);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_EVMCS, KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
0x40000004, 0x00004000); 0x40000004, 0x00004000);
static virCPUx86Feature x86_kvm_features[] = static virCPUx86Feature x86_kvm_features[] =
@ -129,19 +130,19 @@ static virCPUx86Feature x86_kvm_features[] =
KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI), KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI),
KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT), KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT),
KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT), KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_RUNTIME), KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_SYNIC), KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_STIMER), KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_RELAXED), KVM_FEATURE(VIR_CPU_x86_HV_RELAXED),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_SPINLOCKS), KVM_FEATURE(VIR_CPU_x86_HV_SPINLOCKS),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_VAPIC), KVM_FEATURE(VIR_CPU_x86_HV_VAPIC),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_VPINDEX), KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_RESET), KVM_FEATURE(VIR_CPU_x86_HV_RESET),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_FREQUENCIES), KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT), KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_TLBFLUSH), KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_IPI), KVM_FEATURE(VIR_CPU_x86_HV_IPI),
KVM_FEATURE(VIR_CPU_x86_KVM_HV_EVMCS), KVM_FEATURE(VIR_CPU_x86_HV_EVMCS),
}; };
typedef struct _virCPUx86Model virCPUx86Model; typedef struct _virCPUx86Model virCPUx86Model;

View File

@ -58,19 +58,19 @@ struct _virCPUx86MSR {
* ones defined for virDomainHyperv in domain_conf.c. * ones defined for virDomainHyperv in domain_conf.c.
* E.g "hv-runtime" -> "runtime", "hv-spinlocks" -> "spinlocks" etc. * E.g "hv-runtime" -> "runtime", "hv-spinlocks" -> "spinlocks" etc.
*/ */
#define VIR_CPU_x86_KVM_HV_RUNTIME "hv-runtime" #define VIR_CPU_x86_HV_RUNTIME "hv-runtime"
#define VIR_CPU_x86_KVM_HV_SYNIC "hv-synic" #define VIR_CPU_x86_HV_SYNIC "hv-synic"
#define VIR_CPU_x86_KVM_HV_STIMER "hv-stimer" #define VIR_CPU_x86_HV_STIMER "hv-stimer"
#define VIR_CPU_x86_KVM_HV_RELAXED "hv-relaxed" #define VIR_CPU_x86_HV_RELAXED "hv-relaxed"
#define VIR_CPU_x86_KVM_HV_SPINLOCKS "hv-spinlocks" #define VIR_CPU_x86_HV_SPINLOCKS "hv-spinlocks"
#define VIR_CPU_x86_KVM_HV_VAPIC "hv-vapic" #define VIR_CPU_x86_HV_VAPIC "hv-vapic"
#define VIR_CPU_x86_KVM_HV_VPINDEX "hv-vpindex" #define VIR_CPU_x86_HV_VPINDEX "hv-vpindex"
#define VIR_CPU_x86_KVM_HV_RESET "hv-reset" #define VIR_CPU_x86_HV_RESET "hv-reset"
#define VIR_CPU_x86_KVM_HV_FREQUENCIES "hv-frequencies" #define VIR_CPU_x86_HV_FREQUENCIES "hv-frequencies"
#define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "hv-reenlightenment" #define VIR_CPU_x86_HV_REENLIGHTENMENT "hv-reenlightenment"
#define VIR_CPU_x86_KVM_HV_TLBFLUSH "hv-tlbflush" #define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush"
#define VIR_CPU_x86_KVM_HV_IPI "hv-ipi" #define VIR_CPU_x86_HV_IPI "hv-ipi"
#define VIR_CPU_x86_KVM_HV_EVMCS "hv-evmcs" #define VIR_CPU_x86_HV_EVMCS "hv-evmcs"
#define VIR_CPU_X86_DATA_INIT { 0 } #define VIR_CPU_X86_DATA_INIT { 0 }

View File

@ -7179,7 +7179,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
case VIR_DOMAIN_HYPERV_SPINLOCKS: case VIR_DOMAIN_HYPERV_SPINLOCKS:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
virBufferAsprintf(&buf, ",%s=0x%x", virBufferAsprintf(&buf, ",%s=0x%x",
VIR_CPU_x86_KVM_HV_SPINLOCKS, VIR_CPU_x86_HV_SPINLOCKS,
def->hyperv_spinlocks); def->hyperv_spinlocks);
break; break;