From: Jan Beulich Date: Thu, 18 Feb 2016 14:07:11 +0000 (+0100) Subject: VMX: fold redundant code X-Git-Tag: 4.7.0-rc1~552 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=55caa84a58e9ca1f16e28dd382784e40abb91d3d;p=xen.git VMX: fold redundant code 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 Acked-by: Kevin Tian Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index aa8400b357..2b266e77cf 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -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; } }