]> xenbits.xensource.com Git - xen.git/commitdiff
VMX: fold redundant code
authorJan Beulich <jbeulich@suse.com>
Thu, 18 Feb 2016 14:07:11 +0000 (15:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Feb 2016 14:07:11 +0000 (15:07 +0100)
No need to do this in two slightly different ways, possibly keeping the
compiler from folding the code for us.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vmx/vmx.c

index aa8400b3571d654d689af55313045dddbc4d0b3d..2b266e77cf5adb2919a57536ce5d134f87061b9a 100644 (file)
@@ -3103,6 +3103,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
                  && vector != TRAP_nmi 
                  && vector != TRAP_machine_check ) 
             {
+        default:
                 perfc_incr(realmode_exits);
                 v->arch.hvm_vmx.vmx_emulate = 1;
                 HVMTRACE_0D(REALMODE_EMULATE);
@@ -3121,12 +3122,6 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
         case EXIT_REASON_INVEPT:
         case EXIT_REASON_INVVPID:
             break;
-
-        default:
-            v->arch.hvm_vmx.vmx_emulate = 1;
-            perfc_incr(realmode_exits);
-            HVMTRACE_0D(REALMODE_EMULATE);
-            return;
         }
     }