diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-14 15:40:48 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-14 15:40:48 +0100 |
commit | 30ce2a9295a53f989897497df0c195dc597b00d6 (patch) | |
tree | ed5447796448766566eadbae7fcc7fb10b1466dc /tools/libxc/xc_core.c | |
parent | 5dc12fe2424c7cbaffd1292083a5c30ecb9d965c (diff) | |
download | xen-30ce2a9295a53f989897497df0c195dc597b00d6.tar.gz xen-30ce2a9295a53f989897497df0c195dc597b00d6.tar.bz2 xen-30ce2a9295a53f989897497df0c195dc597b00d6.zip |
Store an opaque handle (tools uuid) in the domain structure
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r-- | tools/libxc/xc_core.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 7c24b0b0bf..4694c0fe2f 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -33,7 +33,7 @@ xc_domain_dumpcore(int xc_handle, unsigned long nr_pages; unsigned long *page_array; xc_dominfo_t info; - int i, j, vcpu_map_size, dump_fd; + int i, j, dump_fd; char *dump_mem, *dump_mem_start = NULL; struct xc_core_header header; vcpu_guest_context_t ctxt[MAX_VIRT_CPUS]; @@ -54,18 +54,9 @@ xc_domain_dumpcore(int xc_handle, goto error_out; } - vcpu_map_size = sizeof(info.vcpu_to_cpu) / sizeof(info.vcpu_to_cpu[0]); - - for (i = 0, j = 0; i < vcpu_map_size; i++) { - if (info.vcpu_to_cpu[i] == -1) { - continue; - } - if (xc_domain_get_vcpu_context(xc_handle, domid, i, &ctxt[j])) { - PERROR("Could not get all vcpu contexts for domain"); - goto error_out; - } - j++; - } + for (i = 0, j = 0; i < 32; i++) + if (xc_domain_get_vcpu_context(xc_handle, domid, i, &ctxt[j]) == 0) + j++; nr_pages = info.nr_pages; |