debuggers.hg

view xen/include/xen/xenoprof.h @ 19826:2f9e1348aa98

x86_64: allow more vCPU-s per guest

Since the shared info layout is fixed, guests are required to use
VCPUOP_register_vcpu_info prior to booting any vCPU beyond the
traditional limit of 32.

MAX_VIRT_CPUS, being an implemetation detail of the hypervisor, is no
longer being exposed in the public headers.

The tools changes are clearly incomplete (and done only so things
would
build again), and the current state of the tools (using scalar
variables all over the place to represent vCPU bitmaps) very likely
doesn't permit booting DomU-s with more than the traditional number of
vCPU-s. Testing of the extended functionality was done with Dom0 (96
vCPU-s, as well as 128 vCPU-s out of which the kernel elected - by way
of a simple kernel side patch - to use only some, resulting in a
sparse
bitmap).

ia64 changes only to make things build, and build-tested only (and the
tools part only as far as the build would go without encountering
unrelated problems in the blktap code).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 18 10:14:16 2009 +0100 (2009-06-18)
parents 033945166a3a
children c6b22d0d1e90
line source
1 /******************************************************************************
2 * xenoprof.h
3 *
4 * Xenoprof: Xenoprof enables performance profiling in Xen
5 *
6 * Copyright (C) 2005 Hewlett-Packard Co.
7 * written by Aravind Menon & Jose Renato Santos
8 */
10 #ifndef __XEN_XENOPROF_H__
11 #define __XEN_XENOPROF_H__
13 #include <xen/config.h>
14 #include <public/xenoprof.h>
15 #include <asm/xenoprof.h>
17 #define XENOPROF_DOMAIN_IGNORED 0
18 #define XENOPROF_DOMAIN_ACTIVE 1
19 #define XENOPROF_DOMAIN_PASSIVE 2
21 #define XENOPROF_IDLE 0
22 #define XENOPROF_INITIALIZED 1
23 #define XENOPROF_COUNTERS_RESERVED 2
24 #define XENOPROF_READY 3
25 #define XENOPROF_PROFILING 4
27 #ifndef CONFIG_COMPAT
28 typedef struct xenoprof_buf xenoprof_buf_t;
29 #else
30 #include <compat/xenoprof.h>
31 typedef union {
32 struct xenoprof_buf native;
33 struct compat_oprof_buf compat;
34 } xenoprof_buf_t;
35 #endif
37 struct xenoprof_vcpu {
38 int event_size;
39 xenoprof_buf_t *buffer;
40 };
42 struct xenoprof {
43 char *rawbuf;
44 int npages;
45 int nbuf;
46 int bufsize;
47 int domain_type;
48 int domain_ready;
49 int is_primary;
50 #ifdef CONFIG_COMPAT
51 int is_compat;
52 #endif
53 struct xenoprof_vcpu *vcpu;
54 };
56 #ifndef CONFIG_COMPAT
57 #define XENOPROF_COMPAT(x) 0
58 #define xenoprof_buf(d, b, field) ((b)->field)
59 #else
60 #define XENOPROF_COMPAT(x) ((x)->is_compat)
61 #define xenoprof_buf(d, b, field) (*(!(d)->xenoprof->is_compat ? \
62 &(b)->native.field : \
63 &(b)->compat.field))
64 #endif
66 struct domain;
67 void free_xenoprof_pages(struct domain *d);
69 int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
70 int xenoprof_add_trace(struct domain *d, struct vcpu *v,
71 unsigned long eip, int mode);
73 #define PMU_OWNER_NONE 0
74 #define PMU_OWNER_XENOPROF 1
75 #define PMU_OWNER_HVM 2
76 int acquire_pmu_ownship(int pmu_ownership);
77 void release_pmu_ownship(int pmu_ownership);
79 #endif /* __XEN__XENOPROF_H__ */