Message ID | 0d80ade5-dcf2-b0b3-ba4c-010962a6febc@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | libxl/x86: use public interface TSC mode definitions | expand |
On 06/02/2023 12:33 pm, Jan Beulich wrote: > Now that they're properly represented in the public interface, stop > using literal numbers. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
On 06/02/2023 12:33 pm, Jan Beulich wrote: > Now that they're properly represented in the public interface, stop > using literal numbers. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> (Take 2, trying to sort out my email aliases properly.)
On 06.02.23 13:33, Jan Beulich wrote: > Now that they're properly represented in the public interface, stop > using literal numbers. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Juergen Gross <jgross@suse.com> Juergen
On Mon, Feb 06, 2023 at 01:33:03PM +0100, Jan Beulich wrote: > Now that they're properly represented in the public interface, stop > using literal numbers. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Thanks,
--- 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 <xen/arch-x86/cpuid.h> 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 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");
Now that they're properly represented in the public interface, stop using literal numbers. No functional change intended. Signed-off-by: Jan Beulich <jbeulich@suse.com>