Wind River Support Network

HomeDefectsLIN9-9353
Fixed

LIN9-9353 : OVP - unsupported configuration: CPU specification not supported by hypervisor

Created: Nov 21, 2019    Updated: Mar 23, 2020
Resolved Date: Dec 19, 2019
Found In Version: 9.0.0.20
Fix Version: 9.0.0.24
Severity: Severe
Applicable for: Wind River Linux 9
Component/s: Userspace

Description

Unable to create guest when <cpu mode='host-model'> is used in virsh .xml to pass host CPU flags to guest,
 * 
 ** 
 *** 
 **** 
 ***** BOARD DETAILS *****

root@wr-ptx1k-node:/opt/windriver# /sbin/boardinfo platform
 PTX1K
 root@wr-ptx1k-node:/opt/windriver#
 root@wr-ptx1k-node:/opt/windriver# cat /proc/cpuinfo
 processor : 0
 vendor_id : GenuineIntel
 cpu family : 6
 model : 58
 model name : Intel(R) Xeon(R) CPU @ 2.50GHz
 stepping : 9
 microcode : 0x20
 cpu MHz : 2500.000
 cache size : 8192 KB
 physical id : 0
 siblings : 8
 core id : 0
 cpu cores : 4
 apicid : 0
 initial apicid : 0
 fpu : yes
 fpu_exception : yes
 cpuid level : 13
 wp : yes
 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c *rdrand* lahf_lm epb kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm arat pln pts
 bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
 bogomips : 5000.19
 clflush size : 64
 cache_alignment : 64
 address sizes : 36 bits physical, 48 bits virtual
 power management:
 * 
 ** 
 *** 
 **** 
 ***** WRL9 RCPL23 *****

root@wr-ptx1k-node:/opt/windriver# uname -a
 Linux wr-ptx1k-node 4.8.28-rt10-WR9.0.0.23_ovp #1 SMP Tue Nov 12 16:41:40 IST 2019 x86_64 x86_64 x86_64 GNU/Linux
 root@wr-ptx1k-node:/opt/windriver#
 root@wr-ptx1k-node:/opt/windriver# virsh create qemu_guest_without_cpu_host.xml
 Domain vm_without_cpu_mode created from qemu_guest_without_cpu_host.xml

root@wr-ptx1k-node:/opt/windriver# virsh create qemu_guest_with_cpu_host.xml
 Domain vm_with_cpu_mode created from qemu_guest_with_cpu_host.xml

root@wr-ptx1k-node:/opt/windriver# virsh list
 Id Name State
 ----------------------------------------------------
 1 vjunos0 running
 2 vm_without_cpu_mode running
 3 vm_with_cpu_mode running

root@wr-ptx1k-node:/opt/windriver#
 * 
 ** 
 *** 
 **** 
 ***** WRL9 RCPL20 *****

root@wr-ptx1k-node:/opt/windriver# uname -a
 Linux wr-ptx1k-node 4.8.28-rt10-WR9.0.0.20_ovp #1 SMP Wed Sep 11 05:07:40 PDT 2019 x86_64 x86_64 x86_64 GNU/Linux
 root@wr-ptx1k-node:/opt/windriver# virsh create qemu_guest_without_cpu_host.xml
 Domain vm_without_cpu_mode created from qemu_guest_without_cpu_host.xml

root@wr-ptx1k-node:/opt/windriver# virsh create qemu_guest_with_cpu_host.xml
 *error: Failed to create domain from qemu_guest_with_cpu_host.xml*
 *error: unsupported configuration: CPU specification not supported by hypervisor*

root@wr-ptx1k-node:/opt/windriver#
 root@wr-ptx1k-node:/opt/windriver# virsh list
 Id Name State
 ----------------------------------------------------
 1 vjunos0 running
 2 vm_without_cpu_mode running

root@wr-ptx1k-node:/opt/windriver#
 * 
 ** 
 *** 
 **** 
 ***** Guest xml files used in tests *****

