if (hostOff &&
(def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH ||
- def->cpu->mode == VIR_CPU_MODE_MAXIMUM) &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_CACHE))
+ def->cpu->mode == VIR_CPU_MODE_MAXIMUM))
virBufferAddLit(&buf, ",host-cache-info=off");
- if (l3Off &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_CACHE))
+ if (l3Off)
virBufferAddLit(&buf, ",l3-cache=off");
}
+++ /dev/null
-LC_ALL=C \
-PATH=/bin \
-HOME=/var/lib/libvirt/qemu/domain--1-foo \
-USER=test \
-LOGNAME=test \
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-foo/.local/share \
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-foo/.cache \
-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
-/usr/bin/qemu-system-x86_64 \
--name guest=foo,debug-threads=on \
--S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-foo/master-key.aes \
--machine pc,usb=off,dump-guest-core=off \
--accel kvm \
--cpu host \
--m size=219136k \
--overcommit mem-lock=off \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-shutdown \
--no-acpi \
--boot strict=on \
--usb \
--audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
--msg timestamp=on
+++ /dev/null
-<domain type='kvm'>
- <name>foo</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu mode='host-passthrough'>
- <cache mode='disable'/>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- </devices>
-</domain>
+++ /dev/null
-LC_ALL=C \
-PATH=/bin \
-HOME=/var/lib/libvirt/qemu/domain--1-foo \
-USER=test \
-LOGNAME=test \
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-foo/.local/share \
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-foo/.cache \
-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
-/usr/bin/qemu-system-x86_64 \
--name guest=foo,debug-threads=on \
--S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-foo/master-key.aes \
--machine pc,usb=off,dump-guest-core=off \
--accel kvm \
--cpu host,host-cache-info=on \
--m size=219136k \
--overcommit mem-lock=off \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-shutdown \
--no-acpi \
--boot strict=on \
--usb \
--audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
--msg timestamp=on
+++ /dev/null
-<domain type='kvm'>
- <name>foo</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu mode='host-passthrough'>
- <cache mode='passthrough'/>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- </devices>
-</domain>
DO_TEST("cpu-check-default-partial", QEMU_CAPS_KVM);
DO_TEST("cpu-check-default-partial2", QEMU_CAPS_KVM);
- DO_TEST("cpu-cache-disable", QEMU_CAPS_KVM, QEMU_CAPS_CPU_CACHE);
- DO_TEST("cpu-cache-disable2", QEMU_CAPS_KVM);
- DO_TEST("cpu-cache-disable3", QEMU_CAPS_KVM, QEMU_CAPS_CPU_CACHE);
- DO_TEST("cpu-cache-passthrough", QEMU_CAPS_KVM, QEMU_CAPS_CPU_CACHE);
- DO_TEST("cpu-cache-passthrough2", QEMU_CAPS_KVM);
- DO_TEST("cpu-cache-emulate-l3", QEMU_CAPS_KVM, QEMU_CAPS_CPU_CACHE);
+ DO_TEST("cpu-cache-disable", QEMU_CAPS_KVM);
+ DO_TEST("cpu-cache-disable3", QEMU_CAPS_KVM);
+ DO_TEST("cpu-cache-passthrough", QEMU_CAPS_KVM);
+ DO_TEST("cpu-cache-emulate-l3", QEMU_CAPS_KVM);
DO_TEST_PARSE_ERROR("cpu-cache-emulate-l2", QEMU_CAPS_KVM);
DO_TEST_PARSE_ERROR("cpu-cache-passthrough3", QEMU_CAPS_KVM);
DO_TEST_PARSE_ERROR("cpu-cache-passthrough-l3", QEMU_CAPS_KVM);