From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajAxM-0007h9-O9 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 15:30:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajAxJ-0000MN-HA for qemu-devel@nongnu.org; Thu, 24 Mar 2016 15:30:08 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:41049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajAxJ-0000MF-As for qemu-devel@nongnu.org; Thu, 24 Mar 2016 15:30:05 -0400 References: <1455744555-22101-1-git-send-email-hollis_blanchard@mentor.com> <1455744555-22101-2-git-send-email-hollis_blanchard@mentor.com> <1458751625.2947.19.camel@mentor.com> <56F2CA0F.9030307@redhat.com> From: Hollis Blanchard Message-ID: <56F44039.4000302@mentor.com> Date: Thu, 24 Mar 2016 12:30:01 -0700 MIME-Version: 1.0 In-Reply-To: <56F2CA0F.9030307@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] io_mem_notdirty and live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 03/23/2016 09:53 AM, Paolo Bonzini wrote: > On 23/03/2016 17:47, Hollis Blanchard wrote: >> Paolo, is it true that only TB-invalidating writes go through the >> io_mem_notdirty path? I'm looking at the live migration code now, and it >> seems like every memory write will go through that path when global >> dirty memory logging is enabled. > When live migration is enabled, writes to clean memory (almost all of > them) will go through that path indeed. Some writes to the framebuffer > will go through that path too. > > It depends on > > cpu_physical_memory_is_clean( > memory_region_get_ram_addr(section->mr) + xlat)) > > in tlb_set_page_with_attrs. I'm guessing that when live migration starts (ram_save_setup), the TLB must be flushed so that new entries can be created with the TLB_NOTDIRTY flag. Otherwise, pre-migration entries without TLB_NOTDIRTY flag could live on, allowing the TBs to directly modify guest RAM without tracking, right? I can't find anything underneath ram_save_setup() that does this, though. Am I just missing it? -- Hollis Blanchard Mentor Graphics Emulation Division