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

Re: [Xen-devel] Hypervisor cpuid time leaf



On 05/03/2017 10:06 AM, Andrew Cooper wrote:
> On 03/05/17 14:57, Boris Ostrovsky wrote:
>> Is there a reason why we don't document hypervisor time leaf (3, or is
>> it 4?) in public/arch-x86/cpuid.h?
> (The leaf with the number 3.  The way the documentation refers to leaves
> and numeric values is very counter-intuitive.  I half remember a plan to
> renumber the comments to be zero-based, which then match the constants. 
> Also, XEN_CPUID_MAX_NUM_LEAVES is entirely erroneous to have in the
> public API.)

Especially given that we return it in leaf 0 (aka 1).

>
> I wondered the same when I looked at it.  I presume it was due to
> insufficient review of the virtual timing modes when they were introduced.

Looking at __update_vcpu_system_time(), I am not sure we are reporting
correct values on (PV & !vtsc). I think it should be t->tsc_scale.

>
>> We have a regression in Linux where there is a window when
>> vcpu_time_info data is not yet available and one possibility is to use
>> this leaf. But I'd like to be sure it is part of a stable ABI.

I BTW realized that using this leaf to fix the regression is probably
not the right approach. But the original question stands.

> One problem it has is that there is no indication of the valid subleafs
> (a problem shared with the subsequent leaf).  I'd like to get agreement
> on how to sort that (possibly via documentation only) before declaring
> the ABI stable.

We can't use EAX=0 as it is sometimes a valid response on the first
subleaf. But both EAX and ECX being zero could work.


-boris

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

 


Rackspace

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