On Sun, 2012-08-05 at 11:55 +0300, Avi Kivity wrote:
> 
> I'm afraid I no longer know the details so closely, the code has
> changed
> quite a lot.  But the self-signal happens in kvm_cpu_exec(), see also
> env->exit_request.

Right, I think I eventually grasped it :-) It is fairly fragile however,
it basically relies that none of those things that leave the kernel in
an "incomplete" state (hcalls, mmio emulation, ...) return a non-zero
value, but instead only ever request an exit via exit_request, so that
we are guaranteed that the exec loop -will- go back, send that signal
and finally exit as a result of EINTR.

It also requires that the kernel tests & handles all those "completion"
early in VCPU_RUN before it does anything else really including testing
for signals.

The latter seems fine for us, the former was what we got wrong on ppc:
our hypercalls always cause exits via a non-zero return value for some
reason (I didn't write that code, not sure exactly why it was written
like that). Working on fixing that on qemu side now.

Thanks !

Cheers,
Ben.


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

Reply via email to