bryansteiner / gpu-passthrough-tutorial

GNU General Public License v3.0
1.45k stars 93 forks source link

Ryzen Host-Passthrough #2

Closed crisboarna closed 4 years ago

crisboarna commented 4 years ago

Hello @bryansteiner ,

Congratulations on a very well written and detailed guide for Linux KVM Passthrough. I happen to have a configuration very similar to yours bar the CPU being a 3700X and have been scouring the net to find solution to my problem. I was hoping you could be of assistance.

When I configure the cpu mode to host-passthrough the vm has significant performance penalty, ranging from long boot time, login, freeze at boot/login/ after login. In fact I only managed to login once with host-passthrough out of all attempts to see in task manager the full CPU as I configured it with Virtualization: Capable.

The only way I can get it to boot is by setting it to custom with <model fallback='allow'>EPYC-IBPB</model> where performance is close to native but it is Virtualization: Not capable.

From what I gather from your post it seems like you have no such issue, could you please tell me if it is due to you running into it but circumventing it or `host-passthrough just works for you ?

bryansteiner commented 4 years ago

Hey Cris,

I did not encounter this issue. However if you take a look at this link (see CPU Features section), you'll see that for QEMU 3.1 and below, "EPYC" is preferred over "host-passthrough":

host-passthrough:

<cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
    <!-- add additional cpu features here-->
 </cpu>

EPYC:

<cpu mode='custom' match='exact' check='none'>
    <model fallback='allow'>EPYC</model>
    <topology sockets='1' cores='4' threads='2'/>
    <feature policy='require' name='topoext'/>
    <!-- add additional cpu features here--> 
</cpu>

My question then of course is what version of QEMU you're running?

bryansteiner commented 4 years ago

Closed due to no response from author with additional requested information.