KVM not showing correct CPU in VM

Not sure if this is the correct channel for this but…

I have recently built a 1920x Threadripper system and running Ubuntu 19.10 as the host OS. I have installed KVM with a Windows 10 VM but the CPU in the VM is not being reported correctly.

It is being reported as AMD EPYC Processor (with IBPB) I have assigned 8 cpus to the VM but windows task manager is reporting 2 sockets and 2 virtual cpus.

In the details for the VM under CPU there is the drop down menu to select the CPU type but threadripper is not listed.

How can I get the correct CPU detected? I tried VirtualBox and the CPU is detected correctly.

Thanks!

There may just not be a threadripper option. If its just visual, why do you care?

2 Likes

If its just visual then I don’t care. What I care about is if this is impacting my VMs performance by not having KVM detect the correct CPU.

I have a Ryzen 3900x which had a similar problem in my windows 10 VM, showing up as epyc, and not the correct cpu/thread count

First, cpu-mode should be “host-passthrough”… this made my windows vm’s (7 &10) to show as a ryzen 3900x. In fact, windows 7 refuses to update BECAUSE it sees the ryzen processor.
If your using virt-manager you can just type that in the model box under CPU.

second, add this to the cpu tag in your xml
<feature policy='disable' name='smep'>
This, you will have to add by manually editing the vm’s xml file, like this

<cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='4' threads='1'/>
    <feature policy='disable' name='smep'/>

adding the disable seemed to fix my task manager showing the correct cpu/threads.

Thanks for the reply xavier1.

So I made the changes you mentioned in your message but my Win10 VM blue screens immediately with “SYSTEM THREAD EXCEPTION NOT HANDLED” this is when I put “host-passthrough” in leave it on “host-model” boots ok.

Disabling smep didn’t seem to do anything

<cpu mode="host-model" check="none">
<topology sockets="1" cores="8" threads="16"/>
<feature policy="disable" name="smep"/>
</cpu>

Any other ideas?

Thanks

16 threads is not correct.
It should be 2 threads.
Thread count is “threads per cpu core”

Hm, ok well task manager isn’t reporting the correct CPU still however after editing the XML with the correct cpu/thread counts performance is much improved.

Running CPU passmark before the changes got me 1,733 after the changes 14,500 I can live with this… :smile:

Thanks for your help!

glad to hear… although, it still bugs me why disabling smep worked for my task manager showing the correct core count but didn’t work for you.

Woot! Success, so I found the answer to the host-passthrough problem in another thread.

QEMU-KVM-BSOD

So in the thread it says to add the following;

“options kvm ignore_msrs=1” to “/etc/modprobe.d/kvm.conf”

However in my case the file is “/etc/modprobe.d/qemu-system-x86.conf” and when added I rebooted I changed to host-passthrough and disabled SMEP now task manager is reporting the CPU correctly.

Thanks again for the help!

glad you got it all figured out…