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

Re: [Xen-devel] [PATCH v2 06/13] x86/PMU: Add public xenpmu.h



On 09/30/2013 09:30 AM, Jan Beulich wrote:
On 30.09.13 at 15:25, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
On 09/25/2013 10:04 AM, Jan Beulich wrote:
On 20.09.13 at 11:42, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
+/* Intel PMU registers and structures */
+#define XENPMU_CORE2_MAX_ARCH_PMCS     16
+#define XENPMU_CORE2_MAX_FIXED_PMCS    4
+struct core2_vpmu_context {
+    uint64_t global_ctrl;
+    uint64_t global_ovf_ctrl;
+    uint64_t global_status;
+    uint64_t global_ovf_status;
+    uint64_t fixed_ctrl;
+    uint64_t ds_area;
+    uint64_t pebs_enable;
+    uint64_t debugctl;
+    uint64_t fix_counters[XENPMU_CORE2_MAX_FIXED_PMCS];
+    struct {
+        uint64_t counter;
+        uint64_t control;
+    } arch_msr_pair[XENPMU_CORE2_MAX_ARCH_PMCS];
+};
I realize that using embedded arrays in both AMD and Intel
structures makes things easier to implement, but it reduces
forward compatibility. I'd therefore prefer those to be made
handles.
(I missed this comment earlier).

This is not done because it's easier but because I need to keep the
structure in a shared page.
Then a more dynamic layout (with just the array base offset in the
page specified in the structure) would still be preferable as being
more extensible.



I'll see how I can do this, I am afraid this may end up being a bit too convoluted (the arrays will still need to be part of some structure with decribes a context).

-boris

_______________________________________________
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®.