Thread (4 messages) flat view 4 messages, 2 authors, 2014-02-04

Re: [PATCH] PPC: KVM: fix VCPU run for HV KVM

From: Alexander Graf <hidden>
Date: 2014-01-12 15:44:34
Also in: kvm, lkml

On 10.01.2014, at 08:21, Alexey Kardashevskiy [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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.
=20
This adds handling of RESUME_GUEST_NV in kvmppc_vcpu_run_hv().
=20
Cc: Michael S. Tsirkin <mst@redhat.com>
Suggested-by: Paul Mackerras <redacted>
Signed-off-by: Alexey Kardashevskiy <redacted>
---
=20
This definitely needs a better commit message. Please, help.
ps. it seems like ioeventfd never worked on ppc64. hm.
=20
---
arch/powerpc/kvm/book3s_hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
=20
diff --git a/arch/powerpc/kvm/book3s_hv.c =
b/arch/powerpc/kvm/book3s_hv.c
quoted hunk ↗ jump to hunk
index 072287f..24f363f 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1569,7 +1569,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 =3D=3D RESUME_GUEST);
+	} while ((r =3D=3D RESUME_GUEST_NV) || (r =3D=3D RESUME_GUEST));
How about

  while(!(r & RESUME_FLAG_HOST));

That should cover all RESUME_GUEST_XXX cases just fine. Apart from that =
I agree that we should check for ! FLAG_HOST bit rather than the actual =
RESUME_GUEST value in all case where we check for it (read: please =
update all places).


Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help