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

Re: [Xen-devel] [PATCH v4 1/4] x86/HVM: update the start info structure layout



>>> On 17.02.16 at 15:39, <boris.ostrovsky@xxxxxxxxxx> wrote:
> On 02/17/2016 05:05 AM, Roger Pau Monnà wrote:
>> El 17/2/16 a les 10:58, Jan Beulich ha escrit:
>>>>>> On 16.02.16 at 22:26, <boris.ostrovsky@xxxxxxxxxx> wrote:
>>>> On 02/16/2016 12:37 PM, Roger Pau Monne wrote:
>>>>> diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
>>>>> index 7b629b1..6ba060f 100644
>>>>> --- a/xen/include/public/xen.h
>>>>> +++ b/xen/include/public/xen.h
>>>>> @@ -787,25 +787,46 @@ typedef struct start_info start_info_t;
>>>>>    /*
>>>>>     * Start of day structure passed to PVH guests in %ebx.
>>>>>     *
>>>>> - * NOTE: nothing will be loaded at physical address 0, so
>>>>> - * a 0 value in any of the address fields should be treated
>>>>> - * as not present.
>>>>> + * NOTE: nothing will be loaded at physical address 0, so a 0 value in 
>>>>> any
>>>>> + * of the address fields should be treated as not present.
>>>>> + *
>>>>> + *  0 +----------------+
>>>>> + *    | magic          | Contains the magic value HVM_START_MAGIC_VALUE
>>>>> + *    |                | ("xEn3" with the 0x80 bit of the "E" set).
>>>>> + *  4 +----------------+
>>>>> + *    | version        | Version of this structure. Current version is 
>>>>> 0. 
> New
>>>>> + *    |                | versions are guaranteed to be 
>>>>> backwards-compatible.
>>>> #define XEN_HVM_START_INFO_VERSION   0
>>> What would that buy us? Once it gets bumped to 1, consumers
>>> would need to check against literal zero anyway.
> 
> Consumers would need to check against what their header file's version 
> is, not necessarily zero.

Only if they aren't capable to deal with more than one version. Plus -
an update to the header would then go unnoticed, breaking the code.

> And they, for example, may decide not to run 
> if the version provided by the structure is smaller than what they support.

Achievable by doing checks against literal numbers.

Jan

_______________________________________________
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®.