From: Ian Campbell Subject: Re: [PATCH 5/6] libxl: add libxl_vm_generation_id_set() Date: Wed, 28 May 2014 15:56:57 +0100 Message-ID: <1401289017.10916.16.camel@kazak.uk.xensource.com> References: <1401211909-27771-1-git-send-email-david.vrabel@citrix.com> <1401211909-27771-6-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WpfHq-0002Wu-Fh for xen-devel@lists.xenproject.org; Wed, 28 May 2014 14:57:02 +0000 In-Reply-To: <1401211909-27771-6-git-send-email-david.vrabel@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: David Vrabel Cc: xen-devel@lists.xenproject.org, Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2014-05-27 at 18:31 +0100, David Vrabel wrote: > Add a function to allow a toolstack to set a domain's VM generation > ID. > > Although the specification requires that a ACPI Notify event is raised > if the generation ID is changed, in practice this appears not to be > necessary if the generation ID is changed while the Windows VM is > suspended. Do we (or did Microsoft) envisage scenarios where the ID might change while the VM was not suspended? > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index c7aa817..8dfd715 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -1163,6 +1163,9 @@ int libxl_flask_getenforce(libxl_ctx *ctx); > int libxl_flask_setenforce(libxl_ctx *ctx, int mode); > int libxl_flask_loadpolicy(libxl_ctx *ctx, void *policy, uint32_t size); > > +int libxl_vm_generation_id_set(libxl_ctx *ctx, uint32_t domid, > + const libxl_uuid *uuid); This needs a #define LIBXL_HAVE_FOO thing as described in the comment about compatibility near the top of the file. Each toolstack needs to be modified to call this new function. Why is that preferred to a flag in libxl_domain_config/libxl_domain_restore_params which can do the right thing by default for all toolstacks? > + /* > + * Update the ID in guest memory (if available). Does "if available" here translate to "on restore"? (with on create being handled by hvmloader, IOW this is the cooperation I was wondering about on the docs patch) Ian.