Displaying 1 result from an estimated 1 matches for "tsc_mode_pvrdtscp".
2011 Jul 04
0
[PATCH] Don''t expose CPUID time leaf when not using PVRDTSCP
...id
struct domain *d = current->domain;
/* Optionally shift out of the way of Viridian architectural leaves. */
uint32_t base = is_viridian_domain(d) ? 0x40000100 : 0x40000000;
+ uint32_t limit;
idx -= base;
- if ( idx > 3 )
+
+ limit = (d->arch.tsc_mode < TSC_MODE_PVRDTSCP) ? 2 : 3;
+
+ if ( idx > limit )
return 0;
switch ( idx )
{
case 0:
- *eax = base + 3; /* Largest leaf */
+ *eax = base + limit; /* Largest leaf */
*ebx = XEN_CPUID_SIGNATURE_EBX;
*ecx = XEN_CPUID_SIGNATURE_ECX;
*edx = XEN_CP...