Fedora 27 Repository for Patched QEMU and Linux 4.15.15

Hi All!

I just wanted to announce that I’ve created a copr repo for Fedora 27. This repo houses two packages for the time being, kernel and qemu. I’m planning to expand it to other tools that may not be available in the main repos. If anyone has package requests, feel free to suggest them below!

The kernel package is a modified version of the standard Fedora kernel with the ACS and NPT patches applied.

The qemu package is a modified version of the standard Fedora qemu package with elf64 support, Zen SMT suppport, Mouse side button support, Looking Glass ivshmem patches, Audio fixes and VCPU Pinning support.

You can find the repo here: https://copr.fedorainfracloud.org/coprs/kebrx/QEMU-Patched/

To use the repo, use the following command:

sudo dnf copr enable kebrx/QEMU-Patched

Then just sudo dnf update and you’ll pull down the patched versions.


If you’re having issues with updates being automatic, you’ll need to change priorities.

In /etc/yum.repos.d/_copr_kebrx-QEMU-Patched.repo, put the following under [kebrx-QEMU-Patched]:

priority=1

In /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo, put the following under [fedora] and [fedora-updates], respectively:

priority=50
13 Likes

While I was compiling a new kernel with the npt patch I saw your copr repo, I ended up finishing that but decided to try yours first. Thanks for putting in the work and setting the repo up. I can confirm this repo works great and I’m not sure about the tuning with qemu, but I’m going to assume it helped :slight_smile: Much nicer to download this instead of compiling for 5+ hours…

Performance improvements are crazy. I have a AMD Ryzen 7 1700x, 16GB DDR4, RX 560 machine with fairly standard pass-through setup. I was playing Dirty Bomb and fps went from 14fps, lowest settings @ 720p with stuttering to running silky smooth at 130fps+ at 1080p. Nice work finding the issue @gnif :+1:

2 Likes

Hi.

@SgtAwesomesauce Is this still updated ?

2 Likes

Not currently, but based on some of the troubles I’ve been having, I’m going to be updating it this weekend.

NPT patch is mainlined for 4.14 and 4.15, the rest require patches.

2 Likes

That sounds awsome! As it is the ACS patch i need for the latest 4.15 on fedora

Yeah, I’m going to get that up and running today if possible. I’ve been working on it, but compilation is quite time consuming.

Thank you, thank you!

Your work with this i much appreciated. :pray:

1 Like

Build has just about completed (I’ve been debugging system issues last night), so I’m just going to validate it before I put it up on COPR.

EDIT: Build passed validation, I’m gonna throw this up for copr to build, that will likely take 6-8 hours, but when that’s done, you should be able to dnf update to get it.

COPR Build: https://copr.fedorainfracloud.org/coprs/kebrx/QEMU-Patched/build/729618/

5 Likes

So build is done and you can update now.

3 Likes

Thank you very much!
I spent about one week by trying passthrough the usb-hub pcie card)
But now I hope it’ll happens))

I updated the F27 from your repository.

So, just one question: how to activate your ACS patch in order to put my card in separate iommu group?

(I tried to add something like
this "pcie_acs_patch=downstream pci-stub.ids="1003:1f1f ", but after rebooting nothing changed with my card )

If downstream isn’t enough you can try adding multifunction which should show more devices but this is usually discouraged as it can cause some issues on certain devices depending on how they are mixed together.

pcie_acs_override=downstream,multifunction 
1 Like

… and do I need to put “pci-stub.ids=…” or it’s optional?

Its optional, it shouldn’t be needed at all as the card won’t be using the pci-stub driver. should just be able to add the device to the VM after changing the pcie_acs_override.

… something went wrong)

which one is right parametr: pcie_acs_patch=
or pcie_acs_override=

?
PS
kernel v.: 4.15.13-300.fc27.x86_64

I haven’t heard of pcie_acs_patch= but I’ve used pcie_acs_override= with this kernel on Fedora 27 and it works.

The acs patch isn’t in the 4.15.13-300.fc27.x86_64 kernel and the latest version in the copr repo at this time is 4.15.9-300.acs.fc27.x86_64. Are you sure your loading the kernel with the acs patch applied?

… not at all now : -(

I’m noob in linux))

So I just execute the commands :

sudo dnf copr enable kebrx/QEMU-Patched
Then just sudo dnf update and you’ll pull down the patched versions.

May be I should downgrade the kernel before making this update?

The copr repo includes the kernel you need, you shouldn’t need to downgrade anything, just run:

sudo dnf copr enable kebrx/QEMU-Patched
sudo dnf update

which should download and install the new kernel and select it in your grub options when booting. If dnf update can’t find it manaully install it with:

sudo dnf install kernel-4.15.9-300.acs.fc27.x86_64

If you are using nvidia drivers you may also need to install the kernel-devel as well.

Yeeesss!

Thank you!!!
I see my devices in separate groups now!))

… but startx don’t want to start x)
I try to execute dnf install kernel-devel - it’s installs the kernel-devel 4.15.13
May be I need another version?

1 Like

Are you using Nvidia drivers? if so run:

sudo dnf install kernel-devel-4.15.9-300.acs.fc27.x86_64

also it should do it automatically but you can force build the akmod with:

sudo akmods --kernels 4.15.9-300.acs.fc27.x86_64