From: Ian Campbell Subject: Re: [PATCH 6/8] libxl: allow a generation ID to be specified at domain creation Date: Fri, 27 Jun 2014 13:23:20 +0100 Message-ID: <1403871800.25894.66.camel@kazak.uk.xensource.com> References: <1403107977-13795-1-git-send-email-david.vrabel@citrix.com> <1403107977-13795-7-git-send-email-david.vrabel@citrix.com> <1403867762.25894.30.camel@kazak.uk.xensource.com> <53AD56F9.1090209@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X0VBf-0007Ne-Jp for xen-devel@lists.xenproject.org; Fri, 27 Jun 2014 12:23:27 +0000 In-Reply-To: <53AD56F9.1090209@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 Fri, 2014-06-27 at 12:35 +0100, David Vrabel wrote: > On 27/06/14 12:16, Ian Campbell wrote: > > On Wed, 2014-06-18 at 17:12 +0100, David Vrabel wrote: > >> Toolstacks may specify a VM generation ID using the u.hvm.ms_vm_genid > >> field in the libxl_domain_build_info structure, when creating a > >> domain. > >> > >> The toolstack is responsible for providing the correct generation ID > >> according to the Microsoft specification (e.g., generating new random > >> ones with libxl_ms_vm_genid_generate() as appropriate when restoring). > >> > >> Although the specification requires that a ACPI Notify event is raised > >> if the generation ID is changed, the generation ID is never changed > >> when the domain is in a state to receive such an event (it's either > >> newly created or suspended). > >> > >> Signed-off-by: David Vrabel > > > > Acked-by: Ian Campbell > > > > And I intend to apply but one question: > > > >> +bool libxl_ms_vm_genid_is_zero(const libxl_ms_vm_genid *id) > >> +{ > >> + static const libxl_ms_vm_genid zero; > > > > Does this formally end up in .bss and is therefore definitely zero? > > Yes. > > K&R section A8.7 (initialization) makes no distinction between static > variables of file or function scope. Thanks. > > > If it were global I'd have no doubt, but I'm not sure about it in this > > scope. > > > > Regardless, I'll assume for now that it is right. If not please send a > > follow up with the necessary "= {0}". > > I almost put this on but thought someone might nitpick and say it was > unnecessary... I would have been happy with it (as I'm now happy without). It serves a purpose as documentation if nothing else...