qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question in savevm.c


From: Peter Maydell
Subject: Re: [Qemu-devel] Question in savevm.c
Date: Thu, 13 Mar 2014 12:19:59 +0000

On 13 March 2014 11:05, Veronia Bahaa <address@hidden> wrote:
> Hello, i need help in understanding the qemu_loadvm_state function
> 1- I don't get what QEMU_SECTION_START, FULL, END, PART are. I know they are
> hexadecimal numbers but i don't get the meaning.

They're part of the file/stream format for migration data.
The stream is split into sections of various types; each
section starts with one of these type codes to tell the
incoming side what to expect next. I don't think we document
the migration stream format, so you'll have to work it out
from the source code.

> 2- what's the difference between LoadStateEntry and SaveStateEntry?

A SaveStateEntry contains the information about how to
save or load a section of migration data (roughly speaking).
When we are loading migration data we look for the
SaveStateEntry corresponding to the section ID for the
section we've just started reading, and ask it to load
the data for us.

A LoadStateEntry is just a SaveStateEntry plus a place
to store section_id and version_id; we use this data
structure on loading so that when a later section in
the stream refers to a section ID we can get at the
SaveStateEntry for it (or give an error if we haven't
seen that ID before). See the code in qemu_loadvm_state.

(Very rough summary; read the code for more detail.)

thanks
-- PMM



reply via email to

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