|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/8] x86/AMD: Do not intercept access to performance counters MSRs
>>> On 09.04.13 at 19:26, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
> @@ -138,6 +139,36 @@ static inline u32 get_fam15h_addr(u32 addr)
> return addr;
> }
>
> +static void amd_vpmu_set_msr_bitmap(struct vcpu *v)
> +{
> + int i;
Please, here and elsewhere, use unsigned int for variables used
as array index, unless some specific use requires them to be signed.
Jan
> + struct vpmu_struct *vpmu = vcpu_vpmu(v);
> + struct amd_vpmu_context *ctxt = vpmu->context;
> +
> + for ( i = 0; i < num_counters; i++ )
> + {
> + svm_intercept_msr(v, counters[i], MSR_INTERCEPT_NONE);
> + svm_intercept_msr(v, ctrls[i], MSR_INTERCEPT_WRITE);
> + }
> +
> + ctxt->msr_bitmap_set = 1;
> +}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |