Patchwork [4/4] PPC: KVM: fix RESUME_GUEST check before returning from kvmppc_run_core()

login
register
mail settings
Submitter Greg Kurz
Date Feb. 6, 2014, 4:37 p.m.
Message ID <20140206163712.3074.11273.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Download mbox | patch
Permalink /patch/317499/
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 85df6a4..3b498d9 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1541,7 +1541,7 @@  static void kvmppc_run_core(struct kvmppc_vcore *vc)
 	vc->vcore_state = VCORE_INACTIVE;
 	list_for_each_entry_safe(vcpu, vnext, &vc->runnable_threads,
 				 arch.run_list) {
-		if (vcpu->arch.ret != RESUME_GUEST) {
+		if (!is_kvmppc_resume_guest(vcpu->arch.ret)) {
 			kvmppc_remove_runnable(vc, vcpu);
 			wake_up(&vcpu->arch.cpu_run);
 		}