From: Ian Campbell Subject: Re: [PATCH v4 0/9] Migration Stream v2 Date: Wed, 7 May 2014 15:23:47 +0100 Message-ID: <1399472627.13430.119.camel@kazak.uk.xensource.com> References: <1398883012-28413-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398883012-28413-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Tim Deegan , Ian Jackson , Xen-devel , Frediano Ziglio , David Vrabel , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 2014-04-30 at 19:36 +0100, Andrew Cooper wrote: > There are certainly some areas still in need improvement. There are plans to > combine the save logic for PV and HVM guests by adding a few more hooks to > save_restore_ops. While reviewing the series for posting, I have noticed some > accidental duplication from attempting to merge PV and HVM together > (ctx->save.p2m_size and ctx->x86_pv.max_pfn) which can be consolidated. Overall it looks good, well done to all those involved. A few common issues I spotted which I didn't repeat every on every instance: * Magic numbers (some with prexisting suitable defines) should msotly be #defined, or * Chaining of unrelated things into if/else/else (especially where mixing input validation and actual functionality as I think I saw at least once) * { for a struct initialiser on the same line as the variable. * Apostrophes in comments are so last year I think that was it (but if you notice me commenting on something repeatedly but not consistently there's a good chance I meant to remember it for this list). > Moving forward will be work to do with converting a legacy image to a v2 > image. > > Questions/issues needing discussing are: > > 1) What level should the conversion happen. The v2 format is capable of > detecting a legacy stream, but libxc is arguably too low level for the > conversion decision to happen. The detection necessarily has to read the first N bytes, doesn't it? Which pretty much means the decision has to be made in libxc I think? > 2) What to do about the layer violations which is the toolstack record and > device model record. Libxl for HVM guests is the only known user of the > 'toolstack' chunk, which contains some xenstore key/value pairs. This data > should not be a blob in the middle of the libxc layer, and should be > promoted to a first class member of a libxl migration stream. Stefano added this, I can't remember what it is or why it ended up in libxc, it could well just be "libxc_domain_save is unhackable", or maybe there was a reason. Ian.