'goto done' leads to a maze of checks and actions, all pointless. Bail out immediately if we can't decode. Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b20499d..b085ac3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4392,7 +4392,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len); if (r != EMULATION_OK) - goto done; + return EMULATE_FAIL; trace_kvm_emulate_insn_start(vcpu); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html