From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMCsA-0008OR-U7 for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:49:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMCs7-0003JB-OW for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:49:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMCs7-0003Ix-He for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:49:15 -0500 Message-ID: <54DDC890.4050801@redhat.com> Date: Fri, 13 Feb 2015 10:49:04 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <31B94C07-29A9-4595-95ED-FA860B527BD8@suse.de> <45883806-2296-486F-A0DC-D8A0A74F85B9@greensocs.com> <54DCC494.2010400@suse.de> <54DDC537.5070003@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Help on TLB Flush List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Burton Cc: mttcg@greensocs.com, Peter Maydell , Alexander Graf , qemu-devel On 13/02/2015 10:37, Mark Burton wrote: > the memory barrier is on the cpu requesting the flush isn=E2=80=99t it = (not > on the CPU that is being flushed)? Oops, I misread Peter's explanation. In that case, perhaps DMB can be treated in a similar way as WFI, using cpu->halted. Queueing work on other CPUs can be done with async_run_on_cpu, which exits the idle loop in qemu_tcg_wait_io_event (this avoids the deadlocks). Checking that other CPUs have flushed the TLBs can be done in cpu_has_work ("always return false if cpu->halted =3D= =3D true there are outstanding TLB requests"). Paolo