Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
4746c2f9
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4746c2f9
编写于
9月 10, 2013
作者:
Y
Yang Feng
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #694 from FengYang/sr-iov
sr-iov: Update PciAssignable class to support more feature.
上级
90bd0970
57204bf9
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
22 addition
and
5 deletion
+22
-5
qemu/tests/cfg/sr_iov.cfg
qemu/tests/cfg/sr_iov.cfg
+1
-1
qemu/tests/sr_iov_hotplug.py
qemu/tests/sr_iov_hotplug.py
+12
-2
qemu/tests/sr_iov_hotplug_negative.py
qemu/tests/sr_iov_hotplug_negative.py
+9
-2
未找到文件。
qemu/tests/cfg/sr_iov.cfg
浏览文件 @
4746c2f9
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
pci_assignable_nic2 = vf
pci_assignable_nic2 = vf
- vf_boot_vms:
- vf_boot_vms:
type = boot
type = boot
vms
= 'vm1
vm2'
vms
+= '
vm2'
nics = 'nic1 nic2'
nics = 'nic1 nic2'
pci_assignable = vf
pci_assignable = vf
image_snapshot = yes
image_snapshot = yes
...
...
qemu/tests/sr_iov_hotplug.py
浏览文件 @
4746c2f9
import
re
import
re
import
logging
import
logging
from
autotest.client.shared
import
error
from
autotest.client.shared
import
error
from
virttest
import
utils_misc
,
aexpect
,
utils_test
from
virttest
import
utils_misc
,
aexpect
,
utils_test
,
utils_net
@
error
.
context_aware
@
error
.
context_aware
...
@@ -180,8 +180,18 @@ def run_sr_iov_hotplug(test, params, env):
...
@@ -180,8 +180,18 @@ def run_sr_iov_hotplug(test, params, env):
pci_model
=
params
.
get
(
"pci_model"
,
"pci-assign"
)
pci_model
=
params
.
get
(
"pci_model"
,
"pci-assign"
)
# Need udpate match_string if you use a card other than 82576
# Need udpate match_string if you use a card other than 82576
match_string
=
params
.
get
(
"match_string"
,
"82576"
)
match_string
=
params
.
get
(
"match_string"
,
"82576"
)
devices
=
[]
device_type
=
params
.
get
(
"hotplug_device_type"
,
"vf"
)
for
i
in
xrange
(
pci_num_range
):
device
=
{}
device
[
"type"
]
=
device_type
device
[
'mac'
]
=
utils_net
.
generate_mac_address_simple
()
if
params
.
get
(
"device_name"
):
device
[
"name"
]
=
params
.
get
(
"device_name"
)
devices
.
append
(
device
)
if
vm
.
pci_assignable
is
not
None
:
if
vm
.
pci_assignable
is
not
None
:
pa_pci_ids
=
vm
.
pci_assignable
.
request_devs
(
pci_num_range
)
pa_pci_ids
=
vm
.
pci_assignable
.
request_devs
(
devices
)
# Modprobe the module if specified in config file
# Modprobe the module if specified in config file
module
=
params
.
get
(
"modprobe_module"
)
module
=
params
.
get
(
"modprobe_module"
)
...
...
qemu/tests/sr_iov_hotplug_negative.py
浏览文件 @
4746c2f9
...
@@ -2,7 +2,7 @@ import logging
...
@@ -2,7 +2,7 @@ import logging
import
os
import
os
from
autotest.client.shared
import
error
from
autotest.client.shared
import
error
from
autotest.client
import
utils
from
autotest.client
import
utils
from
virttest
import
utils_test
,
utils_misc
from
virttest
import
utils_test
,
utils_misc
,
utils_net
@
error
.
context_aware
@
error
.
context_aware
...
@@ -58,8 +58,15 @@ def run_sr_iov_hotplug_negative(test, params, env):
...
@@ -58,8 +58,15 @@ def run_sr_iov_hotplug_negative(test, params, env):
msg
=
"Try to remove sr-iov module in host."
msg
=
"Try to remove sr-iov module in host."
error
.
context
(
msg
,
logging
.
info
)
error
.
context
(
msg
,
logging
.
info
)
utils
.
system
(
modprobe_cmd
)
utils
.
system
(
modprobe_cmd
)
device
=
{}
device
[
"type"
]
=
params
.
get
(
"hotplug_device_type"
,
"vf"
)
device
[
'mac'
]
=
utils_net
.
generate_mac_address_simple
()
if
params
.
get
(
"device_name"
):
device
[
"name"
]
=
params
.
get
(
"device_name"
)
if
vm
.
pci_assignable
is
not
None
:
if
vm
.
pci_assignable
is
not
None
:
pa_pci_ids
=
vm
.
pci_assignable
.
request_devs
(
1
)
pa_pci_ids
=
vm
.
pci_assignable
.
request_devs
(
device
)
# Probe qemu to verify what is the supported syntax for PCI hotplug
# Probe qemu to verify what is the supported syntax for PCI hotplug
if
vm
.
monitor
.
protocol
==
'qmp'
:
if
vm
.
monitor
.
protocol
==
'qmp'
:
cmd_output
=
vm
.
monitor
.
info
(
"commands"
)
cmd_output
=
vm
.
monitor
.
info
(
"commands"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录