root@wr-ptx1k-node:/opt/windriver# cat qemu_guest_without_cpu_host.xml
 <domain type='kvm'>
 <name>vm_without_cpu_mode</name>
 <memory>512000</memory>
 <currentMemory>512000</currentMemory>
 <vcpu>1</vcpu>
 <os>
 <type arch='x86_64' machine='pc'>hvm</type>
 <boot dev='hd' />
 <kernel>/opt/windriver/bzImage-qemux86-64.bin</kernel>
 <cmdline>console=ttyS0 root=/dev/vda rw ip=dhcp</cmdline>
 </os>
 <devices>
 <disk type='file' device='disk'>
 <source file='/opt/windriver/wrlinux-image-ovp-guest-qemux86-64.ext4'/>
 <target dev='vda' bus='virtio' />
 </disk>
 <serial type='pty'>
 <source path='/dev/pts/0'/>
 <target port='0'/>
 </serial>
 <console type='pty' tty='/dev/pts/0'>
 <source path='/dev/pts/0'/>
 <target port='0'/>
 </console>
 <interface type='bridge'>
 <model type='virtio'/>
 <source bridge='virbr0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
 </interface>
 <rng model='virtio'>
 <rate period='2000' bytes='1234'/>
 <backend model='random'>/dev/random</backend>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x1E' function='0x0'/>
 </rng>
 </devices>
 </domain>
 root@wr-ptx1k-node:/opt/windriver#

root@wr-ptx1k-node:/opt/windriver# cat qemu_guest_with_cpu_host.xml
 <domain type='kvm'>
 <name>vm_with_cpu_mode</name>
 <memory>512000</memory>
 <currentMemory>512000</currentMemory>
 <vcpu>1</vcpu>
 <os>
 <type arch='x86_64' machine='pc'>hvm</type>
 <boot dev='hd' />
 <kernel>/opt/windriver/bzImage-qemux86-64.bin</kernel>
 <cmdline>console=ttyS0 root=/dev/vda rw ip=dhcp</cmdline>
 </os>
 *<cpu mode='host-model'>*
 *<model fallback='forbid'/>*
 *</cpu>*
 <devices>
 <disk type='file' device='disk'>
 <source file='/opt/windriver/wrlinux-image-ovp-guest-qemux86-64.ext4'/>
 <target dev='vda' bus='virtio' />
 </disk>
 <serial type='pty'>
 <source path='/dev/pts/0'/>
 <target port='0'/>
 </serial>
 <console type='pty' tty='/dev/pts/0'>
 <source path='/dev/pts/0'/>
 <target port='0'/>
 </console>
 <interface type='bridge'>
 <model type='virtio'/>
 <source bridge='virbr0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
 </interface>
 <rng model='virtio'>
 <rate period='2000' bytes='1234'/>
 <backend model='random'>/dev/random</backend>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x1E' function='0x0'/>
 </rng>
 </devices>
 </domain>
 root@wr-ptx1k-node:/opt/windriver#

Workaround

NA

Steps to Reproduce

WRL9 OVP host project - WRL9 RCPL0020
 wrlinux-9/setup.sh --dl-layers --distros wrlinux-ovp --machines intel-x86-64 --kernel ovp --templates feature/kernel-ovp-kvm --layers wr-kernel wr-ovp

. ./environment-setup-x86_64-wrlinuxsdk-linux
 . ./oe-init-build-env build

bitbake wrlinux-image-ovp-kvm

WRL9 OVP guest project:
 wrlinux-9/setup.sh --machine qemux86-64 --distro wrlinux-ovp --kernel ovp --template feature/kernel-ovp-guest --dl-layers

. ./environment-setup-x86_64-wrlinuxsdk-linux
 . ./oe-init-build-env build

bitbake wrlinux-image-ovp-guest

Use attached xml files to create guest, you will get error while creating guest with <cpu mode='host-model'> in it.
Live chat
Online