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

Re: [Xen-devel] [PATCH v4 4/7] X86: generic MSRs save/restore



Jan Beulich wrote:
>>>> On 02.12.13 at 09:52, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:
>> --- a/xen/include/public/arch-x86/hvm/save.h
>> +++ b/xen/include/public/arch-x86/hvm/save.h
>> @@ -592,9 +592,22 @@ struct hvm_tsc_adjust {
>> 
>>  DECLARE_HVM_SAVE_TYPE(TSC_ADJUST, 19, struct hvm_tsc_adjust);
>> 
>> +#define MSR_SAVE_LOAD_MAX 16
> 
> Please don't - let's keep this flexible, with dynamic sizing similar
> to how the variable size XSAVE record is being dealt with.
> 

Sorry, I didn't figure out how to, considering the format requirement like 
hvm_save_entry()/ hvm_load_entry() and macro.

XSAVE itself are not variable size -- it allocate at init per max feature size 
requirement (but dynamically xsave/xrstor partial of the buffer).

Except this point, I'm OK with other comments.

Thanks,
Jinsong

> 
>> +struct msr_save_load {
>> +    uint32_t index;
>> +    uint64_t val;
>> +};
>> +
>> +struct hvm_msr {
>> +    unsigned int count;
>> +    struct msr_save_load msr[MSR_SAVE_LOAD_MAX];
>> +};
>> +
>> +DECLARE_HVM_SAVE_TYPE(HVM_MSR, 20, struct hvm_msr); +
>>  /*
>>   * Largest type-code in use
>>   */
>> -#define HVM_SAVE_CODE_MAX 19
>> +#define HVM_SAVE_CODE_MAX 20
>> 
>>  #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */


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