diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-18 10:14:16 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-18 10:14:16 +0100 |
commit | fb442e217186a5bc3ed7ec84f0b683b708609eac (patch) | |
tree | b8f199e985285357b03ca679c4eb352c7000bb19 /tools/libxc/xc_core.c | |
parent | a5c98899b234c23f43dae0f7dd58649a666d070e (diff) | |
download | xen-fb442e217186a5bc3ed7ec84f0b683b708609eac.tar.gz xen-fb442e217186a5bc3ed7ec84f0b683b708609eac.tar.bz2 xen-fb442e217186a5bc3ed7ec84f0b683b708609eac.zip |
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>
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r-- | tools/libxc/xc_core.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index ef1e8dd7a1..8121a08bf0 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -430,7 +430,7 @@ xc_domain_dumpcore_via_callback(int xc_handle, int nr_vcpus = 0; char *dump_mem, *dump_mem_start = NULL; - vcpu_guest_context_any_t ctxt[MAX_VIRT_CPUS]; + vcpu_guest_context_any_t *ctxt = NULL; struct xc_core_arch_context arch_ctxt; char dummy[PAGE_SIZE]; int dummy_len; @@ -495,6 +495,13 @@ xc_domain_dumpcore_via_callback(int xc_handle, goto out; } + ctxt = calloc(sizeof(*ctxt), info.max_vcpu_id + 1); + if ( !ctxt ) + { + PERROR("Could not allocate vcpu context array", domid); + goto out; + } + for ( i = 0; i <= info.max_vcpu_id; i++ ) { if ( xc_vcpu_getcontext(xc_handle, domid, i, &ctxt[nr_vcpus]) == 0 ) @@ -900,6 +907,8 @@ out: xc_core_shdr_free(sheaders); if ( strtab != NULL ) xc_core_strtab_free(strtab); + if ( ctxt != NULL ) + free(ctxt); if ( dump_mem_start != NULL ) free(dump_mem_start); if ( live_shinfo != NULL ) |