ia64/xen-unstable

diff xen/include/xen/sched.h @ 19788: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
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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 18 10:14:16 2009 +0100 (2009-06-18)
parents 8dd5c3cae086
children
line diff
     1.1 --- a/xen/include/xen/sched.h	Thu Jun 18 10:05:23 2009 +0100
     1.2 +++ b/xen/include/xen/sched.h	Thu Jun 18 10:14:16 2009 +0100
     1.3 @@ -180,6 +180,8 @@ struct domain
     1.4      unsigned int     max_pages;       /* maximum value for tot_pages        */
     1.5      unsigned int     xenheap_pages;   /* # pages allocated from Xen heap    */
     1.6  
     1.7 +    unsigned int     max_vcpus;
     1.8 +
     1.9      /* Scheduling. */
    1.10      void            *sched_priv;    /* scheduler-specific data */
    1.11  
    1.12 @@ -226,7 +228,11 @@ struct domain
    1.13      bool_t           is_pinned;
    1.14  
    1.15      /* Are any VCPUs polling event channels (SCHEDOP_poll)? */
    1.16 +#if MAX_VIRT_CPUS <= BITS_PER_LONG
    1.17      DECLARE_BITMAP(poll_mask, MAX_VIRT_CPUS);
    1.18 +#else
    1.19 +    unsigned long   *poll_mask;
    1.20 +#endif
    1.21  
    1.22      /* Guest has shut down (inc. reason code)? */
    1.23      spinlock_t       shutdown_lock;
    1.24 @@ -244,7 +250,7 @@ struct domain
    1.25  
    1.26      atomic_t         refcnt;
    1.27  
    1.28 -    struct vcpu *vcpu[MAX_VIRT_CPUS];
    1.29 +    struct vcpu    **vcpu;
    1.30  
    1.31      /* Bitmask of CPUs which are holding onto this domain's state. */
    1.32      cpumask_t        domain_dirty_cpumask;
    1.33 @@ -497,7 +503,7 @@ extern struct domain *domain_list;
    1.34         (_d) = rcu_dereference((_d)->next_in_list )) \
    1.35  
    1.36  #define for_each_vcpu(_d,_v)                    \
    1.37 - for ( (_v) = (_d)->vcpu[0];                    \
    1.38 + for ( (_v) = (_d)->vcpu ? (_d)->vcpu[0] : NULL; \
    1.39         (_v) != NULL;                            \
    1.40         (_v) = (_v)->next_in_list )
    1.41