qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] io_mem_notdirty and live migration


From: Paolo Bonzini
Subject: Re: [Qemu-devel] io_mem_notdirty and live migration
Date: Thu, 24 Mar 2016 18:01:48 -0400 (EDT)


----- Original Message -----
> From: "Hollis Blanchard" <address@hidden>
> To: "Paolo Bonzini" <address@hidden>
> Cc: address@hidden
> Sent: Thursday, March 24, 2016 8:30:01 PM
> Subject: Re: io_mem_notdirty and live migration
> 
> 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?

It's done (in a pretty roundabout way) by tcg_commit, which is called
by memory_global_dirty_log_start's call to memory_region_transaction_commit.

Paolo



reply via email to

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