view xen/include/xen/numa.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
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

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 <>
author Keir Fraser <>
date Thu Jun 18 10:14:16 2009 +0100 (2009-06-18)
parents b1c0a0896488
line source
1 #ifndef _XEN_NUMA_H
2 #define _XEN_NUMA_H
4 #include <xen/config.h>
5 #include <asm/numa.h>
7 #ifndef NODES_SHIFT
8 #define NODES_SHIFT 0
9 #endif
11 #define NUMA_NO_NODE 0xFF
13 #define MAX_NUMNODES (1 << NODES_SHIFT)
15 #define vcpu_to_node(v) (cpu_to_node((v)->processor))
17 #define domain_to_node(d) \
18 (((d)->vcpu != NULL && (d)->vcpu[0] != NULL) \
19 ? vcpu_to_node((d)->vcpu[0]) : NUMA_NO_NODE)
21 #endif /* _XEN_NUMA_H */