From: Jan Beulich Date: Tue, 7 Feb 2023 14:18:18 +0000 (+0100) Subject: libxl/x86: use public interface TSC mode definitions X-Git-Tag: 4.18.0-rc1~1122 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=be4be3238dc8d80bb98d3486d44623aae9c1621a;p=xen.git libxl/x86: use public interface TSC mode definitions Now that they're properly represented in the public interface, stop using literal numbers. No functional change intended. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c index 7484a5745e..d16573e72c 100644 --- a/tools/libs/light/libxl_x86.c +++ b/tools/libs/light/libxl_x86.c @@ -1,5 +1,6 @@ #include "libxl_internal.h" #include "libxl_arch.h" +#include int libxl__arch_domain_prepare_config(libxl__gc *gc, libxl_domain_config *d_config, @@ -486,13 +487,13 @@ int libxl__arch_domain_create(libxl__gc *gc, switch (d_config->b_info.tsc_mode) { case LIBXL_TSC_MODE_DEFAULT: - tsc_mode = 0; + tsc_mode = XEN_CPUID_TSC_MODE_DEFAULT; break; case LIBXL_TSC_MODE_ALWAYS_EMULATE: - tsc_mode = 1; + tsc_mode = XEN_CPUID_TSC_MODE_ALWAYS_EMULATE; break; case LIBXL_TSC_MODE_NATIVE: - tsc_mode = 2; + tsc_mode = XEN_CPUID_TSC_MODE_NEVER_EMULATE; break; case LIBXL_TSC_MODE_NATIVE_PARAVIRT: LOGD(ERROR, domid, "TSC Mode native_paravirt (a.k.a PVRDTSCP) has been removed");