Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
84d38307
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看板
提交
84d38307
编写于
4月 22, 2016
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Fill in CPU domain capabilities
Signed-off-by:
N
Jiri Denemark
<
jdenemar@redhat.com
>
上级
f2e71550
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
682 addition
and
22 deletion
+682
-22
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.c
+23
-1
src/qemu/qemu_capabilities.h
src/qemu/qemu_capabilities.h
+2
-1
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+6
-1
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
+28
-3
tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
+34
-3
tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
+34
-3
tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
+34
-3
tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
+434
-3
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
+32
-3
tests/domaincapstest.c
tests/domaincapstest.c
+55
-1
未找到文件。
src/qemu/qemu_capabilities.c
浏览文件 @
84d38307
...
...
@@ -4283,6 +4283,26 @@ virQEMUCapsFillDomainOSCaps(virDomainCapsOSPtr os,
}
static
int
virQEMUCapsFillDomainCPUCaps
(
virCapsPtr
caps
,
virQEMUCapsPtr
qemuCaps
,
virDomainCapsPtr
domCaps
)
{
if
(
domCaps
->
virttype
==
VIR_DOMAIN_VIRT_KVM
&&
virQEMUCapsGuestIsNative
(
caps
->
host
.
arch
,
qemuCaps
->
arch
))
domCaps
->
cpu
.
hostPassthrough
=
true
;
if
(
qemuCaps
->
cpuDefinitions
&&
caps
->
host
.
cpu
)
domCaps
->
cpu
.
hostModel
=
virQEMUCapsGuestIsNative
(
caps
->
host
.
arch
,
qemuCaps
->
arch
);
domCaps
->
cpu
.
custom
=
virObjectRef
(
qemuCaps
->
cpuDefinitions
);
return
0
;
}
static
int
virQEMUCapsFillDomainDeviceDiskCaps
(
virQEMUCapsPtr
qemuCaps
,
const
char
*
machine
,
...
...
@@ -4490,7 +4510,8 @@ virQEMUCapsFillDomainFeatureGICCaps(virQEMUCapsPtr qemuCaps,
int
virQEMUCapsFillDomainCaps
(
virDomainCapsPtr
domCaps
,
virQEMUCapsFillDomainCaps
(
virCapsPtr
caps
,
virDomainCapsPtr
domCaps
,
virQEMUCapsPtr
qemuCaps
,
virFirmwarePtr
*
firmwares
,
size_t
nfirmwares
)
...
...
@@ -4513,6 +4534,7 @@ virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
}
if
(
virQEMUCapsFillDomainOSCaps
(
os
,
firmwares
,
nfirmwares
)
<
0
||
virQEMUCapsFillDomainCPUCaps
(
caps
,
qemuCaps
,
domCaps
)
<
0
||
virQEMUCapsFillDomainDeviceDiskCaps
(
qemuCaps
,
domCaps
->
machine
,
disk
)
<
0
||
virQEMUCapsFillDomainDeviceGraphicsCaps
(
qemuCaps
,
graphics
)
<
0
||
...
...
src/qemu/qemu_capabilities.h
浏览文件 @
84d38307
...
...
@@ -501,7 +501,8 @@ int virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
virQEMUCapsPtr
kvmbinCaps
,
virArch
guestarch
);
int
virQEMUCapsFillDomainCaps
(
virDomainCapsPtr
domCaps
,
int
virQEMUCapsFillDomainCaps
(
virCapsPtr
caps
,
virDomainCapsPtr
domCaps
,
virQEMUCapsPtr
qemuCaps
,
virFirmwarePtr
*
firmwares
,
size_t
nfirmwares
);
...
...
src/qemu/qemu_driver.c
浏览文件 @
84d38307
...
...
@@ -18637,6 +18637,7 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
virDomainCapsPtr domCaps = NULL;
int arch = virArchFromHost(); /* virArch */
virQEMUDriverConfigPtr cfg = NULL;
virCapsPtr caps = NULL;
virCheckFlags(0, ret);
...
...
@@ -18645,6 +18646,9 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
cfg = virQEMUDriverGetConfig(driver);
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
if (qemuHostdevHostSupportsPassthroughLegacy() ||
qemuHostdevHostSupportsPassthroughVFIO())
virttype = VIR_DOMAIN_VIRT_KVM;
...
...
@@ -18716,13 +18720,14 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
if (!(domCaps = virDomainCapsNew(emulatorbin, machine, arch, virttype)))
goto cleanup;
if (virQEMUCapsFillDomainCaps(domCaps, qemuCaps,
if (virQEMUCapsFillDomainCaps(
caps,
domCaps, qemuCaps,
cfg->firmwares, cfg->nfirmwares) < 0)
goto cleanup;
ret = virDomainCapsFormat(domCaps);
cleanup:
virObjectUnref(cfg);
virObjectUnref(caps);
virObjectUnref(domCaps);
virObjectUnref(qemuCaps);
return ret;
...
...
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,34 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
Opteron_G5
</model>
<model>
Opteron_G4
</model>
<model>
Opteron_G3
</model>
<model>
Opteron_G2
</model>
<model>
Opteron_G1
</model>
<model>
Haswell
</model>
<model>
SandyBridge
</model>
<model>
Westmere
</model>
<model>
Nehalem
</model>
<model>
Penryn
</model>
<model>
Conroe
</model>
<model>
n270
</model>
<model>
athlon
</model>
<model>
pentium3
</model>
<model>
pentium2
</model>
<model>
pentium
</model>
<model>
486
</model>
<model>
coreduo
</model>
<model>
kvm32
</model>
<model>
qemu32
</model>
<model>
kvm64
</model>
<model>
core2duo
</model>
<model>
phenom
</model>
<model>
qemu64
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,40 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
pxa262
</model>
<model>
pxa270-a0
</model>
<model>
arm1136
</model>
<model>
cortex-a15
</model>
<model>
pxa260
</model>
<model>
arm1136-r2
</model>
<model>
pxa261
</model>
<model>
pxa255
</model>
<model>
arm926
</model>
<model>
arm11mpcore
</model>
<model>
pxa250
</model>
<model>
ti925t
</model>
<model>
cortex-a57
</model>
<model>
sa1110
</model>
<model>
arm1176
</model>
<model>
cortex-a53
</model>
<model>
sa1100
</model>
<model>
pxa270-c5
</model>
<model>
cortex-a9
</model>
<model>
cortex-a8
</model>
<model>
pxa270-c0
</model>
<model>
arm1026
</model>
<model>
pxa270-b1
</model>
<model>
cortex-m3
</model>
<model>
cortex-m4
</model>
<model>
pxa270-b0
</model>
<model>
arm946
</model>
<model>
cortex-r5
</model>
<model>
pxa270-a1
</model>
<model>
pxa270
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,40 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
pxa262
</model>
<model>
pxa270-a0
</model>
<model>
arm1136
</model>
<model>
cortex-a15
</model>
<model>
pxa260
</model>
<model>
arm1136-r2
</model>
<model>
pxa261
</model>
<model>
pxa255
</model>
<model>
arm926
</model>
<model>
arm11mpcore
</model>
<model>
pxa250
</model>
<model>
ti925t
</model>
<model>
cortex-a57
</model>
<model>
sa1110
</model>
<model>
arm1176
</model>
<model>
cortex-a53
</model>
<model>
sa1100
</model>
<model>
pxa270-c5
</model>
<model>
cortex-a9
</model>
<model>
cortex-a8
</model>
<model>
pxa270-c0
</model>
<model>
arm1026
</model>
<model>
pxa270-b1
</model>
<model>
cortex-m3
</model>
<model>
cortex-m4
</model>
<model>
pxa270-b0
</model>
<model>
arm946
</model>
<model>
cortex-r5
</model>
<model>
pxa270-a1
</model>
<model>
pxa270
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,40 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
pxa262
</model>
<model>
pxa270-a0
</model>
<model>
arm1136
</model>
<model>
cortex-a15
</model>
<model>
pxa260
</model>
<model>
arm1136-r2
</model>
<model>
pxa261
</model>
<model>
pxa255
</model>
<model>
arm926
</model>
<model>
arm11mpcore
</model>
<model>
pxa250
</model>
<model>
ti925t
</model>
<model>
cortex-a57
</model>
<model>
sa1110
</model>
<model>
arm1176
</model>
<model>
cortex-a53
</model>
<model>
sa1100
</model>
<model>
pxa270-c5
</model>
<model>
cortex-a9
</model>
<model>
cortex-a8
</model>
<model>
pxa270-c0
</model>
<model>
arm1026
</model>
<model>
pxa270-b1
</model>
<model>
cortex-m3
</model>
<model>
cortex-m4
</model>
<model>
pxa270-b0
</model>
<model>
arm946
</model>
<model>
cortex-r5
</model>
<model>
pxa270-a1
</model>
<model>
pxa270
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,440 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
default
</model>
<model>
ppc
</model>
<model>
ppc32
</model>
<model>
ppc64
</model>
<model>
970mp
</model>
<model>
970fx
</model>
<model>
970
</model>
<model>
POWER8NVL
</model>
<model>
POWER8
</model>
<model>
POWER8E
</model>
<model>
POWER7+
</model>
<model>
POWER7
</model>
<model>
POWER5gs
</model>
<model>
POWER5+
</model>
<model>
Apollo7PM
</model>
<model>
7457A
</model>
<model>
7447A
</model>
<model>
Apollo7
</model>
<model>
7457
</model>
<model>
Apollo6
</model>
<model>
7455
</model>
<model>
7445
</model>
<model>
7451
</model>
<model>
7441
</model>
<model>
Vger
</model>
<model>
7450
</model>
<model>
7448
</model>
<model>
Nitro
</model>
<model>
7410
</model>
<model>
G4
</model>
<model>
Max
</model>
<model>
7400
</model>
<model>
Goldfinger
</model>
<model>
755
</model>
<model>
745
</model>
<model>
LoneStar
</model>
<model>
750l
</model>
<model>
750gx
</model>
<model>
750fx
</model>
<model>
750cxe
</model>
<model>
750cx
</model>
<model>
750cl
</model>
<model>
Conan/Doyle
</model>
<model>
G3
</model>
<model>
Typhoon
</model>
<model>
750
</model>
<model>
Arthur
</model>
<model>
740
</model>
<model>
Mach5
</model>
<model>
Sirocco
</model>
<model>
604e
</model>
<model>
Goldeneye
</model>
<model>
603r
</model>
<model>
Vaillant
</model>
<model>
Stretch
</model>
<model>
603e
</model>
<model>
Vanilla
</model>
<model>
601v
</model>
<model>
601
</model>
<model>
MPC8560
</model>
<model>
MPC8555E
</model>
<model>
MPC8555
</model>
<model>
MPC8548E
</model>
<model>
MPC8548
</model>
<model>
MPC8547E
</model>
<model>
MPC8545E
</model>
<model>
MPC8545
</model>
<model>
MPC8544E
</model>
<model>
MPC8544
</model>
<model>
MPC8543E
</model>
<model>
MPC8543
</model>
<model>
MPC8541E
</model>
<model>
MPC8541
</model>
<model>
MPC8540
</model>
<model>
MPC8533E
</model>
<model>
MPC8533
</model>
<model>
e500v2
</model>
<model>
e500v1
</model>
<model>
e500
</model>
<model>
MPC8347EA
</model>
<model>
MPC8347E
</model>
<model>
MPC8347A
</model>
<model>
MPC8347
</model>
<model>
e300
</model>
<model>
e200
</model>
<model>
MPC8280
</model>
<model>
MPC8275
</model>
<model>
MPC8272
</model>
<model>
MPC8271
</model>
<model>
MPC8270
</model>
<model>
MPC8266_HiP4
</model>
<model>
MPC8266_HiP3
</model>
<model>
MPC8266
</model>
<model>
MPC8265_HiP4
</model>
<model>
MPC8265_HiP3
</model>
<model>
MPC8265
</model>
<model>
MPC8264_HiP4
</model>
<model>
MPC8264_HiP3
</model>
<model>
MPC8264
</model>
<model>
MPC8260_HiP4
</model>
<model>
MPC8260_HiP3
</model>
<model>
MPC8260
</model>
<model>
MPC8255_HiP4
</model>
<model>
MPC8255_HiP3
</model>
<model>
MPC8255
</model>
<model>
MPC8250_HiP4
</model>
<model>
MPC8250_HiP3
</model>
<model>
MPC8250
</model>
<model>
MPC8248
</model>
<model>
MPC8247
</model>
<model>
MPC8245
</model>
<model>
MPC8241
</model>
<model>
PowerQUICC-II
</model>
<model>
MPC82xx
</model>
<model>
MPC5200B
</model>
<model>
MPC5200
</model>
<model>
MPC52xx
</model>
<model>
MPC8240
</model>
<model>
440EP
</model>
<model>
x2vp50
</model>
<model>
x2vp7
</model>
<model>
405GPe
</model>
<model>
405GP
</model>
<model>
405CR
</model>
<model>
405
</model>
<model>
403
</model>
<model>
750cl_v1.0
</model>
<model>
750cxe_v2.1
</model>
<model>
7457A_v1.2
</model>
<model>
755_v2.7
</model>
<model>
MPC8347ET
</model>
<model>
MPC8545E_v20
</model>
<model>
750_v2.1
</model>
<model>
755_v2.2
</model>
<model>
745_v2.0
</model>
<model>
7455_v1.0
</model>
<model>
MPC8547E_v21
</model>
<model>
STB25
</model>
<model>
POWER8_v2.0
</model>
<model>
401G2
</model>
<model>
MPC8349A
</model>
<model>
750e
</model>
<model>
MPC8545_v21
</model>
<model>
MPC8548_v11
</model>
<model>
970fx_v2.0
</model>
<model>
750fx_v2.0
</model>
<model>
POWER8E_v2.1
</model>
<model>
Cobra
</model>
<model>
603p
</model>
<model>
7400_v2.7
</model>
<model>
MPC8378E
</model>
<model>
e500v2_v10
</model>
<model>
e500mc
</model>
<model>
603e7v1
</model>
<model>
970mp_v1.0
</model>
<model>
MPC8555E_v11
</model>
<model>
440-Xilinx-w-dfpu
</model>
<model>
740e
</model>
<model>
405CRc
</model>
<model>
7447A_v1.1
</model>
<model>
MPC8543_v11
</model>
<model>
MPC8533E_v10
</model>
<model>
MPC8540_v21
</model>
<model>
e500v2_v21
</model>
<model>
e300c1
</model>
<model>
7400_v2.2
</model>
<model>
970fx_v1.0
</model>
<model>
750gx_v1.2
</model>
<model>
750fx_v1.0
</model>
<model>
MPC8641
</model>
<model>
MPC8544E_v10
</model>
<model>
405D4
</model>
<model>
7457_v1.1
</model>
<model>
970fx_v3.0
</model>
<model>
604e_v2.2
</model>
<model>
755_v2.6
</model>
<model>
7410_v1.4
</model>
<model>
Npe4GS3
</model>
<model>
745_v2.4
</model>
<model>
750_v2.0
</model>
<model>
7445_v3.2
</model>
<model>
750l_v3.2
</model>
<model>
MPC8540_v10
</model>
<model>
750_v1.0
</model>
<model>
MPC8343A
</model>
<model>
MPC8378
</model>
<model>
G2HiP3
</model>
<model>
750cxe_v3.0
</model>
<model>
e500_v10
</model>
<model>
STB03
</model>
<model>
MPC8567
</model>
<model>
MPC8545_v20
</model>
<model>
MPC8548_v10
</model>
<model>
755_v1.1
</model>
<model>
603e7v
</model>
<model>
Npe405H2
</model>
<model>
750_v3.0
</model>
<model>
Npe405H
</model>
<model>
7400_v2.6
</model>
<model>
405GPa
</model>
<model>
MPC8548_v21
</model>
<model>
MPC8541E_v10
</model>
<model>
750l_v2.2
</model>
<model>
MPC8555E_v10
</model>
<model>
7457A_v1.1
</model>
<model>
e200z6
</model>
<model>
MPC8379E
</model>
<model>
e500v2_v20
</model>
<model>
MPC8347AP
</model>
<model>
401B2
</model>
<model>
MPC8349E
</model>
<model>
755_v2.1
</model>
<model>
MPC8543_v21
</model>
<model>
MPC8547E_v20
</model>
<model>
745_v2.8
</model>
<model>
7455_v3.4
</model>
<model>
7448_v1.1
</model>
<model>
740_v2.2
</model>
<model>
7400_v1.1
</model>
<model>
MPC8567E
</model>
<model>
7441_v2.10
</model>
<model>
603e_v1.4
</model>
<model>
G2leGP1
</model>
<model>
7451_v2.10
</model>
<model>
MPC8343E
</model>
<model>
750cx_v2.2
</model>
<model>
Npe405L
</model>
<model>
603e7
</model>
<model>
401A1
</model>
<model>
MPC8377
</model>
<model>
7448_v2.1
</model>
<model>
7441_v2.3
</model>
<model>
7400_v2.1
</model>
<model>
405CRb
</model>
<model>
604
</model>
<model>
MPC8540_v20
</model>
<model>
MPC8543_v10
</model>
<model>
7447A_v1.0
</model>
<model>
7445_v2.1
</model>
<model>
e500_v20
</model>
<model>
750gx_v1.1
</model>
<model>
MPC8543E_v11
</model>
<model>
750cxe_v2.4
</model>
<model>
MPC8548_v20
</model>
<model>
MPC8347AT
</model>
<model>
POWER8NVL_v1.0
</model>
<model>
7457A_v1.0
</model>
<model>
7457_v1.0
</model>
<model>
7450_v1.2
</model>
<model>
MPC8572
</model>
<model>
755_v2.5
</model>
<model>
7410_v1.3
</model>
<model>
745_v2.3
</model>
<model>
750l_v2.1
</model>
<model>
405GPR
</model>
<model>
755_v2.0
</model>
<model>
MPC8541_v11
</model>
<model>
401C2
</model>
<model>
e500v2_v30
</model>
<model>
7455_v3.3
</model>
<model>
405EZ
</model>
<model>
MPC8568E
</model>
<model>
755_v1.0
</model>
<model>
603e_v1.3
</model>
<model>
MPC8560_v10
</model>
<model>
MPC8560_v21
</model>
<model>
G2H4
</model>
<model>
MPC8533_v11
</model>
<model>
740_v3.1
</model>
<model>
e200z5
</model>
<model>
MPC8349
</model>
<model>
7400_v2.0
</model>
<model>
405CRa
</model>
<model>
MPC8543E_v10
</model>
<model>
MPC8543E_v21
</model>
<model>
750cxe_v2.3
</model>
<model>
MPC8543_v20
</model>
<model>
745_v2.7
</model>
<model>
403GC
</model>
<model>
e5500
</model>
<model>
7448_v1.0
</model>
<model>
MPC5200_v12
</model>
<model>
740_v2.1
</model>
<model>
745_v2.2
</model>
<model>
7400_v1.0
</model>
<model>
7410_v1.2
</model>
<model>
x2vp4
</model>
<model>
MPC8555_v11
</model>
<model>
MPC8541_v10
</model>
<model>
405LP
</model>
<model>
750fx_v2.3
</model>
<model>
405EP
</model>
<model>
601_v2
</model>
<model>
MPC8544_v11
</model>
<model>
401D2
</model>
<model>
MPC8572E
</model>
<model>
604e_v1.0
</model>
<model>
750cx_v2.1
</model>
<model>
MPC5200B_v21
</model>
<model>
750l_v3.0
</model>
<model>
e300c4
</model>
<model>
7448_v2.0
</model>
<model>
7450_v2.1
</model>
<model>
G2leGP
</model>
<model>
750cxe_v3.1b
</model>
<model>
7400_v2.9
</model>
<model>
G2GP
</model>
<model>
603
</model>
<model>
405GPd
</model>
<model>
MPC8548E_v11
</model>
<model>
603e7t
</model>
<model>
IOP480
</model>
<model>
750gx_v1.0
</model>
<model>
MPC8560_v20
</model>
<model>
405D2
</model>
<model>
750fl
</model>
<model>
750l_v2.0
</model>
<model>
x2vp20
</model>
<model>
e600
</model>
<model>
7450_v1.1
</model>
<model>
755_v2.4
</model>
<model>
7445_v1.0
</model>
<model>
G2LS
</model>
<model>
MPC8543E_v20
</model>
<model>
7447_v1.1
</model>
<model>
603e_v2.2
</model>
<model>
603e_v4
</model>
<model>
7455_v3.2
</model>
<model>
740_v2.0
</model>
<model>
MPC8347P
</model>
<model>
440EPb
</model>
<model>
MPC603
</model>
<model>
603e_v1.2
</model>
<model>
750fx_v2.2
</model>
<model>
740_v1.0
</model>
<model>
MPC8544_v10
</model>
<model>
601_v1
</model>
<model>
745_v1.1
</model>
<model>
POWER7+_v2.1
</model>
<model>
750cx_v2.0
</model>
<model>
MPC8347EAP
</model>
<model>
401E2
</model>
<model>
MPC8641D
</model>
<model>
e300c3
</model>
<model>
MPC8533_v10
</model>
<model>
7441_v2.1
</model>
<model>
740_v3.0
</model>
<model>
POWER5+_v2.1
</model>
<model>
602
</model>
<model>
MPC8548E_v10
</model>
<model>
G2leLS
</model>
<model>
MPC8343
</model>
<model>
750cx_v1.0
</model>
<model>
750cxe_v2.2
</model>
<model>
604e_v2.4
</model>
<model>
755_v2.8
</model>
<model>
MPC8548E_v21
</model>
<model>
745_v2.6
</model>
<model>
G2le
</model>
<model>
403GB
</model>
<model>
MPC8545E_v21
</model>
<model>
POWER7_v2.3
</model>
<model>
750_v2.2
</model>
<model>
7450_v1.0
</model>
<model>
MPC5200_v11
</model>
<model>
755_v2.3
</model>
<model>
MPC8347EP
</model>
<model>
7410_v1.1
</model>
<model>
750gl
</model>
<model>
403GCX
</model>
<model>
750p
</model>
<model>
745_v2.1
</model>
<model>
7445_v3.4
</model>
<model>
G2
</model>
<model>
MPC8555_v10
</model>
<model>
MPC8347T
</model>
<model>
603e_v3
</model>
<model>
970_v2.2
</model>
<model>
440-Xilinx
</model>
<model>
740p
</model>
<model>
MPC5200B_v20
</model>
<model>
440EPX
</model>
<model>
603e_v1.1
</model>
<model>
7451_v2.3
</model>
<model>
7450_v2.0
</model>
<model>
7400_v2.8
</model>
<model>
7455_v2.1
</model>
<model>
405GPc
</model>
<model>
MPC8347EAT
</model>
<model>
970mp_v1.1
</model>
<model>
603e7v2
</model>
<model>
604r
</model>
<model>
7447A_v1.2
</model>
<model>
MPC8533E_v11
</model>
<model>
e500v2_v22
</model>
<model>
401F2
</model>
<model>
MPC8343EA
</model>
<model>
7457_v1.2
</model>
<model>
970fx_v3.1
</model>
<model>
7447_v1.0
</model>
<model>
745_v2.5
</model>
<model>
MPC8548E_v20
</model>
<model>
MPC8610
</model>
<model>
403GA
</model>
<model>
750cxe_v2.4b
</model>
<model>
MPC5200_v10
</model>
<model>
7410_v1.0
</model>
<model>
G2leGP3
</model>
<model>
603e_v4.1
</model>
<model>
7445_v3.3
</model>
<model>
440EPa
</model>
<model>
970fx_v2.1
</model>
<model>
MPC8377E
</model>
<model>
750fx_v2.1
</model>
<model>
601_v0
</model>
<model>
STB04
</model>
<model>
745_v1.0
</model>
<model>
G2HiP4
</model>
<model>
750cl_v2.0
</model>
<model>
750cxr
</model>
<model>
MPC8349EA
</model>
<model>
750cxe_v3.1
</model>
<model>
401
</model>
<model>
MPC8379
</model>
<model>
MPC8568
</model>
<model>
e300c2
</model>
<model>
750_v3.1
</model>
<model>
MPC8544E_v11
</model>
<model>
405GPb
</model>
<model>
MPC8541E_v11
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
浏览文件 @
84d38307
...
...
@@ -19,9 +19,38 @@
</loader>
</os>
<cpu>
<mode
name=
'host-passthrough'
supported=
'no'
/>
<mode
name=
'host-model'
supported=
'no'
/>
<mode
name=
'custom'
supported=
'no'
/>
<mode
name=
'host-passthrough'
supported=
'yes'
/>
<mode
name=
'host-model'
supported=
'yes'
/>
<mode
name=
'custom'
supported=
'yes'
>
<model>
Opteron_G5
</model>
<model>
Opteron_G4
</model>
<model>
Opteron_G3
</model>
<model>
Opteron_G2
</model>
<model>
Opteron_G1
</model>
<model>
Broadwell
</model>
<model>
Broadwell-noTSX
</model>
<model>
Haswell
</model>
<model>
Haswell-noTSX
</model>
<model>
IvyBridge
</model>
<model>
SandyBridge
</model>
<model>
Westmere
</model>
<model>
Nehalem
</model>
<model>
Penryn
</model>
<model>
Conroe
</model>
<model>
n270
</model>
<model>
athlon
</model>
<model>
pentium3
</model>
<model>
pentium2
</model>
<model>
pentium
</model>
<model>
486
</model>
<model>
coreduo
</model>
<model>
kvm32
</model>
<model>
qemu32
</model>
<model>
kvm64
</model>
<model>
core2duo
</model>
<model>
phenom
</model>
<model>
qemu64
</model>
</mode>
</cpu>
<devices>
<disk
supported=
'yes'
>
...
...
tests/domaincapstest.c
浏览文件 @
84d38307
...
...
@@ -109,6 +109,54 @@ fillAllCaps(virDomainCapsPtr domCaps)
#if WITH_QEMU
# include "testutilsqemu.h"
static
virCPUDef
aarch64Cpu
=
{
0
,
0
,
0
,
0
,
NULL
,
NULL
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
,
NULL
,
};
static
virCPUDef
ppc64leCpu
=
{
VIR_CPU_TYPE_HOST
,
0
,
0
,
VIR_ARCH_PPC64LE
,
(
char
*
)
"POWER8"
,
NULL
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
,
NULL
,
};
static
virCPUDef
x86Cpu
=
{
VIR_CPU_TYPE_HOST
,
0
,
0
,
VIR_ARCH_X86_64
,
(
char
*
)
"Broadwell"
,
NULL
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
,
NULL
,
};
static
int
fakeHostCPU
(
virCapsPtr
caps
,
virArch
arch
)
{
virCPUDefPtr
cpu
;
switch
(
arch
)
{
case
VIR_ARCH_AARCH64
:
cpu
=
&
aarch64Cpu
;
break
;
case
VIR_ARCH_PPC64LE
:
cpu
=
&
ppc64leCpu
;
break
;
case
VIR_ARCH_X86_64
:
cpu
=
&
x86Cpu
;
break
;
default:
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"cannot fake host CPU for arch %s"
,
virArchToString
(
arch
));
return
-
1
;
}
if
(
!
(
caps
->
host
.
cpu
=
virCPUDefCopy
(
cpu
)))
return
-
1
;
return
0
;
}
static
int
fillQemuCaps
(
virDomainCapsPtr
domCaps
,
const
char
*
name
,
...
...
@@ -118,6 +166,7 @@ fillQemuCaps(virDomainCapsPtr domCaps,
{
int
ret
=
-
1
;
char
*
path
=
NULL
;
virCapsPtr
caps
=
NULL
;
virQEMUCapsPtr
qemuCaps
=
NULL
;
virDomainCapsLoaderPtr
loader
=
&
domCaps
->
os
.
loader
;
...
...
@@ -136,7 +185,11 @@ fillQemuCaps(virDomainCapsPtr domCaps,
virQEMUCapsGetDefaultMachine
(
qemuCaps
))
<
0
)
goto
cleanup
;
if
(
virQEMUCapsFillDomainCaps
(
domCaps
,
qemuCaps
,
if
(
!
(
caps
=
virCapabilitiesNew
(
domCaps
->
arch
,
false
,
false
))
||
fakeHostCPU
(
caps
,
domCaps
->
arch
)
<
0
)
goto
cleanup
;
if
(
virQEMUCapsFillDomainCaps
(
caps
,
domCaps
,
qemuCaps
,
cfg
->
firmwares
,
cfg
->
nfirmwares
)
<
0
)
goto
cleanup
;
...
...
@@ -164,6 +217,7 @@ fillQemuCaps(virDomainCapsPtr domCaps,
ret
=
0
;
cleanup:
virObjectUnref
(
caps
);
virObjectUnref
(
qemuCaps
);
VIR_FREE
(
path
);
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录