qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: KVM call minutes for June 15


From: Paolo Bonzini
Subject: [Qemu-devel] Re: KVM call minutes for June 15
Date: Wed, 16 Jun 2010 10:58:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4

On 06/15/2010 05:18 PM, Chris Wright wrote:
- size for each section would be useful (breaks protocol)
   - while size is possibly useful, breaks protocol

It is not necessary to break the protocol. If you're okay with only having the size information when the migration data has been saved to a file, you can put the directory at the end of the migration data, after the EOF section. Something like

   QEMU_VM_SECTION_EOF
   QEMU_VM_SECTION_DIRECTORY
      copy of the migration data, with the actual data replaced
      by a single 8-byte pointer to the beginning of the section:

      QEMU_VM_SECTION_START
      <section id>
      5 "block"
      <instance id>
      <version id>
      <8-byte pointer>

      QEMU_VM_SECTION_START
      <section id>
      3 "ram"
      <instance id>
      <version id>
      <8-byte pointer>

      ...
      QEMU_VM_SECTION_FULL
      <section id>
      10 "cpu_common"
      <instance id>
      <version id>
      <8-byte pointer>

      ...
      QEMU_VM_SECTION_EOF
      <8-byte pointer>

      QEMU_VM_SECTION_DIRECTORY
      <8-byte pointer>

Note that by definition the last 8 bytes will point to the beginning of the directory. You can read the last 18 bytes to reduce (to almost zero) the possibility of a false positive.

The directory table can be built at save time and streamed after the EOF without causing an error if the receiver closes its connection during the streaming of the directory.

Paolo



reply via email to

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