Bug 956468
Summary: | cpu 'host-model' should support features in force or disable mode | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Wayne Sun <gsun> | |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.0 | CC: | acathrow, crobinso, cwei, dallan, dfediuck, dyuan, honzhang, jmiao, mzhan, pbonzini, rjones, virt-maint | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-1.1.1-1.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 870484 | |||
: | 1059007 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 10:57:28 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 799354, 870484 | |||
Bug Blocks: | 865505, 1059007 |
Description
Wayne Sun
2013-04-25 03:29:24 UTC
Fixed upstream with: commit 3c8be55c04eb2647fd5c9d51efae78f7afdcec85 Author: Peter Krempa <pkrempa> Date: Mon Jul 15 17:38:55 2013 +0200 cpu: Allow fine tuning of "host-model" cpu https://bugzilla.redhat.com/show_bug.cgi?id=799354 Until now, the "host-model" cpu mode couldn't be influenced. This patch allows to use the <feature> elements to either enable or disable specific CPU flags. This can be used to force flags that can be emulated even if the host CPU doesn't support them. commit 13cdd389ed06e81277f208c269d825046cdbb4cb Author: Peter Krempa <pkrempa> Date: Mon Jul 15 14:36:09 2013 +0200 cpu: Add virCPUDefUpdateFeature() This new function updates or adds a feature to a existing cpu model definition. This function will be helpful to allow tuning of "host-model" features in later patches. v1.1.0-193-g3c8be55 Moving to POST. bug fix verification: 1. add cpu feature policy in xml # virsh edit guest <cpu mode='host-model'> <model fallback='allow'/> <feature policy='force' name='avx'/> </cpu> # virsh start guest Domain guest started 2. check avx in guest: [root@guest ~]# cat /proc/cpuinfo | grep avx flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm xsaveopt fsgsbase smep erms 3. # virsh destroy guest Domain guest destroyed 4. change cpu feature policy # virsh edit guest <cpu mode='host-model'> <model fallback='allow'/> <feature policy='disable' name='avx'/> </cpu> 5. check avx in guest: [root@guest ~]# cat /proc/cpuinfo | grep avx <no output> 6. check qemu arguments # ps -ef | grep avx qemu 14664 1 1 16:09 ? 00:00:12 /usr/libexec/qemu-kvm -name guest -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,-avx -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid c43be7a8-e950-a68a-813f-40c7d771167d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/guest.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/r7m.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=writethrough -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:e8:c9:02,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 we can see there is "-avx" in qemu arguments. According above, libvirt can handle cpu feature policy. So change the status to VERIFIED. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |