All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl/x86: use public interface TSC mode definitions
@ 2023-02-06 12:33 Jan Beulich
  2023-02-06 13:34 ` Andrew Cooper
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jan Beulich @ 2023-02-06 12:33 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony Perard, Wei Liu, Juergen Gross

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>

--- 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");


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libxl/x86: use public interface TSC mode definitions
  2023-02-06 12:33 [PATCH] libxl/x86: use public interface TSC mode definitions Jan Beulich
@ 2023-02-06 13:34 ` Andrew Cooper
  2023-02-06 13:45 ` Andrew Cooper
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2023-02-06 13:34 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Anthony Perard, Wei Liu, Juergen Gross

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>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libxl/x86: use public interface TSC mode definitions
  2023-02-06 12:33 [PATCH] libxl/x86: use public interface TSC mode definitions Jan Beulich
  2023-02-06 13:34 ` Andrew Cooper
@ 2023-02-06 13:45 ` Andrew Cooper
  2023-02-06 15:11 ` Juergen Gross
  2023-02-06 16:11 ` Anthony PERARD
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2023-02-06 13:45 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Anthony Perard, Wei Liu, Juergen Gross

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.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libxl/x86: use public interface TSC mode definitions
  2023-02-06 12:33 [PATCH] libxl/x86: use public interface TSC mode definitions Jan Beulich
  2023-02-06 13:34 ` Andrew Cooper
  2023-02-06 13:45 ` Andrew Cooper
@ 2023-02-06 15:11 ` Juergen Gross
  2023-02-06 16:11 ` Anthony PERARD
  3 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2023-02-06 15:11 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Anthony Perard, Wei Liu


[-- Attachment #1.1.1: Type: text/plain, Size: 291 bytes --]

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


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libxl/x86: use public interface TSC mode definitions
  2023-02-06 12:33 [PATCH] libxl/x86: use public interface TSC mode definitions Jan Beulich
                   ` (2 preceding siblings ...)
  2023-02-06 15:11 ` Juergen Gross
@ 2023-02-06 16:11 ` Anthony PERARD
  3 siblings, 0 replies; 5+ messages in thread
From: Anthony PERARD @ 2023-02-06 16:11 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Wei Liu, Juergen Gross

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,

-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-06 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 12:33 [PATCH] libxl/x86: use public interface TSC mode definitions Jan Beulich
2023-02-06 13:34 ` Andrew Cooper
2023-02-06 13:45 ` Andrew Cooper
2023-02-06 15:11 ` Juergen Gross
2023-02-06 16:11 ` Anthony PERARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.