Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
fa1ceca2
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fa1ceca2
编写于
5月 14, 2009
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* src/xend_internal.c: remove [] around cpumaps for recent xend
patch by Tatsuro Enokura daniel
上级
ee0d7552
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
2 deletion
+25
-2
ChangeLog
ChangeLog
+5
-0
src/xend_internal.c
src/xend_internal.c
+20
-2
未找到文件。
ChangeLog
浏览文件 @
fa1ceca2
Thu May 14 12:29:41 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c: remove [] around cpumaps for recent xend
patch by Tatsuro Enokura
Wed May 13 13:37:02 EDT 2009 Cole Robinson <crobinso@redhat.com>
* src/virsh.c: Fix a few 'used uninitialized' warnings.
...
...
src/xend_internal.c
浏览文件 @
fa1ceca2
...
...
@@ -3765,6 +3765,11 @@ xenDaemonDomainSetVcpus(virDomainPtr domain, unsigned int vcpus)
* @maplen: length of cpumap in bytes
*
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
* NOTE: The XenD cpu affinity map format changed from "[0,1,2]" to
* "0,1,2"
* the XenD cpu affinity works only after cset 19579.
* there is no fine grained xend version detection possible, so we
* use the old format for anything before version 3
*
* Returns 0 for success; -1 (with errno) on error
*/
...
...
@@ -3772,8 +3777,9 @@ int
xenDaemonDomainPinVcpu
(
virDomainPtr
domain
,
unsigned
int
vcpu
,
unsigned
char
*
cpumap
,
int
maplen
)
{
char
buf
[
VIR_UUID_BUFLEN
],
mapstr
[
sizeof
(
cpumap_t
)
*
64
]
=
"["
;
char
buf
[
VIR_UUID_BUFLEN
],
mapstr
[
sizeof
(
cpumap_t
)
*
64
];
int
i
,
j
;
xenUnifiedPrivatePtr
priv
;
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
)
||
(
domain
->
name
==
NULL
)
||
(
cpumap
==
NULL
)
||
(
maplen
<
1
)
||
(
maplen
>
(
int
)
sizeof
(
cpumap_t
)))
{
...
...
@@ -3782,13 +3788,25 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
return
(
-
1
);
}
priv
=
(
xenUnifiedPrivatePtr
)
domain
->
conn
->
privateData
;
if
(
priv
->
xendConfigVersion
<
3
)
{
buf
[
0
]
=
']'
;
buf
[
1
]
=
0
;
}
else
{
buf
[
0
]
=
0
;
}
/* from bit map, build character string of mapped CPU numbers */
for
(
i
=
0
;
i
<
maplen
;
i
++
)
for
(
j
=
0
;
j
<
8
;
j
++
)
if
(
cpumap
[
i
]
&
(
1
<<
j
))
{
snprintf
(
buf
,
sizeof
(
buf
),
"%d,"
,
(
8
*
i
)
+
j
);
strcat
(
mapstr
,
buf
);
}
mapstr
[
strlen
(
mapstr
)
-
1
]
=
']'
;
if
(
priv
->
xendConfigVersion
<
3
)
mapstr
[
strlen
(
mapstr
)
-
1
]
=
']'
;
else
mapstr
[
strlen
(
mapstr
)
-
1
]
=
0
;
snprintf
(
buf
,
sizeof
(
buf
),
"%d"
,
vcpu
);
return
(
xend_op
(
domain
->
conn
,
domain
->
name
,
"op"
,
"pincpu"
,
"vcpu"
,
buf
,
"cpumap"
,
mapstr
,
NULL
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录