From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 6/8] libxl: allow a generation ID to be specified at domain creation Date: Fri, 27 Jun 2014 12:35:21 +0100 Message-ID: <53AD56F9.1090209@citrix.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> 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 1X0URC-0003xL-3b for xen-devel@lists.xenproject.org; Fri, 27 Jun 2014 11:35:26 +0000 In-Reply-To: <1403867762.25894.30.camel@kazak.uk.xensource.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: Ian Campbell , David Vrabel Cc: xen-devel@lists.xenproject.org, Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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. > 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... David