Patchwork [3/4] PPC: KVM: fix RESUME_GUEST check before ending CEDE in kvmppc_run_core()

login
register
mail settings
Submitter Greg Kurz
Date Feb. 6, 2014, 4:37 p.m.
Message ID <20140206163707.3074.35764.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Download mbox | patch
Permalink /patch/317498/
State New
Headers show

Comments

Greg Kurz - Feb. 6, 2014, 4:37 p.m.
Let's use a helper for this, in case new RESUME_GUEST_XXX values
are introduced.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index d62dc6c..85df6a4 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1530,7 +1530,7 @@  static void kvmppc_run_core(struct kvmppc_vcore *vc)
 		vcpu->arch.trap = 0;
 
 		if (vcpu->arch.ceded) {
-			if (ret != RESUME_GUEST)
+			if (!is_kvmppc_resume_guest(ret))
 				kvmppc_end_cede(vcpu);
 			else
 				kvmppc_set_timer(vcpu);