Threadripper Reset Fixes

@wendell You mentioned Vega 56 is the best value proposition… what would happen when a Vega 28 and Vega 32 come out? I would go for a Vega 32 personally for the host OS and a Vega 56 for the VM.

Also, interesting that QEMU made the CPUID a Opteron in the VM…

libvirt does this to ensure the VM is migrateable, it also disables CPU features that prevent live migrations of hosts. For these reasons and more I have stopped using libvirt entirely.

Also, see QEMU/libvirt SATA disk performance for tuning when passing through a SATA disk rather then the PCI device as @wendell did here.

What do you use in lieu of libvirt? Just straight qemu? or do you use xen/esxi etc

Yes, straight Qemu, libvirt is simply a qemu wrapper.

1 Like

You can stop it from doing that by using virsh edit $your_vm_name_here and changing the cpu line to read <cpu mode='host-passthrough' check='none'>.

But yes, the default is annoying.

Edit: after you do that, don’t touch the cpu definition anymore in the GUI or it’ll revert back to non-passthrough.

The package name is rpm-build.

Would this be the long awaited fix, that clears up following the concerns:
a) Peeps who wanted to buy & get stable VFIO/Passthrough functionality,
in threadripper but contemplating :thinking:.
b) Concerns about it being a microcode/AGESA or silicon bug( like Ryzen Performance Marginality problem)

So… can I assume, that as far as every aspect of virtualization is concerned, the threadripper CPU’s silicon is good to go ? (and any missing functionality would have to do with the the OS catching up hereafter & maybe anyone can now buy a threadripper with their eyes closed :innocent:)

Hi all, first post after reading/following this site and the youtube channel for about half a year now! My name is Paul, and ultimate goal at the moment is I’m trying to convert myself to using Linux full-time as my main environment.

Just posting to introduce quickly and add another confirmation here - I’ve managed to replicate everything described above and the patch works! Thankyou to all who are clearly devoted to getting this working as best as it can, wendell, geoff “gnif” etc.

I consider myself a bit of a newbie still on most things Linux, so I wrote up a small “guide” whilst I was figuring everything out - from livecd install to a working VM with GPU passthrough, if anyone is interested. I’ve gone through it about 5 or 6 times by now, tweaking it each time, initially to make my own life easier not having to remember the exact order of steps. Might be useful to someone!

Also managed to encounter and then work around the code 43 issue, so now I have 2 identical nVidia GPU’s, both connected to the same monitor (this feels wrong!) - the nouveau driver only grabs one GPU and I can pass through the other to a Windows VM and install working Windows nVidia drivers on there.

Anyway, just saying hi, and thanks!

EDIT

Attached is the guide, my very first one so be brutal! Audio pass-through is still a bit dodgy, but I managed to figure out how to get Nvidia drivers installed on both Fedora and Windows, in place of nouveau, and wayland seems to work fine as well.
Let me know if this should be it’s own thread/out of the way:
fedora-threadripper-gpu-passthrough.txt (20.2 KB)

6 Likes

sudo dnf install rpmbuild perl-devel perl-generators openssl-devel hmaccalc elfutils-devel
Last metadata expiration check: 0:38:03 ago on Sun 11 Feb 2018 03:06:15 PM CST.
No match for argument: rpmbuild
Error: Unable to find a match

error 2

fedpkg local
Downloading linux-4.15.tar.xz
######################################################################## 100.0%
Downloading patch-4.15-git9.xz
######################################################################## 100.0%
error: line 27: Unknown tag: define buildid trpatch
error: query of specfile /home/kevin/kernel/kernel.spec failed, can’t parse

Could not execute local: Could not get n-v-r-e from ‘\n\n’

No match for package:
replace rpmbuild with rpm-build and it will work.

Fedpkg error:
Open kernel.spec again and change the define line near the top to look like this instead:
%define buildid .trpatch

Notice there is a % and a dot missing from your command.

2 Likes

error 3… I am pretty sure linux guides are required to never ever work correctly.

fedpkg local
error: Failed build dependencies:
flex is needed by kernel-4.16.0-0.rc0.git9.1.fc28.x86_64

