diff mbox

[v2,14/16] x86emul: sort opcode 0f01 special case switch() statement

Message ID 57EB98DA020000780011320B@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Sept. 28, 2016, 8:18 a.m. UTC
Sort the special case opcode 0f01 entries numerically, insert blank
lines between each of the cases, and properly place opening braces.

No functional change.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
x86emul: sort opcode 0f01 special case switch() statement

Sort the special case opcode 0f01 entries numerically, insert blank
lines between each of the cases, and properly place opening braces.

No functional change.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -4195,6 +4195,14 @@ x86_emulate(
         }
 #endif
 
+        case 0xd4: /* vmfunc */
+            generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == vex_66),
+                                  EXC_UD, -1);
+            fail_if(!ops->vmfunc);
+            if ( (rc = ops->vmfunc(ctxt) != X86EMUL_OKAY) )
+                goto done;
+            goto no_writeback;
+
         case 0xdf: /* invlpga */
             generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, -1);
             generate_exception_if(!mode_ring0(), EXC_GP, 0);
@@ -4203,7 +4211,9 @@ x86_emulate(
                                    ctxt)) )
                 goto done;
             goto no_writeback;
-        case 0xf9: /* rdtscp */ {
+
+        case 0xf9: /* rdtscp */
+        {
             uint64_t tsc_aux;
             fail_if(ops->read_msr == NULL);
             if ( (rc = ops->read_msr(MSR_TSC_AUX, &tsc_aux, ctxt)) != 0 )
@@ -4211,14 +4221,9 @@ x86_emulate(
             _regs.ecx = (uint32_t)tsc_aux;
             goto rdtsc;
         }
-        case 0xd4: /* vmfunc */
-            generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == vex_66),
-                                  EXC_UD, -1);
-            fail_if(ops->vmfunc == NULL);
-            if ( (rc = ops->vmfunc(ctxt) != X86EMUL_OKAY) )
-                goto done;
-            goto no_writeback;
-	case 0xfc: /* clzero */ {
+
+        case 0xfc: /* clzero */
+        {
             unsigned int eax = 1, ebx = 0, dummy = 0;
             unsigned long zero = 0;

Comments

Andrew Cooper Sept. 29, 2016, 8:46 p.m. UTC | #1
On 28/09/16 09:18, Jan Beulich wrote:
> Sort the special case opcode 0f01 entries numerically, insert blank
> lines between each of the cases, and properly place opening braces.
>
> No functional change.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox

Patch

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -4195,6 +4195,14 @@  x86_emulate(
         }
 #endif
 
+        case 0xd4: /* vmfunc */
+            generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == vex_66),
+                                  EXC_UD, -1);
+            fail_if(!ops->vmfunc);
+            if ( (rc = ops->vmfunc(ctxt) != X86EMUL_OKAY) )
+                goto done;
+            goto no_writeback;
+
         case 0xdf: /* invlpga */
             generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, -1);
             generate_exception_if(!mode_ring0(), EXC_GP, 0);
@@ -4203,7 +4211,9 @@  x86_emulate(
                                    ctxt)) )
                 goto done;
             goto no_writeback;
-        case 0xf9: /* rdtscp */ {
+
+        case 0xf9: /* rdtscp */
+        {
             uint64_t tsc_aux;
             fail_if(ops->read_msr == NULL);
             if ( (rc = ops->read_msr(MSR_TSC_AUX, &tsc_aux, ctxt)) != 0 )
@@ -4211,14 +4221,9 @@  x86_emulate(
             _regs.ecx = (uint32_t)tsc_aux;
             goto rdtsc;
         }
-        case 0xd4: /* vmfunc */
-            generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == vex_66),
-                                  EXC_UD, -1);
-            fail_if(ops->vmfunc == NULL);
-            if ( (rc = ops->vmfunc(ctxt) != X86EMUL_OKAY) )
-                goto done;
-            goto no_writeback;
-	case 0xfc: /* clzero */ {
+
+        case 0xfc: /* clzero */
+        {
             unsigned int eax = 1, ebx = 0, dummy = 0;
             unsigned long zero = 0;