From: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Cc: Wei.Huang2@amd.com
Subject: [PATCH] Fix xm vcpu-pin for Domain-0
Date: Wed, 09 Jul 2008 15:58:00 +0900 [thread overview]
Message-ID: <66C8E1911FD9DAkanno.masaki@jp.fujitsu.com> (raw)
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 1142 bytes --]
Hi,
A bogus error message is shown with the latest xen-unstable when
using xm vcpu-pin command to Domain-0 and guest domains. I send
a patch solving the issue.
# xm vcpu-pin Domain-0 0 0
Error: Cannot pin vcpu: 0 to cpu: [0] - list assignment index out of range
Usage: xm vcpu-pin <Domain> <VCPU|all> <CPUs|all>
Set which CPUs a VCPU can use.
# xm vcpu-list Domain-0
Name ID VCPU CPU State Time(s) CPU Affinity
Domain-0 0 0 0 r-- 52.1 0
Domain-0 0 1 1 -b- 27.0 any cpu
# xm create vm1
Using config file "/etc/xen/vm1".
Started domain vm1
# xend stop
# xend start
# xm vcpu-pin vm1 0 0
Error: Cannot pin vcpu: 0 to cpu: [0] - list assignment index out of range
Usage: xm vcpu-pin <Domain> <VCPU|all> <CPUs|all>
Set which CPUs a VCPU can use.
# xm vcpu-list vm1
Name ID VCPU CPU State Time(s) CPU Affinity
vm1 1 0 0 -b- 31.2 0
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Best regards,
Kan
[-- Attachment #2: vcpupin.patch --]
[-- Type: application/octet-stream, Size: 786 bytes --]
diff -r bd97e45e073a tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Jul 08 09:28:50 2008 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Wed Jul 09 15:12:18 2008 +0900
@@ -1129,6 +1129,12 @@ class XendDomainInfo:
else:
self.info[arg] = val
+ # read CPU Affinity
+ self.info['cpus'] = []
+ vcpus_info = self.getVCPUInfo()
+ for vcpu_info in sxp.children(vcpus_info, 'vcpu'):
+ self.info['cpus'].append(sxp.child_value(vcpu_info, 'cpumap'))
+
# For dom0, we ignore any stored value for the vcpus fields, and
# read the current value from Xen instead. This allows boot-time
# settings to take precedence over any entries in the store.
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2008-07-09 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 6:58 Masaki Kanno [this message]
2008-07-09 7:38 ` [PATCH] Fix xm vcpu-pin for Domain-0 Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66C8E1911FD9DAkanno.masaki@jp.fujitsu.com \
--to=kanno.masaki@jp.fujitsu.com \
--cc=Wei.Huang2@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.