On 15/01/2015 12:14, Alexander Graf wrote:
>> > 
>> > Once you have >1 VCPU thread you'll need the RCU work that I am slowly
>> > polishing and sending out.  That's because one device can change the
>> > memory map, and that will cause a tlb_flush for all CPUs in tcg_commit,
>> > and that's not thread-safe.
> You'll have a similar problem for tb_flush() if you use a single tb
> cache. Just introduce a big hammer function for now that IPIs all the
> other threads, waits until they halted, do the atomic instruction (like
> change the memory map or flush the tb cache), then let them continue.

For the memory map I played with just using cpu_interrupt instead of
waiting for the halt of the other CPUs.  That's safe for 1 VCPU thread,
but not for >1 thread.  Perhaps we can exit the other CPUs with a signal
and cpu_resume_from_signal.

Paolo

Reply via email to