Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel 4.7.0 breaks pci passthrough [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 530
Location: Coruña (Spain)

PostPosted: Sat Jul 30, 2016 9:33 am    Post subject: kernel 4.7.0 breaks pci passthrough [SOLVED] Reply with quote

I'm getting these errors since updating the kernel:

qemu-system-x86_64: -device vfio-pci,host=01:00.0,multifunction=on,x-vga=on,romfile=/home/fran/sync/vm/Sapphire.R9270X.2048.131209.rom: Failed to add group 1 to KVM VFIO device: Invalid argument
qemu-system-x86_64: -device vfio-pci,host=00:1b.0: Failed to add group 7 to KVM VFIO device: Invalid argument

Has anyone tried pci passthrough with kernel 4.7.0? Did you have to change anything to make it work?

(edit) Solution below.


Last edited by Fran on Sat Aug 20, 2016 6:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Tue Aug 02, 2016 5:33 pm    Post subject: Reply with quote

Not yet, that's interesting to know, I will give it a try when I get the chance, right now it works fine with 4.6.5
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Fri Aug 05, 2016 3:17 pm    Post subject: Reply with quote

It still works for me with 4.7.0 but I'm not passing a UEFI bios ROM for my card like you do so that may be an hint...
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 530
Location: Coruña (Spain)

PostPosted: Sat Aug 06, 2016 2:32 pm    Post subject: Reply with quote

Crap. Tried with other options and still doesn't work.

I hope I'm not the only one... don't want to get stuck in 4.6 forever.
Back to top
View user's profile Send private message
zino
n00b
n00b


Joined: 14 Jan 2016
Posts: 21
Location: Switzerland

PostPosted: Sat Aug 20, 2016 5:22 pm    Post subject: Reply with quote

@Fran. Have you by any chance set

Code:
CONFIG_TRIM_UNUSED_KSYMS=y


in you kernel config? If so, try to unset it and recompile your kernel (and reboot, of course). I've just tested this with hardened-sources-4.7.1 and this newly introduced kernel option seems to actually cause the issues you mentioned.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sat Aug 20, 2016 5:50 pm    Post subject: Reply with quote

I think this kernel option is safe only if you have no out of kernel modules.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 530
Location: Coruña (Spain)

PostPosted: Sat Aug 20, 2016 6:54 pm    Post subject: Reply with quote

zino wrote:
@Fran. Have you by any chance set

Code:
CONFIG_TRIM_UNUSED_KSYMS=y


in you kernel config? If so, try to unset it and recompile your kernel (and reboot, of course). I've just tested this with hardened-sources-4.7.1 and this newly introduced kernel option seems to actually cause the issues you mentioned.

THANK YOU! Setting it to =n makes pci passthrough work again with 4.7.1 (and with 4.8-rc2).

I didn't think it could affect qemu, since kvm is part of the kernel and by the description of the option it looked as if only out-of-kernel modules could be affected (I don't have any so I set it to =y).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum