Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
49ecf3da
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49ecf3da
编写于
5月 11, 2016
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cpu_x86: Rename struct x86_vendor
Signed-off-by:
N
Jiri Denemark
<
jdenemar@redhat.com
>
上级
c7d6c139
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
14 deletion
+16
-14
src/cpu/cpu_x86.c
src/cpu/cpu_x86.c
+16
-14
未找到文件。
src/cpu/cpu_x86.c
浏览文件 @
49ecf3da
...
...
@@ -44,11 +44,13 @@ static const virCPUx86CPUID cpuidNull = { 0, 0, 0, 0, 0 };
static
const
virArch
archs
[]
=
{
VIR_ARCH_I686
,
VIR_ARCH_X86_64
};
struct
x86_vendor
{
typedef
struct
_virCPUx86Vendor
virCPUx86Vendor
;
typedef
virCPUx86Vendor
*
virCPUx86VendorPtr
;
struct
_virCPUx86Vendor
{
char
*
name
;
virCPUx86CPUID
cpuid
;
struct
x86_vendor
*
next
;
virCPUx86VendorPtr
next
;
};
struct
x86_feature
{
...
...
@@ -87,14 +89,14 @@ static const struct x86_kvm_feature x86_kvm_features[] =
struct
x86_model
{
char
*
name
;
const
struct
x86_vendor
*
vendor
;
virCPUx86VendorPtr
vendor
;
virCPUx86Data
*
data
;
struct
x86_model
*
next
;
};
struct
x86_map
{
struct
x86_vendor
*
vendors
;
virCPUx86VendorPtr
vendors
;
struct
x86_feature
*
features
;
struct
x86_model
*
models
;
struct
x86_feature
*
migrate_blockers
;
...
...
@@ -418,11 +420,11 @@ x86DataToCPUFeatures(virCPUDefPtr cpu,
/* also removes bits corresponding to vendor string from data */
static
const
struct
x86_vendor
*
static
virCPUx86VendorPtr
x86DataToVendor
(
virCPUx86Data
*
data
,
const
struct
x86_map
*
map
)
{
const
struct
x86_vendor
*
vendor
=
map
->
vendors
;
virCPUx86VendorPtr
vendor
=
map
->
vendors
;
virCPUx86CPUID
*
cpuid
;
while
(
vendor
)
{
...
...
@@ -446,7 +448,7 @@ x86DataToCPU(const virCPUx86Data *data,
virCPUDefPtr
cpu
;
virCPUx86Data
*
copy
=
NULL
;
virCPUx86Data
*
modelData
=
NULL
;
const
struct
x86_vendor
*
vendor
;
virCPUx86VendorPtr
vendor
;
if
(
VIR_ALLOC
(
cpu
)
<
0
||
VIR_STRDUP
(
cpu
->
model
,
model
->
name
)
<
0
||
...
...
@@ -481,7 +483,7 @@ x86DataToCPU(const virCPUx86Data *data,
static
void
x86VendorFree
(
struct
x86_vendor
*
vendor
)
x86VendorFree
(
virCPUx86VendorPtr
vendor
)
{
if
(
!
vendor
)
return
;
...
...
@@ -491,11 +493,11 @@ x86VendorFree(struct x86_vendor *vendor)
}
static
struct
x86_vendor
*
static
virCPUx86VendorPtr
x86VendorFind
(
const
struct
x86_map
*
map
,
const
char
*
name
)
{
struct
x86_vendor
*
vendor
;
virCPUx86VendorPtr
vendor
;
vendor
=
map
->
vendors
;
while
(
vendor
)
{
...
...
@@ -513,7 +515,7 @@ static int
x86VendorLoad
(
xmlXPathContextPtr
ctxt
,
struct
x86_map
*
map
)
{
struct
x86_vendor
*
vendor
=
NULL
;
virCPUx86VendorPtr
vendor
=
NULL
;
char
*
string
=
NULL
;
int
ret
=
0
;
...
...
@@ -1136,7 +1138,7 @@ x86MapFree(struct x86_map *map)
}
while
(
map
->
vendors
!=
NULL
)
{
struct
x86_vendor
*
vendor
=
map
->
vendors
;
virCPUx86VendorPtr
vendor
=
map
->
vendors
;
map
->
vendors
=
vendor
->
next
;
x86VendorFree
(
vendor
);
}
...
...
@@ -1785,7 +1787,7 @@ x86Encode(virArch arch,
}
if
(
vendor
)
{
const
struct
x86_vendor
*
v
=
NULL
;
virCPUx86VendorPtr
v
=
NULL
;
if
(
cpu
->
vendor
&&
!
(
v
=
x86VendorFind
(
map
,
cpu
->
vendor
)))
{
virReportError
(
VIR_ERR_OPERATION_FAILED
,
...
...
@@ -1939,7 +1941,7 @@ x86Baseline(virCPUDefPtr *cpus,
struct
x86_model
*
base_model
=
NULL
;
virCPUDefPtr
cpu
=
NULL
;
size_t
i
;
const
struct
x86_vendor
*
vendor
=
NULL
;
virCPUx86VendorPtr
vendor
=
NULL
;
struct
x86_model
*
model
=
NULL
;
bool
outputVendor
=
true
;
const
char
*
modelName
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录