From: Gleb Natapov <gleb@redhat.com>
To: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Cc: KVM list <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kvm/vmx: fix the return value of handle_vmcall()
Date: Tue, 11 Dec 2012 09:19:38 +0200 [thread overview]
Message-ID: <20121211071938.GB11016@redhat.com> (raw)
In-Reply-To: <50C653ED.9000009@linux.vnet.ibm.com>
On Mon, Dec 10, 2012 at 03:28:13PM -0600, Jesse Larrew wrote:
>
> The return value of kvm_emulate_hypercall() is intended to inform callers
> whether or not we need to exit to userspace. However, handle_vmcall()
> currently ignores the return value.
>
No, it it not. KVM does not handle vmcalls in userspace.
> This patch simply propogates the return value from kvm_emulate_hypercall()
> to callers so that it can be acted upon appropriately.
>
> Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
> ---
> arch/x86/kvm/vmx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index f858159..8b37f5f 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -4682,8 +4682,7 @@ static int handle_halt(struct kvm_vcpu *vcpu)
> static int handle_vmcall(struct kvm_vcpu *vcpu)
> {
> skip_emulated_instruction(vcpu);
> - kvm_emulate_hypercall(vcpu);
> - return 1;
> + return kvm_emulate_hypercall(vcpu);
> }
>
> static int handle_invd(struct kvm_vcpu *vcpu)
> --
> 1.7.11.7
>
> Jesse Larrew
> Software Engineer, KVM Team
> IBM Linux Technology Center
> Phone: (512) 973-2052 (T/L: 363-2052)
> jlarrew@linux.vnet.ibm.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Gleb.
prev parent reply other threads:[~2012-12-11 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 21:28 [PATCH] kvm/vmx: fix the return value of handle_vmcall() Jesse Larrew
2012-12-11 7:19 ` Gleb Natapov [this message]
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=20121211071938.GB11016@redhat.com \
--to=gleb@redhat.com \
--cc=jlarrew@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).