ia64/xen-unstable

changeset 14388:127bee61972b

xm: Allow vcpu-pin to specify 'all' for CPU list.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Tue Mar 13 14:56:03 2007 +0000 (2007-03-13)
parents 40a6e2280d7b
children 3c38150de7fd
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Tue Mar 13 14:04:31 2007 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Tue Mar 13 14:56:03 2007 +0000
     1.3 @@ -139,7 +139,7 @@ SUBCOMMAND_HELP = {
     1.4                       'Send a trigger to a domain.'),
     1.5      'vcpu-list'   : ('[<Domain>]',
     1.6                       'List the VCPUs for a domain or all domains.'),
     1.7 -    'vcpu-pin'    : ('<Domain> <VCPU> <CPUs>',
     1.8 +    'vcpu-pin'    : ('<Domain> <VCPU> <CPUs|all>',
     1.9                       'Set which CPUs a VCPU can use.'),
    1.10      'vcpu-set'    : ('<Domain> <vCPUs>',
    1.11                       'Set the number of active VCPUs for allowed for the'
    1.12 @@ -1084,7 +1084,10 @@ def xm_vcpu_pin(args):
    1.13  
    1.14      dom  = args[0]
    1.15      vcpu = args[1]
    1.16 -    cpumap = cpu_make_map(args[2])
    1.17 +    if args[2] == 'all':
    1.18 +        cpumap = cpu_make_map('0-63')
    1.19 +    else:
    1.20 +        cpumap = cpu_make_map(args[2])
    1.21      
    1.22      server.xend.domain.pincpu(dom, vcpu, cpumap)
    1.23