Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

bind kernel driver to only one of two identical pieces of HW

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Atom2
Apprentice
Apprentice
Posts: 185
Joined: Mon Aug 01, 2011 9:16 am

bind kernel driver to only one of two identical pieces of HW

  • Quote

Post by Atom2 » Tue May 02, 2017 11:29 pm

Hi guys,
Anybody knows how to restrict loading of a kernel device driver to only one of many (in my case two) identical pieces of PCIe cards installed in the system? To be more specific, I have two identical SAS controllers installed in my server. The first SAS controller is used to boot the system thus the driver for the card must be built into the kernel.

Now the built-in driver should however be restricted to only bind to the boot PCIe SAS device and not touch the second (identical) PCIe device. This second device will then be used to be passed through to a virtual machine once the system is up. Clearly the two devices can be distinguished by their unique <domain>:<bus>:<device>:<func> data displayed by lspci. I have however not found any way of providing this data to the in-kernel driver.

The kernel driver btw is the mpt3sas driver used for LSI cards.

Any insight into this would be appreciated.

Thanks Atom2
Top
R0b0t1
Apprentice
Apprentice
Posts: 264
Joined: Thu Jun 05, 2008 9:26 pm

  • Quote

Post by R0b0t1 » Wed May 03, 2017 3:47 am

https://wiki.archlinux.org/index.php/PC ... _host_GPUs

You can pass a device through using bus address.
Top
Atom2
Apprentice
Apprentice
Posts: 185
Joined: Mon Aug 01, 2011 9:16 am

  • Quote

Post by Atom2 » Sun May 07, 2017 12:17 am

R0b0t1 wrote:https://wiki.archlinux.org/index.php/PC ... _host_GPUs

You can pass a device through using bus address.
Thanks for the pointer, it was an interesting read, albeit mainly limited to GPUs for the relevant question. If I have correctly understood this, it would also require the driver to be available as a loadable kernel module and the BIOS of the card to support UEFI - both of which does not work/is not available with my SATA/SAS controller the system is booted from.

The passthrough as such is something I do know how to do (i.e. using the bus address as listed by lspci).

Thanls Atom2
Top
R0b0t1
Apprentice
Apprentice
Posts: 264
Joined: Thu Jun 05, 2008 9:26 pm

  • Quote

Post by R0b0t1 » Sun May 07, 2017 2:12 am

Atom2 wrote:
R0b0t1 wrote:https://wiki.archlinux.org/index.php/PC ... _host_GPUs

You can pass a device through using bus address.
Thanks for the pointer, it was an interesting read, albeit mainly limited to GPUs for the relevant question. If I have correctly understood this, it would also require the driver to be available as a loadable kernel module and the BIOS of the card to support UEFI - both of which does not work/is not available with my SATA/SAS controller the system is booted from.

The passthrough as such is something I do know how to do (i.e. using the bus address as listed by lspci).

Thanls Atom2
It is specific to GPUs but I was hoping the instructions would generalize well; you might refer to QEMU's documentation for PCIe passthrough. I suspect it shares some design with the USB interface which does allow the equivalent of what you want.

Is the main compatibility the use of UEFI? Per my experience doing that with graphics cards the only thing the OVMF firmware is needed for is to keep the passthrough from silently failing - if you are doing it with non VGA devices it should simply work. The other incompatibility, if the driver must be a module, may not be possible to work around. In that case you might need a ramdisk. You should link this thread in #gentoo on irc.freenode.net:6697 if you don't get more replies in a timely fashion.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic