kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm/vmx: fix the return value of handle_vmcall()
@ 2012-12-10 21:28 Jesse Larrew
  2012-12-11  7:19 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Larrew @ 2012-12-10 21:28 UTC (permalink / raw)
  To: KVM list; +Cc: linux-kernel@vger.kernel.org


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.

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-11  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).