[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6/8] libxl: allow a generation ID to be specified at domain creation



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 <david.vrabel@xxxxxxxxxx>
> 
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.