qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for R


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM
Date: Thu, 03 Oct 2013 12:34:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 03/10/2013 12:28, Lei Li ha scritto:
> 
> The load_hook callback is only be called if the RAM_SAVE_FLAG_HOOK is
> received.
> To check this flags, it means there would be a check action first in
> unix_accept_incoming_migration(), like:
> 
> f = qemu_fopen_pipe(c, "rb");
> flags = qemu_get_be64(f);
> if (flags == RAM_SAVE_FLAG_HOOK) {
>     load_hook();
>     ...
> }
> 
> Otherwise, the incoming side has no idea whether the special 8-bytes record
> (RAM_SAVE_FLAG_HOOK) is sent.

No, ram_load is taking care of checking for RAM_SAVE_FLAG_HOOK.  If
before_iterate writes the 8 bytes (followed by passing the fd for the
pipe's read-side via SCM_RIGHTS), ram_load will call load_hook before it
loads any page and load_hook will fetch the fd.

Subsequent calls to load_hook will match data written by the sender's
save_page hook (so they contain a RAM address, with the 4k page data
sent on the pipe).

Paolo



reply via email to

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