From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: Simplify exit path on decode failure
Date: Mon, 10 Jan 2011 18:17:54 +0100 [thread overview]
Message-ID: <4D2B3F42.6030006@siemens.com> (raw)
In-Reply-To: <1294146884-6253-3-git-send-email-avi@redhat.com>
Am 04.01.2011 14:14, Avi Kivity wrote:
> '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@redhat.com>
> ---
> 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;
This leaves 'done' unused behind, and the compiler mourns.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2011-01-10 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 13:14 [PATCH 0/4] Vendor specific instructions and the emulator Avi Kivity
2011-01-04 13:14 ` [PATCH 1/4] KVM: Fix x86_decode_insn() return code check Avi Kivity
2011-01-13 13:54 ` Avi Kivity
2011-01-04 13:14 ` [PATCH 2/4] KVM: Simplify exit path on decode failure Avi Kivity
2011-01-10 17:17 ` Jan Kiszka [this message]
2011-01-11 9:40 ` Avi Kivity
2011-01-04 13:14 ` [PATCH 3/4] KVM: x86 emulator: vendor specific instructions Avi Kivity
2011-01-04 13:14 ` [PATCH 4/4] KVM: Drop ad-hoc vendor specific instruction restriction Avi Kivity
2011-01-07 9:49 ` [PATCH 0/4] Vendor specific instructions and the emulator Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2B3F42.6030006@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox