]> xenbits.xensource.com Git - xen.git/commitdiff
x86/hypercall: switch away from temporary 32-bit register names
authorJan Beulich <jbeulich@suse.com>
Wed, 8 Mar 2017 14:15:19 +0000 (15:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 8 Mar 2017 14:15:19 +0000 (15:15 +0100)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hypercall.c
xen/arch/x86/pv/hypercall.c

index 6499caaa7c8cd70611e1077daa205a3a36935f76..9d6eca5cf248e58faa694f2d4c203e8aa7390619 100644 (file)
@@ -146,7 +146,7 @@ int hvm_hypercall(struct cpu_user_regs *regs)
     struct vcpu *curr = current;
     struct domain *currd = curr->domain;
     int mode = hvm_guest_x86_mode(curr);
-    unsigned long eax = regs->_eax;
+    unsigned long eax = regs->eax;
 
     switch ( mode )
     {
@@ -226,12 +226,12 @@ int hvm_hypercall(struct cpu_user_regs *regs)
     }
     else
     {
-        unsigned int ebx = regs->_ebx;
-        unsigned int ecx = regs->_ecx;
-        unsigned int edx = regs->_edx;
-        unsigned int esi = regs->_esi;
-        unsigned int edi = regs->_edi;
-        unsigned int ebp = regs->_ebp;
+        unsigned int ebx = regs->ebx;
+        unsigned int ecx = regs->ecx;
+        unsigned int edx = regs->edx;
+        unsigned int esi = regs->esi;
+        unsigned int edi = regs->edi;
+        unsigned int ebp = regs->ebp;
 
         HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%lu(%x, %x, %x, %x, %x, %x)", eax,
                     ebx, ecx, edx, esi, edi, ebp);
index 9144f2eb86fce7d6327706012fb822f0c0280042..9d29d2f0888e6df43fa100582c44968ac844eea1 100644 (file)
@@ -94,7 +94,7 @@ void pv_hypercall(struct cpu_user_regs *regs)
 
     ASSERT(guest_kernel_mode(curr, regs));
 
-    eax = is_pv_32bit_vcpu(curr) ? regs->_eax : regs->rax;
+    eax = is_pv_32bit_vcpu(curr) ? regs->eax : regs->rax;
 
     BUILD_BUG_ON(ARRAY_SIZE(pv_hypercall_table) >
                  ARRAY_SIZE(hypercall_args_table));
@@ -156,12 +156,12 @@ void pv_hypercall(struct cpu_user_regs *regs)
     }
     else
     {
-        unsigned int ebx = regs->_ebx;
-        unsigned int ecx = regs->_ecx;
-        unsigned int edx = regs->_edx;
-        unsigned int esi = regs->_esi;
-        unsigned int edi = regs->_edi;
-        unsigned int ebp = regs->_ebp;
+        unsigned int ebx = regs->ebx;
+        unsigned int ecx = regs->ecx;
+        unsigned int edx = regs->edx;
+        unsigned int esi = regs->esi;
+        unsigned int edi = regs->edi;
+        unsigned int ebp = regs->ebp;
 
 #ifndef NDEBUG
         /* Deliberately corrupt parameter regs not used by this hypercall. */
@@ -184,7 +184,7 @@ void pv_hypercall(struct cpu_user_regs *regs)
         }
 
         curr->hcall_compat = true;
-        regs->_eax = pv_hypercall_table[eax].compat(ebx, ecx, edx, esi, edi, ebp);
+        regs->eax = pv_hypercall_table[eax].compat(ebx, ecx, edx, esi, edi, ebp);
         curr->hcall_compat = false;
 
 #ifndef NDEBUG
@@ -193,12 +193,12 @@ void pv_hypercall(struct cpu_user_regs *regs)
             /* Deliberately corrupt parameter regs used by this hypercall. */
             switch ( hypercall_args_table[eax].compat )
             {
-            case 6: regs->_ebp = 0xdeadf00d;
-            case 5: regs->_edi = 0xdeadf00d;
-            case 4: regs->_esi = 0xdeadf00d;
-            case 3: regs->_edx = 0xdeadf00d;
-            case 2: regs->_ecx = 0xdeadf00d;
-            case 1: regs->_ebx = 0xdeadf00d;
+            case 6: regs->ebp = 0xdeadf00d;
+            case 5: regs->edi = 0xdeadf00d;
+            case 4: regs->esi = 0xdeadf00d;
+            case 3: regs->edx = 0xdeadf00d;
+            case 2: regs->ecx = 0xdeadf00d;
+            case 1: regs->ebx = 0xdeadf00d;
             }
         }
 #endif