From: Ian Campbell Subject: Re: [PATCH 5/6] libxl: allow a generation ID to be specified at domain creation Date: Wed, 11 Jun 2014 12:53:39 +0100 Message-ID: <1402487619.16332.16.camel@kazak.uk.xensource.com> References: <1401801340-6196-1-git-send-email-david.vrabel@citrix.com> <1401801340-6196-6-git-send-email-david.vrabel@citrix.com> <1402398065.1250.36.camel@kazak.uk.xensource.com> <5397477B.80801@citrix.com> <1402474966.9559.8.camel@kazak.uk.xensource.com> <53983547.40703@citrix.com> <1402484518.16332.3.camel@kazak.uk.xensource.com> <539841B7.5050507@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 1Wuh68-0001RT-8M for xen-devel@lists.xenproject.org; Wed, 11 Jun 2014 11:53:44 +0000 In-Reply-To: <539841B7.5050507@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 Wed, 2014-06-11 at 12:47 +0100, David Vrabel wrote: > On 11/06/14 12:01, Ian Campbell wrote: > > On Wed, 2014-06-11 at 11:53 +0100, David Vrabel wrote: > >> On 11/06/14 09:22, Ian Campbell wrote: > >>> On Tue, 2014-06-10 at 18:59 +0100, David Vrabel wrote: > >>>> On 10/06/14 12:01, Ian Campbell wrote: > >>>>> On Tue, 2014-06-03 at 14:15 +0100, David Vrabel wrote: > >>>>> Should we consider calling the API field name something more specific, > >>>>> like "ms_vgid"? I'm thinking of the case where some other OS vendor > >>>>> reinvents the wheel. (I don't care about the internals, just the API). > >>>> > >>>> generation_id matches the platform/generation-id xenstore key so I would > >>>> keep the libxl field name as-is. > >>> > >>> One is an internal implementation detail (we can update libx? and > >>> hvmloader in parallel if we have to) while the other is a stable API. > >> > >> The specification is for a generic, non-Microsoft specific ACPI device > >> so I don't see the need to include ms_ in the field name. BTW, the fact is that microsoft are defining the spec, regardless of whether it is generic in nature, so I'm not really sure I buy this argument. e.g. if the Linux guys decided they wanted something similar but incompatible with this spec and therefore a different ACPI device how would we name that field to avoid confusion? > > The name should reflect the spec then. acpi_vm_gen_counter perhaps > > (matching the ACPI _CID) > > It does match the spec; "Generation ID" is the name of the feature. > Using acpi_vm_gen_counter would just be confusing because the device > does not provide a counter. That's the name it has in the spec. > >>>>> Do you not need to worry about endianess when memcpy'ing out of a uuid? > >>>> > >>>> No. The conversion of uuid to the two 64-bit integers is arbitrary, it > >>>> need only be consistent. The integers in guest memory are in native > >>>> endianness. > >>> > >>> OK. I was wondering if we might want to preserve the byte order so as > >>> not to trample any UUID format which is used. > >> > >> The specification doesn't require that the ID is a UUID. > > > > True. It does say "cryptographically random integer value". Are you sure > > that the result of libxl_uuid_generate meets that standard (rather than > > say one of the non-crypto schemes for generating uniqueness)? > > Yes (although it does only provide 122 bits of randomness but I think > the trade-off of a convenient, UUID-base interface is worth it). Even on BSD? Ian.