@@ -338,7 +338,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
res->a = u.eax;
/* We only implement 3 fixed function counters */
- if ( (res->d & 0x1f) > fixed_pmc_cnt )
+ res->c &= ~((1 << fixed_pmc_cnt) - 1);
+ if ( (res->d & 0x1f) > fixed_pmc_cnt)
res->d = (res->d & ~0x1f) | fixed_pmc_cnt;
}
break;
@@ -74,7 +74,7 @@ struct vpmu_struct {
#define VPMU_CPU_HAS_DS 0x1000 /* Has Debug Store */
#define VPMU_CPU_HAS_BTS 0x2000 /* Has Branch Trace Store */
-#define VPMU_VERSION_MAX 0x4
+#define VPMU_VERSION_MAX 0x5
#define VPMU_VERSION_MAX_SUPPORTED 0x5
static inline void vpmu_set(struct vpmu_struct *vpmu, const u32 mask)