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

Re: [Xen-devel] [PATCH v3 3/6] xen/PMU: Initialization code for Xen PMU

On 03/07/14 20:14, Boris Ostrovsky wrote:
> Map shared data structure that will hold CPU registers, VPMU context, V/PCPU 
> IDs
> of the CPU interrupted by PMU interrupt. Hypervisor fills this information in
> its handler and passes it to the guest for further processing.
> Set up PMU VIRQ.
> Now that perf infrastructure will assume that PMU is availble on a PV guest we
> need to be careful and make sure that accesses via RDPMC instruction don't
> cause fatal traps by the hypervisor. Provide a nop RDPMC handler.
> For the same reason avoid issuing a warning on a write to APIC's LVTPC.
> Both of these will be made functional in later patches.
> +int xen_pmu_init(int cpu)
> +{
> +     int ret = 0;
> +     struct xen_pmu_params xp;
> +     unsigned long pfn;
> +     struct xen_pmu_data *xenpmu_data;
> +
> +     BUILD_BUG_ON(sizeof(struct xen_pmu_data) > PAGE_SIZE);
> +     xenpmu_data = vzalloc(PAGE_SIZE);

Why vzalloc() for something that is only a page in size?


Xen-devel mailing list



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