debuggers.hg
view xen/include/asm-x86/shared.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>
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 | af33f2054f47 |
children | 809b20f066fb |
line source
1 #ifndef __XEN_X86_SHARED_H__
2 #define __XEN_X86_SHARED_H__
4 #ifdef CONFIG_COMPAT
6 #define nmi_reason(d) (!has_32bit_shinfo(d) ? \
7 (u32 *)&(d)->shared_info->native.arch.nmi_reason : \
8 (u32 *)&(d)->shared_info->compat.arch.nmi_reason)
10 #define GET_SET_SHARED(type, field) \
11 static inline type arch_get_##field(const struct domain *d) \
12 { \
13 return !has_32bit_shinfo(d) ? \
14 d->shared_info->native.arch.field : \
15 d->shared_info->compat.arch.field; \
16 } \
17 static inline void arch_set_##field(struct domain *d, \
18 type val) \
19 { \
20 if ( !has_32bit_shinfo(d) ) \
21 d->shared_info->native.arch.field = val; \
22 else \
23 d->shared_info->compat.arch.field = val; \
24 }
26 #define GET_SET_VCPU(type, field) \
27 static inline type arch_get_##field(const struct vcpu *v) \
28 { \
29 if ( unlikely(!v->vcpu_info) ) \
30 return 0; \
31 return !has_32bit_shinfo(v->domain) ? \
32 v->vcpu_info->native.arch.field : \
33 v->vcpu_info->compat.arch.field; \
34 } \
35 static inline void arch_set_##field(struct vcpu *v, \
36 type val) \
37 { \
38 if ( !has_32bit_shinfo(v->domain) ) \
39 v->vcpu_info->native.arch.field = val; \
40 else \
41 v->vcpu_info->compat.arch.field = val; \
42 }
44 #else
46 #define nmi_reason(d) ((u32 *)&(d)->shared_info->arch.nmi_reason)
48 #define GET_SET_SHARED(type, field) \
49 static inline type arch_get_##field(const struct domain *d) \
50 { \
51 return d->shared_info->arch.field; \
52 } \
53 static inline void arch_set_##field(struct domain *d, \
54 type val) \
55 { \
56 d->shared_info->arch.field = val; \
57 }
59 #define GET_SET_VCPU(type, field) \
60 static inline type arch_get_##field(const struct vcpu *v) \
61 { \
62 return v->vcpu_info ? v->vcpu_info->arch.field : 0; \
63 } \
64 static inline void arch_set_##field(struct vcpu *v, \
65 type val) \
66 { \
67 v->vcpu_info->arch.field = val; \
68 }
69 #endif
71 GET_SET_SHARED(unsigned long, max_pfn)
72 GET_SET_SHARED(xen_pfn_t, pfn_to_mfn_frame_list_list)
73 GET_SET_SHARED(unsigned long, nmi_reason)
75 GET_SET_VCPU(unsigned long, cr2)
77 #undef GET_SET_VCPU
78 #undef GET_SET_SHARED
80 #endif /* __XEN_X86_SHARED_H__ */