Hello,

Brice Goglin, le Tue 07 Jan 2014 12:54:45 +0100, a écrit :
>     I currently have a crazy idea for getting at the cache information. 
>     topology-x86.c has a lot of cpuid knowledge, and I have a proposed new
>     hypercall which executes cpuid on a specific PU.  Would it be possible (or
>     indeed sensible) to parametrise the code in topology-x86.c to take a few
>     function pointers for get/set binding information, and for the cpuid call
>     itself?
> 
> 
> I don't see why we couldn't do that.

Yep, it should just work.

> Can you post an example of what the Xen cpuid hypercall prototype
> would be, so that I see how I need to change the x86 backend?

Well, it will probably just take a cpu number and eax,ecx values (or
even all register values, in case future cpuid calls use all registers
as input) as parameters, and return eax,ebx,ecx,edx.

Compared to what we have already in the x86 backend, we are essentially
missing passing the cpu number, since in our case we were assuming that
the code was already running on the cpu itself.

We might however want to have a way to restrict discovery to caches
only.

Samuel

Reply via email to