Hi guys
In this patch, I am attaching an early version of a new "on_vcpu" mechanism
(after
making it generic, I saw no reason to keep its name). It allows us to guarantee
that a piece of code will be executed in a certain vcpu, indicated by a
CPUState.
I am sorry for the big patch, I just dumped what I had so we can have early
directions.
When it comes to submission state, I'll split it accordingly.
As we discussed these days at qemu-devel, I am using pthread_set/get_specific
for
dealing with thread-local variables. Note that they are not used from signal
handlers.
A first optimization would be to use TLS variables where available.
In vl.c, I am providing a version of queue_work for the IO-thread, and other
for normal
operation. The "normal" one should fix the problems Jan is having, since it
does nothing
more than just issuing the function we want to execute.
The io-thread version is tested with both tcg and kvm, and works (to the extent
they were
working before, which in kvm case, is not much)