From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>, konrad.wilk@oracle.com
Cc: andrew.cooper3@citrix.com, kevin.tian@intel.com,
dietmar.hahn@ts.fujitsu.com, jbeulich@suse.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v3 3/6] xen/PMU: Initialization code for Xen PMU
Date: Mon, 07 Jul 2014 10:17:40 -0400 [thread overview]
Message-ID: <53BAAC04.7000009@oracle.com> (raw)
In-Reply-To: <53B6877C.5040902@citrix.com>
On 07/04/2014 06:52 AM, David Vrabel wrote:
> 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?
I need it page-aligned and I don't think kmalloc() guarantees that (the
implementation might, but not the interface itself). I can use
__get_free_page(), I suppose.
-boris
next prev parent reply other threads:[~2014-07-07 14:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 19:14 [PATCH v3 0/6] xen/PMU: PMU support for Xen PV guests Boris Ostrovsky
2014-07-03 19:14 ` [PATCH v3 1/6] xen: xensyms support Boris Ostrovsky
2014-07-04 10:14 ` David Vrabel
2014-07-03 19:14 ` [PATCH v3 2/6] xen/PMU: Sysfs interface for setting Xen PMU mode Boris Ostrovsky
2014-07-04 10:27 ` David Vrabel
2014-07-07 14:04 ` Boris Ostrovsky
2014-07-07 14:03 ` David Vrabel
2014-07-03 19:14 ` [PATCH v3 3/6] xen/PMU: Initialization code for Xen PMU Boris Ostrovsky
2014-07-04 10:52 ` David Vrabel
2014-07-07 14:17 ` Boris Ostrovsky [this message]
2014-07-03 19:14 ` [PATCH v3 4/6] xen/PMU: Describe vendor-specific PMU registers Boris Ostrovsky
2014-07-04 10:41 ` David Vrabel
2014-07-07 14:13 ` Boris Ostrovsky
2014-07-03 19:14 ` [PATCH v3 5/6] xen/PMU: Intercept PMU-related MSR and APIC accesses Boris Ostrovsky
2014-07-04 13:53 ` David Vrabel
2014-07-03 19:14 ` [PATCH v3 6/6] xen/PMU: PMU emulation code Boris Ostrovsky
2014-07-04 14:05 ` David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BAAC04.7000009@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=dietmar.hahn@ts.fujitsu.com \
--cc=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.