[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] libxl/x86: use public interface TSC mode definitions



commit be4be3238dc8d80bb98d3486d44623aae9c1621a
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Feb 7 15:18:18 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Feb 7 15:18:18 2023 +0100

    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 <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 tools/libs/light/libxl_x86.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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 <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 *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");
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.