]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
x86emul/test: use MSR constants
authorJan Beulich <jbeulich@suse.com>
Fri, 6 Sep 2024 10:48:42 +0000 (12:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 6 Sep 2024 10:48:42 +0000 (12:48 +0200)
msr-index.h has been in use for a while, so use the identifiers it
provides in place of raw numbers plus comments.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/test_x86_emulator.c

index 94a2bbab9393cbbd0575455c62508fb2dcc51fb5..3a6054441a54b09427dc0b5c2fd935d1c076a60f 100644 (file)
@@ -689,11 +689,11 @@ static int read_msr(
 {
     switch ( reg )
     {
-    case 0xc0000080: /* EFER */
-        *val = ctxt->addr_size > 32 ? 0x500 /* LME|LMA */ : 0;
+    case MSR_EFER:
+        *val = ctxt->addr_size > 32 ? EFER_LME | EFER_LMA : 0;
         return X86EMUL_OKAY;
 
-    case 0xc0000103: /* TSC_AUX */
+    case MSR_TSC_AUX:
 #define TSC_AUX_VALUE 0xCACACACA
         *val = TSC_AUX_VALUE;
         return X86EMUL_OKAY;