From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjs1H-0003Rs-NN for qemu-devel@nongnu.org; Tue, 13 Sep 2016 14:01:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjs1D-0001JS-Ka for qemu-devel@nongnu.org; Tue, 13 Sep 2016 14:01:19 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:36407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjs1D-0001Il-Ev for qemu-devel@nongnu.org; Tue, 13 Sep 2016 14:01:15 -0400 Received: by mail-yw0-f181.google.com with SMTP id u124so97285215ywg.3 for ; Tue, 13 Sep 2016 11:01:15 -0700 (PDT) Sender: Richard Henderson References: <1472935202-3342-1-git-send-email-rth@twiddle.net> <1472935202-3342-14-git-send-email-rth@twiddle.net> <87vay1w7p8.fsf@linaro.org> From: Richard Henderson Message-ID: Date: Tue, 13 Sep 2016 11:00:11 -0700 MIME-Version: 1.0 In-Reply-To: <87vay1w7p8.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: qemu-devel@nongnu.org On 09/12/2016 06:47 AM, Alex Bennée wrote: >> > + /* Notice an IO access, or a notdirty page. */ >> > + if (unlikely(tlb_addr & ~TARGET_PAGE_MASK)) { >> > + /* There's really nothing that can be done to >> > + support this apart from stop-the-world. */ >> > + goto stop_the_world; > We are also triggering on TLB_NOTDIRTY here in the case where a > conditional write is the first write to a page. I don't know if a > stop_the_world is required at this point but we will need to ensure we > clear bits as notdirty_mem_write() does. > You're quite right that we could probably special-case TLB_NOTDIRTY here such that (1) we needn't leave the cpu loop, and (2) needn't utilize the actual "write" part of notdirty_mem_write; just set the bits then fall through to the actual atomic instruction below. r~