From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhODN-00089x-KQ for qemu-devel@nongnu.org; Wed, 30 Sep 2015 16:43:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhODJ-0006G6-KN for qemu-devel@nongnu.org; Wed, 30 Sep 2015 16:43:01 -0400 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:35110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhODJ-0006Ff-FB for qemu-devel@nongnu.org; Wed, 30 Sep 2015 16:42:57 -0400 Received: by pacfv12 with SMTP id fv12so51718216pac.2 for ; Wed, 30 Sep 2015 13:42:57 -0700 (PDT) Sender: Richard Henderson References: <1443083566-10994-1-git-send-email-a.rigo@virtualopensystems.com> <1443083566-10994-4-git-send-email-a.rigo@virtualopensystems.com> <560B5DE7.2040109@twiddle.net> From: Richard Henderson Message-ID: <560C4942.700@twiddle.net> Date: Thu, 1 Oct 2015 06:42:42 +1000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v5 3/6] softmmu: Add helpers for a new slowpath List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alvise rigo Cc: mttcg@greensocs.com, Claudio Fontana , QEMU Developers , Paolo Bonzini , Jani Kokkonen , VirtualOpenSystems Technical Team , =?UTF-8?Q?Alex_Benn=c3=a9e?= On 09/30/2015 07:46 PM, alvise rigo wrote: > On Wed, Sep 30, 2015 at 5:58 AM, Richard Henderson wrote: >> Why would you need to indicate that another cpu has started an exclusive >> operation on this page? That seems definitely wrong. > > The cpu_physical_memory_clear_excl_dirty() sets the flag to generate > the TLB entry with the EXCL flag. Yes, but surely the clearing of dirty on current_cpu is enough to cause the other cpus to see that they need to set TLB_EXCL when reloading their tlb entries. Why do you need to manipulate the *other* cpu's dirty bit? >> I wonder what can be done to clean all of this up, short of actually >> transitioning to c++ templates... >> > > Is there already an example in QEMU I can look at? No. r~