ia64/xen-unstable

changeset 18573:8dc05a2b3beb

xc_ptrace: Allow gdbserver to connect to a guest before APs are
brought online.

Signed-off-by: Kip Macy <kmacy@freebsd.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Oct 02 11:32:08 2008 +0100 (2008-10-02)
parents 60937c4c5a67
children 9a7b46546e05
files tools/libxc/xc_ptrace.c
line diff
     1.1 --- a/tools/libxc/xc_ptrace.c	Thu Oct 02 10:37:28 2008 +0100
     1.2 +++ b/tools/libxc/xc_ptrace.c	Thu Oct 02 11:32:08 2008 +0100
     1.3 @@ -112,17 +112,16 @@ static int
     1.4  get_online_cpumap(int xc_handle, struct xen_domctl_getdomaininfo *d,
     1.5                    uint64_t *cpumap)
     1.6  {
     1.7 -    int i, online, retval;
     1.8 +    int i, online;
     1.9  
    1.10      *cpumap = 0;
    1.11      for (i = 0; i <= d->max_vcpu_id; i++) {
    1.12 -        if ((retval = fetch_regs(xc_handle, i, &online)))
    1.13 -            return retval;
    1.14 +        fetch_regs(xc_handle, i, &online);
    1.15          if (online)
    1.16              *cpumap |= (1 << i);
    1.17      }
    1.18 -
    1.19 -    return 0;
    1.20 +    
    1.21 +    return (*cpumap == 0) ? -1 : 0;
    1.22  }
    1.23  
    1.24  /*