qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [mttcg] cputlb: Use async tlb_flush_by_mmuidx


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [mttcg] cputlb: Use async tlb_flush_by_mmuidx
Date: Mon, 29 Feb 2016 15:06:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0


On 29/02/2016 15:02, alvise rigo wrote:
> > Yeah, that's the other approach -- really split the things that can
> > be async and do real "wait for completion" at points which must
> > synchronize. (Needs a little care since DMB is not the only such point.)
> > An initial implementation that does an immediate wait-for-completion
> > is probably simpler to review though, and add the real asynchrony
> > later. And either way you need an API for the target to wait for
> > completion.
> OK, so basically being sure that the target CPU performs the flush
> before executing the next TB is not enough. We need a sort of feedback
> that the flush has been done before emulating the next guest
> instruction. Did I get it right?

That risks getting deadlocks if CPU A asks B to flush the TLB and vice
versa.  Using a halted state means that the VCPU thread goes through the
cpus.c loop and can for example service other CPUs' TLB flush requests.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]