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

Re: [Xen-devel] [PATCH v10 17/20] x86/VPMU: Add privileged PMU mode



>>> On 04.09.14 at 05:41, <boris.ostrovsky@xxxxxxxxxx> wrote:
> @@ -191,32 +198,65 @@ int vpmu_do_interrupt(struct cpu_user_regs *regs)
>          vpmu->arch_vpmu_ops->arch_vpmu_save(sampling);
>          vpmu_reset(vpmu, VPMU_CONTEXT_SAVE | VPMU_CONTEXT_LOADED);
>  
> -        /* Store appropriate registers in xenpmu_data */
> -        if ( is_pv_32bit_domain(sampling->domain) )
> +        if ( !is_hvm_domain(sampled->domain) )
>          {
> -            /*
> -             * 32-bit dom0 cannot process Xen's addresses (which are 64 bit)
> -             * and therefore we treat it the same way as a non-privileged
> -             * PV 32-bit domain.
> -             */
> -            struct compat_cpu_user_regs *cmp;
> -
> -            gregs = guest_cpu_user_regs();
> -
> -            cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs;
> -            XLAT_cpu_user_regs(cmp, gregs);
> +            /* Store appropriate registers in xenpmu_data */
> +            if ( is_pv_32bit_domain(sampling->domain) )

So this apparent mismatch of sampled vs sampling is now being
carried through various patches ...

> +            {
> +                /*
> +                 * 32-bit dom0 cannot process Xen's addresses (which are 64 
> bit)
> +                 * and therefore we treat it the same way as a non-privileged
> +                 * PV 32-bit domain.
> +                 */
> +                struct compat_cpu_user_regs *cmp;
> +
> +                gregs = guest_cpu_user_regs();
> +
> +                cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs;
> +                XLAT_cpu_user_regs(cmp, gregs);
> +
> +                /* Adjust RPL for kernel mode */
> +                if ((cmp->cs & 3) == 1)

Coding style. Please.

Jan


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


 


Rackspace

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