Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
1f4d541e
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,发现更多精彩内容 >>
提交
1f4d541e
编写于
2月 28, 2013
作者:
I
Igor Mammedov
提交者:
Lucas Meneghel Rodrigues
2月 28, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu:cpuid: hv_relaxed and hv_vapic tests
Signed-off-by:
N
Igor Mammedov
<
imammedo@redhat.com
>
上级
4050016b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
50 addition
and
0 deletion
+50
-0
qemu/tests/cfg/qemu_cpu.cfg
qemu/tests/cfg/qemu_cpu.cfg
+21
-0
qemu/tests/cpuid.py
qemu/tests/cpuid.py
+29
-0
未找到文件。
qemu/tests/cfg/qemu_cpu.cfg
浏览文件 @
1f4d541e
...
...
@@ -143,6 +143,27 @@
leaf
=
"0x40000001"
flags
=
"hv_relaxed"
regs
=
"eax"
-
hyperv
:
only
kvm
only
cpu
.
unset
test_type
=
"cpuid_bit_test"
variants
:
-
vapic40000003
:
bits
=
"4 5"
leaf
=
"0x40000003"
flags
=
"hv_vapic"
-
relaxed40000003
:
bits
=
"5"
leaf
=
"0x40000003"
flags
=
"hv_relaxed"
-
vapic40000004
:
bits
=
"3"
leaf
=
"0x40000004"
flags
=
"hv_vapic"
-
relaxed40000004
:
bits
=
"5"
leaf
=
"0x40000004"
flags
=
"hv_relaxed"
-
custom
:
#
the
checks
below
will
be
run
without
setting
the
CPU
model
#
explicitly
.
they
can
be
repeated
for
each
known
CPU
model
...
...
qemu/tests/cpuid.py
浏览文件 @
1f4d541e
...
...
@@ -487,6 +487,35 @@ def run_cpuid(test, params, env):
if
(
has_error
is
False
)
and
(
xfail
is
True
):
raise
error
.
TestFail
(
"Test was expected to fail, but it didn't"
)
class
cpuid_bit_test
(
MiniSubtest
):
"""
test bits in specified leaf:func:reg
"""
def
test
(
self
):
has_error
=
False
flags
=
params
.
get
(
"flags"
,
""
)
leaf
=
params
.
get
(
"leaf"
,
"0x40000000"
)
idx
=
params
.
get
(
"index"
,
"0x00"
)
reg
=
params
.
get
(
"reg"
,
"eax"
)
if
params
.
get
(
"bits"
)
is
None
:
raise
error
.
TestNAError
(
"'bits' must be specified in"
"config for this test"
)
bits
=
params
.
get
(
"bits"
).
split
()
try
:
out
=
get_guest_cpuid
(
self
,
cpu_model
,
flags
)
r
=
cpuid_regs_to_dic
(
'%s %s'
%
(
leaf
,
idx
),
out
)[
reg
]
logging
.
debug
(
"CPUID(%s.%s).%s=0x%08x"
%
(
leaf
,
idx
,
reg
,
r
))
for
i
in
bits
:
if
(
r
&
(
1
<<
int
(
i
)))
==
0
:
raise
error
.
TestFail
(
"CPUID(%s.%s).%s[%s] is not set"
%
(
leaf
,
idx
,
reg
,
i
))
except
:
has_error
=
True
if
xfail
is
False
:
raise
if
(
has_error
is
False
)
and
(
xfail
is
True
):
raise
error
.
TestFail
(
"Test was expected to fail, but it didn't"
)
# subtests runner
test_type
=
params
.
get
(
"test_type"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录