From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv5 0/8] tools: rework VM Generation ID Date: Thu, 12 Jun 2014 16:04:30 +0100 Message-ID: <1402585478-3389-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wv6ZX-0002lt-DJ for xen-devel@lists.xenproject.org; Thu, 12 Jun 2014 15:05:47 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org This series reworks the VM Generation ID to a) conform to the published spec from Microsoft; b) simplify the save/restore code; and c) extend the libxl API to allow toolstacks to use this feature. The VM Generation ID must be regenerated with a new random ID after certain VM operations. Since xl lacks infrastructure for tracking the life-cycle of snapshots and clones (etc), the safe option of always using a new generation ID is used. You can download the spec from: http://www.microsoft.com/en-us/download/details.aspx?id=30707 Patch status ([A]cked, [M]odified, [N]ew): M libxc: allow xc_get/set_hvm_param() to get/set 64-bit N libxl: add libxl__random_bytes() which fills a buffer A hvmloader: add helper functions to get/set HVM params A hvm: add HVM_PARAM_VM_GENERATION_ID_ADDR A libxc,libxl,hvmloader: strip out outdated VM generation M libxl: allow a generation ID to be specified at domain M xl: generate a new random VM generation ID if requested A docs: update docs for the ~/platform/generation-id key Changes in v5: - Rebase on staging to fix some conflicts. - Add libxl__random_bytes() - Rename field to ms_vm_genid. - Toolstacks can generate a fully random generation ID with libxl_vm_genid_generate(). Changes in v4: - Allow xc_get/get_hvm_params() to get/set 64-bit values. - Const-ify libxl_uuid_*() calls. - Minor tweaks to libxl internals (gc as param, use GCSPRINTF()). Changes in v3: - Specify generation ID in libxl_domain_build_info instead of having to call a function to set it. - Improve docs. Changes in v2: - Use libxl_uuid for the generation ID. - Add "generation_id" option to xl domain configuration file and use this to set a random generation ID every time. David