aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-01-10 19:24:59 +1100
committerEli Qiao <taget@linux.vnet.ibm.com>2014-01-13 13:27:47 +0800
commit9112fe27ae3ad245d18fc50d612bfe38a7c146a6 (patch)
tree7b70ecb2247dfaa4c40f02a37dc1da87033711fa
parent5e5b94873a402a62bc2095f638662cb03193cb0c (diff)
downloadpowerkvm-9112fe27ae3ad245d18fc50d612bfe38a7c146a6.tar.gz
PPC: KVM: fix VCPU run for HV KVM
When write to MMIO happens and there is an ioeventfd for that and is handled successfully, ioeventfd_write() returns 0 (success) and kvmppc_handle_store() returns EMULATE_DONE. Then kvmppc_emulate_mmio() converts EMULATE_DONE to RESUME_GUEST_NV and this broke from the loop. This adds handling of RESUME_GUEST_NV in kvmppc_vcpu_run_hv(). Cc: Michael S. Tsirkin <mst@redhat.com> Suggested-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--arch/powerpc/kvm/book3s_hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 2be1c0aeee674b..38ae80305fec51 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1954,7 +1954,7 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu)
vcpu->arch.fault_dar, vcpu->arch.fault_dsisr);
srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx);
}
- } while (r == RESUME_GUEST);
+ } while ((r == RESUME_GUEST_NV) || (r == RESUME_GUEST));
out:
vcpu->arch.state = KVMPPC_VCPU_NOTREADY;