Whew, after some hurdles I managed to install a Linux Mint 19 guest (Ubuntu 18.04). After all updates, here the output:
$ dmesg | grep microcode [ 0.036780] core: PEBS disabled due to CPU errata, please upgrade microcode
So the microcode in the guest is not loaded! But see below:
$ cat /proc/cpuinfo | grep flags flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid tsc_adjust xsaveopt arat
Here is the qemu command I use for this Linux guest (it is almost identical to the Windows 10 VM command):
qemu-system-x86_64 \ -runas user \ -monitor stdio \ -serial none \ -parallel none \ -nodefaults \ -nodefconfig \ -name $vmname,process=$vmname \ -machine q35,accel=kvm,kernel_irqchip=on \ -cpu host,kvm=off,hv_vendor_id=1234567890ab,hv_vapic,hv_time,hv_relaxed,hv_spinlocks=0x1fff \ -smp 6,sockets=1,cores=3,threads=2 \ -m 16G \ -mem-path /dev/hugepages \ -mem-prealloc \ -balloon none \ -rtc base=localtime,clock=host \ -vga none \ -nographic \ -soundhw hda \ -device vfio-pci,host=02:00.0,multifunction=on \ -device vfio-pci,host=02:00.1 \ -device vfio-pci,host=00:1a.0 \ -device vfio-pci,host=08:00.0 \ -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \ -drive if=pflash,format=raw,file=/tmp/my_vars.fd \ -boot order=c \ -drive id=disk0,if=virtio,cache=none,format=raw,file=/home/user/win.img \ -netdev type=tap,id=net0,ifname=vmtap0,vhost=on \ -device virtio-net-pci,netdev=net0,mac=00:16:3e:00:01:01
Kernel: 4.15.0-33-generic x86_64
$ grep microcode /proc/cpuinfo microcode : 0x1 microcode : 0x1 microcode : 0x1 microcode : 0x1 microcode : 0x1 microcode : 0x1
In essence: The microcode is NOT loaded in the Linux VM. However, the following feature flags are listed: "pti ssbd ibrs ibpb". The "stibp" flag is missing.
Hope this helps.
Whew, after some hurdles I managed to install a Linux Mint 19 guest (Ubuntu 18.04). After all updates, here the output:
$ dmesg | grep microcode
[ 0.036780] core: PEBS disabled due to CPU errata, please upgrade microcode
So the microcode in the guest is not loaded! But see below:
$ cat /proc/cpuinfo | grep flags
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid tsc_adjust xsaveopt arat
Here is the qemu command I use for this Linux guest (it is almost identical to the Windows 10 VM command):
qemu-system-x86_64 \ process= $vmname \ kvm,kernel_ irqchip= on \ off,hv_ vendor_ id=1234567890ab ,hv_vapic, hv_time, hv_relaxed, hv_spinlocks= 0x1fff \ 1,cores= 3,threads= 2 \ clock=host \ host=02: 00.0,multifunct ion=on \ host=02: 00.1 \ host=00: 1a.0 \ host=08: 00.0 \ format= raw,readonly, file=/usr/ share/OVMF/ OVMF_CODE. fd \ format= raw,file= /tmp/my_ vars.fd \ if=virtio, cache=none, format= raw,file= /home/user/ win.img \ id=net0, ifname= vmtap0, vhost=on \ net-pci, netdev= net0,mac= 00:16:3e: 00:01:01
-runas user \
-monitor stdio \
-serial none \
-parallel none \
-nodefaults \
-nodefconfig \
-name $vmname,
-machine q35,accel=
-cpu host,kvm=
-smp 6,sockets=
-m 16G \
-mem-path /dev/hugepages \
-mem-prealloc \
-balloon none \
-rtc base=localtime,
-vga none \
-nographic \
-soundhw hda \
-device vfio-pci,
-device vfio-pci,
-device vfio-pci,
-device vfio-pci,
-drive if=pflash,
-drive if=pflash,
-boot order=c \
-drive id=disk0,
-netdev type=tap,
-device virtio-
Kernel: 4.15.0-33-generic x86_64
$ grep microcode /proc/cpuinfo
microcode : 0x1
microcode : 0x1
microcode : 0x1
microcode : 0x1
microcode : 0x1
microcode : 0x1
In essence:
The microcode is NOT loaded in the Linux VM. However, the following feature flags are listed: "pti ssbd ibrs ibpb". The "stibp" flag is missing.
Hope this helps.