Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
fcd56ce8
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看板
提交
fcd56ce8
编写于
3月 01, 2017
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Set default values for CPU check attribute
Signed-off-by:
N
Jiri Denemark
<
jdenemar@redhat.com
>
上级
641b8c72
变更
39
隐藏空白更改
内联
并排
Showing
39 changed file
with
536 addition
and
22 deletion
+536
-22
src/qemu/qemu_domain.c
src/qemu/qemu_domain.c
+42
-0
src/qemu/qemu_process.c
src/qemu/qemu_process.c
+5
-8
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
+1
-1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
+1
-1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
+1
-1
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.args
...qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.args
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.xml
.../qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.xml
+19
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none2.args
...emuxml2argvdata/qemuxml2argv-cpu-check-default-none2.args
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none2.xml
...qemuxml2argvdata/qemuxml2argv-cpu-check-default-none2.xml
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial.args
...uxml2argvdata/qemuxml2argv-cpu-check-default-partial.args
+22
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial.xml
...muxml2argvdata/qemuxml2argv-cpu-check-default-partial.xml
+19
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial2.args
...xml2argvdata/qemuxml2argv-cpu-check-default-partial2.args
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial2.xml
...uxml2argvdata/qemuxml2argv-cpu-check-default-partial2.xml
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.args
+1
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.xml
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.args
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.xml
+21
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.args
+1
-0
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.xml
+21
-0
tests/qemuxml2argvtest.c
tests/qemuxml2argvtest.c
+8
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml
...l2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml
...mloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml
...2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml
...ta/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-none.xml
...uxml2xmloutdata/qemuxml2xmlout-cpu-check-default-none.xml
+28
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-none2.xml
...xml2xmloutdata/qemuxml2xmlout-cpu-check-default-none2.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-partial.xml
...l2xmloutdata/qemuxml2xmlout-cpu-check-default-partial.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-partial2.xml
...2xmloutdata/qemuxml2xmlout-cpu-check-default-partial2.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-full.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-full.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-none.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-none.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-partial.xml
...s/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-partial.xml
+30
-0
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-disabled.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-disabled.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-enabled.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-enabled.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-kvmclock.xml
...s/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-kvmclock.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-model-features.xml
...xml2xmloutdata/qemuxml2xmlout-cpu-host-model-features.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-passthrough-features.xml
...loutdata/qemuxml2xmlout-cpu-host-passthrough-features.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-kvmclock.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-kvmclock.xml
+1
-1
tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
...uxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
+1
-1
tests/qemuxml2xmltest.c
tests/qemuxml2xmltest.c
+8
-0
未找到文件。
src/qemu/qemu_domain.c
浏览文件 @
fcd56ce8
...
...
@@ -2674,6 +2674,45 @@ qemuDomainDefVcpusPostParse(virDomainDefPtr def)
}
static
int
qemuDomainDefCPUPostParse
(
virDomainDefPtr
def
)
{
if
(
!
def
->
cpu
)
return
0
;
/* Nothing to be done if only CPU topology is specified. */
if
(
def
->
cpu
->
mode
==
VIR_CPU_MODE_CUSTOM
&&
!
def
->
cpu
->
model
)
return
0
;
if
(
def
->
cpu
->
check
!=
VIR_CPU_CHECK_DEFAULT
)
return
0
;
switch
((
virCPUMode
)
def
->
cpu
->
mode
)
{
case
VIR_CPU_MODE_HOST_PASSTHROUGH
:
def
->
cpu
->
check
=
VIR_CPU_CHECK_NONE
;
break
;
case
VIR_CPU_MODE_HOST_MODEL
:
def
->
cpu
->
check
=
VIR_CPU_CHECK_PARTIAL
;
break
;
case
VIR_CPU_MODE_CUSTOM
:
/* Custom CPUs in TCG mode are not compared to host CPU by default. */
if
(
def
->
virtType
==
VIR_DOMAIN_VIRT_QEMU
)
def
->
cpu
->
check
=
VIR_CPU_CHECK_NONE
;
else
def
->
cpu
->
check
=
VIR_CPU_CHECK_PARTIAL
;
break
;
case
VIR_CPU_MODE_LAST
:
break
;
}
return
0
;
}
static
int
qemuDomainDefPostParse
(
virDomainDefPtr
def
,
virCapsPtr
caps
,
...
...
@@ -2738,6 +2777,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
if
(
qemuDomainDefVcpusPostParse
(
def
)
<
0
)
goto
cleanup
;
if
(
qemuDomainDefCPUPostParse
(
def
)
<
0
)
goto
cleanup
;
ret
=
0
;
cleanup:
virObjectUnref
(
qemuCaps
);
...
...
src/qemu/qemu_process.c
浏览文件 @
fcd56ce8
...
...
@@ -5192,14 +5192,11 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
if
(
def
->
cpu
->
mode
==
VIR_CPU_MODE_HOST_PASSTHROUGH
)
return
0
;
/* custom CPUs in TCG mode don't need to be compared to host CPU */
if
(
def
->
virtType
!=
VIR_DOMAIN_VIRT_QEMU
||
def
->
cpu
->
mode
!=
VIR_CPU_MODE_CUSTOM
)
{
if
(
virCPUCompare
(
caps
->
host
.
arch
,
virQEMUCapsGetHostModel
(
qemuCaps
,
def
->
virtType
),
def
->
cpu
,
true
)
<
0
)
return
-
1
;
}
if
(
def
->
cpu
->
check
==
VIR_CPU_CHECK_PARTIAL
&&
virCPUCompare
(
caps
->
host
.
arch
,
virQEMUCapsGetHostModel
(
qemuCaps
,
def
->
virtType
),
def
->
cpu
,
true
)
<
0
)
return
-
1
;
if
(
virCPUUpdate
(
def
->
os
.
arch
,
def
->
cpu
,
virQEMUCapsGetHostModel
(
qemuCaps
,
def
->
virtType
))
<
0
)
...
...
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
浏览文件 @
fcd56ce8
...
...
@@ -11,7 +11,7 @@
<features>
<gic
version=
'host'
/>
</features>
<cpu
mode=
'host-passthrough'
/>
<cpu
mode=
'host-passthrough'
check=
'none'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
...
...
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
浏览文件 @
fcd56ce8
...
...
@@ -11,7 +11,7 @@
<features>
<gic
version=
'2'
/>
</features>
<cpu
mode=
'host-passthrough'
/>
<cpu
mode=
'host-passthrough'
check=
'none'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
...
...
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
浏览文件 @
fcd56ce8
...
...
@@ -11,7 +11,7 @@
<features>
<gic
version=
'3'
/>
</features>
<cpu
mode=
'host-passthrough'
/>
<cpu
mode=
'host-passthrough'
check=
'none'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
...
...
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.args
0 → 100644
浏览文件 @
fcd56ce8
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-kvm \
-name QEMUGuest1 \
-S \
-M pc \
-cpu host \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot n \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'host-passthrough'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none2.args
0 → 100644
浏览文件 @
fcd56ce8
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu \
-name QEMUGuest1 \
-S \
-M pc \
-cpu core2duo \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot n \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-none2.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'qemu'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial.args
0 → 100644
浏览文件 @
fcd56ce8
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-kvm \
-name QEMUGuest1 \
-S \
-M pc \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
+lahf_lm \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot n \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'host-model'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial2.args
0 → 100644
浏览文件 @
fcd56ce8
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-kvm \
-name QEMUGuest1 \
-S \
-M pc \
-cpu core2duo \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot n \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-default-partial2.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.args
0 → 120000
浏览文件 @
fcd56ce8
qemuxml2argv-cpu-check-none.args
\ No newline at end of file
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-full.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'full'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.args
0 → 100644
浏览文件 @
fcd56ce8
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-kvm \
-name QEMUGuest1 \
-S \
-M pc \
-cpu core2duo \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot n \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-none.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.args
0 → 120000
浏览文件 @
fcd56ce8
qemuxml2argv-cpu-check-none.args
\ No newline at end of file
tests/qemuxml2argvdata/qemuxml2argv-cpu-check-partial.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'partial'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
</devices>
</domain>
tests/qemuxml2argvtest.c
浏览文件 @
fcd56ce8
...
...
@@ -2488,6 +2488,14 @@ mymain(void)
DO_TEST
(
"fd-memory-no-numa-topology"
,
QEMU_CAPS_MEM_PATH
,
QEMU_CAPS_OBJECT_MEMORY_FILE
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-none"
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-partial"
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-full"
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-default-none"
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-default-none2"
,
NONE
);
DO_TEST
(
"cpu-check-default-partial"
,
QEMU_CAPS_KVM
);
DO_TEST
(
"cpu-check-default-partial2"
,
QEMU_CAPS_KVM
);
qemuTestDriverFree
(
&
driver
);
return
ret
==
0
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml
浏览文件 @
fcd56ce8
...
...
@@ -18,7 +18,7 @@
<pae/>
<gic
version=
'2'
/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
cortex-a53
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml
浏览文件 @
fcd56ce8
...
...
@@ -11,7 +11,7 @@
<acpi/>
<gic
version=
'2'
/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
cortex-a57
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml
浏览文件 @
fcd56ce8
...
...
@@ -18,7 +18,7 @@
<pae/>
<gic
version=
'2'
/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
cortex-a53
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml
浏览文件 @
fcd56ce8
...
...
@@ -18,7 +18,7 @@
<pae/>
<gic
version=
'2'
/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
cortex-a53
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-none.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'host-passthrough'
check=
'none'
/>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-none2.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'qemu'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-partial.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'host-model'
check=
'partial'
>
<model
fallback=
'allow'
/>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-default-partial2.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'partial'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-full.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'full'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-none.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-check-partial.xml
0 → 100644
浏览文件 @
fcd56ce8
<domain
type=
'kvm'
>
<name>
QEMUGuest1
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
6
</vcpu>
<os>
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
check=
'partial'
>
<model
fallback=
'forbid'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu-kvm
</emulator>
<controller
type=
'usb'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x2'
/>
</controller>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<input
type=
'mouse'
bus=
'ps2'
/>
<input
type=
'keyboard'
bus=
'ps2'
/>
<memballoon
model=
'virtio'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</memballoon>
</devices>
</domain>
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-disabled.xml
浏览文件 @
fcd56ce8
...
...
@@ -13,7 +13,7 @@
<apic
eoi=
'off'
/>
<pae/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
qemu32
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-eoi-enabled.xml
浏览文件 @
fcd56ce8
...
...
@@ -13,7 +13,7 @@
<apic
eoi=
'on'
/>
<pae/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'none'
>
<model
fallback=
'allow'
>
qemu32
</model>
</cpu>
<clock
offset=
'utc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-kvmclock.xml
浏览文件 @
fcd56ce8
...
...
@@ -8,7 +8,7 @@
<type
arch=
'x86_64'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'host-passthrough'
/>
<cpu
mode=
'host-passthrough'
check=
'none'
/>
<clock
offset=
'utc'
>
<timer
name=
'kvmclock'
present=
'no'
/>
</clock>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-model-features.xml
浏览文件 @
fcd56ce8
...
...
@@ -13,7 +13,7 @@
<type
arch=
'i686'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<cpu
mode=
'host-model'
>
<cpu
mode=
'host-model'
check=
'partial'
>
<model
fallback=
'allow'
/>
<feature
policy=
'require'
name=
'abm'
/>
<feature
policy=
'force'
name=
'ds'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-host-passthrough-features.xml
浏览文件 @
fcd56ce8
...
...
@@ -13,7 +13,7 @@
<type
arch=
'i686'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<cpu
mode=
'host-passthrough'
>
<cpu
mode=
'host-passthrough'
check=
'none'
>
<feature
policy=
'require'
name=
'abm'
/>
<feature
policy=
'force'
name=
'ds'
/>
<feature
policy=
'disable'
name=
'invtsc'
/>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-kvmclock.xml
浏览文件 @
fcd56ce8
...
...
@@ -8,7 +8,7 @@
<type
arch=
'i686'
machine=
'pc'
>
hvm
</type>
<boot
dev=
'network'
/>
</os>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'partial'
>
<model
fallback=
'allow'
>
core2duo
</model>
</cpu>
<clock
offset=
'utc'
>
...
...
tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
浏览文件 @
fcd56ce8
...
...
@@ -15,7 +15,7 @@
<apic/>
<pae/>
</features>
<cpu
mode=
'custom'
match=
'exact'
>
<cpu
mode=
'custom'
match=
'exact'
check=
'partial'
>
<model
fallback=
'allow'
>
core2duo
</model>
<vendor>
Intel
</vendor>
<topology
sockets=
'1'
cores=
'2'
threads=
'1'
/>
...
...
tests/qemuxml2xmltest.c
浏览文件 @
fcd56ce8
...
...
@@ -1125,6 +1125,14 @@ mymain(void)
QEMU_CAPS_MACHINE_OPT
,
QEMU_CAPS_MACHINE_IOMMU
);
DO_TEST
(
"cpu-check-none"
,
NONE
);
DO_TEST
(
"cpu-check-partial"
,
NONE
);
DO_TEST
(
"cpu-check-full"
,
NONE
);
DO_TEST
(
"cpu-check-default-none"
,
NONE
);
DO_TEST
(
"cpu-check-default-none2"
,
NONE
);
DO_TEST
(
"cpu-check-default-partial"
,
NONE
);
DO_TEST
(
"cpu-check-default-partial2"
,
NONE
);
qemuTestDriverFree
(
&
driver
);
return
ret
==
0
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录