Could not execute local: rpmbuild --define ‘_sourcedir /home/kevin/kernel’ --define ‘_specdir /home/kevin/kernel’ --define ‘_builddir /home/kevin/kernel’ --define ‘_srcrpmdir /home/kevin/kernel’ --define ‘_rpmdir /home/kevin/kernel’ --define ‘dist .fc28’ --define ‘fedora 28’ --eval ‘%undefine rhel’ --define ‘fc28 1’ --eval ‘%undefine fc27’ -ba /home/kevin/kernel/kernel.spec | tee .build-4.16.0-0.rc0.git9.1.fc28.log

If “flex” is needed:
dnf install flex

oh snap it looks like it may go this time!!

Be prepared to wait about 20 mins, and your fans will go nuts, in my experience anyway!
Ignore cat broken pipe errors. Pretty much ignore all errors that come up if it gets past the first few bits.

If this doesnt work, try running fedpkg switch-branch f27, edit kernel.spec again, ensure tr.patch is present and then do fedpkg local. I have had better results on f27 - it now downloads kernel 4.15 and builds as 4.15, not 4.16, as I imagine you are seeing by now.

I tired before your advise but it errored out…

[kevin@localhost kernel]$ fedpkg switch-branch f27
Could not execute switch_branch: /home/kevin/kernel has uncommitted changes. Use git status to see details
[kevin@localhost kernel]$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.

Changes not staged for commit:
(use “git add …” to update what will be committed)

(use “git checkout – …” to discard changes in working directory)

    modified:   kernel.spec

Untracked files:
(use “git add …” to include in what will be committed)

    .build-4.16.0-0.rc0.git9.1.fc28.log
    tr.patch

no changes added to commit (use “git add” and/or “git commit -a”)
[kevin@localhost kernel]$ git commit -a
Aborting commit due to empty commit message.
[kevin@localhost kernel]$ fedpkg switch-branch f27 ?
usage: fedpkg [-h] [–config CONFIG] [–release RELEASE | --dist DIST]
[–module-name MODULE_NAME] [–user USER] [–password PASSWORD]
[–runas RUNAS] [–path PATH] [–verbose] [–debug] [-q]
[–user-config USER_CONFIG]
{help,build,chain-build,clean,clog,clone,co,copr-build,commit,ci,compile,container-build,container-build-setup,diff,gimmespec,gitbuildhash,giturl,import,install,lint,local,mockbuild,mock-config,module-build,module-build-cancel,module-build-info,module-build-local,module-build-watch,module-overview,new,new-sources,patch,prep,pull,push,scratch-build,sources,srpm,switch-branch,tag,unused-patches,upload,verify-files,verrel,retire,update,request-repo,request-branch}

It is still rolling along. we will see what happens. Does the patch also include the NPT patch?

Wait until the current build is done before trying to change anything or you’ll have a mess to deal with…
Should be fine to do another build afterwards, but youll notice it creates .rpm files in /root/kernel and /root/kernel/x86_64. When I was figuring all this out, I would delete them so I didn’t get confused when installing the second/third build I was trying.

Careful with delete commands as root!

rm /root/kernel/*.rpm
rm /root/kernel/x86_64/*.rpm

When done and you switch-branch, you will indeed still get the git error - I see you tried to fix it, but it’s the other option you want. If you want to commit I think you need to setup a git account and it commits it to the git website (I’m not a developer, I’ve never used git, someone educate us please!).

Anyway just discard the changes, that means it will delete tr.patch and restore kernel.spec to original so have tr.patch elsewhere:
git checkout

Then switch-branch, etc, and it should work.

I made the first post a wiki so it can be edited by trusted users. updated rpm-build and added flex

2 Likes

This is awesome. I was hoping to get some clarification on a couple of things. I am new to this.
I dont’ know what this is? "rpm -i the appropriate rpms from arch/x86_64"
How do I apply the tr.patch?

Is there going to be a video walkthrough of this?
Thanks

I’m new here. Normally just a forum lurker, but I felt compelled to make an account to thank @wendell, Geoff, and everyone else who made this possible.

<mushy_personal_note>
Comp sci student, 1 year Linux convert. As a fellow person who gets anxiety running Windows on bare metal, but a programmer not nearly adept enough to do this on his own, I really appreciate this.

To many of my university peers, Linux is just a box you put inside of WIndows or Mac. Projects like these have potential to turn that on its head. Thank you.
</mushy_personal_note>

I have an 1950x and am using the Java “dirty fix” and it works like a charm. Thanks for all the hardwork!