aboutsummaryrefslogtreecommitdiffstats
path: root/tools/debugger
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-18 10:14:16 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-18 10:14:16 +0100
commitfb442e217186a5bc3ed7ec84f0b683b708609eac (patch)
treeb8f199e985285357b03ca679c4eb352c7000bb19 /tools/debugger
parenta5c98899b234c23f43dae0f7dd58649a666d070e (diff)
downloadxen-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/debugger')
-rw-r--r--tools/debugger/xenitp/xenitp.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/debugger/xenitp/xenitp.c b/tools/debugger/xenitp/xenitp.c
index 95d3820f94..847d7bd7a6 100644
--- a/tools/debugger/xenitp/xenitp.c
+++ b/tools/debugger/xenitp/xenitp.c
@@ -955,7 +955,7 @@ char *parse_arg (char **buf)
return res;
}
-vcpu_guest_context_any_t vcpu_ctx_any[MAX_VIRT_CPUS];
+vcpu_guest_context_any_t *vcpu_ctx_any;
int vcpu_setcontext (int vcpu)
{
@@ -1584,11 +1584,23 @@ void xenitp (int vcpu)
{
int ret;
struct sigaction sa;
-
- cur_ctx = &vcpu_ctx_any[vcpu].c;
+ xc_dominfo_t dominfo;
xc_handle = xc_interface_open (); /* for accessing control interface */
+ ret = xc_domain_getinfo (xc_handle, domid, 1, &dominfo);
+ if (ret < 0) {
+ perror ("xc_domain_getinfo");
+ exit (-1);
+ }
+
+ vcpu_ctx_any = calloc (sizeof(vcpu_ctx_any), dominfo.max_vcpu_id + 1);
+ if (!vcpu_ctx_any) {
+ perror ("vcpu context array alloc");
+ exit (-1);
+ }
+ cur_ctx = &vcpu_ctx_any[vcpu].c;
+
if (xc_domain_setdebugging (xc_handle, domid, 1) != 0)
perror ("setdebugging");