Bug 12754 - QEMU PCI Passthrough
Summary: QEMU PCI Passthrough
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: x86_64 Unspecified
: Will affect almost no one - Unknown -
Assignee: Peter Müller
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-24 20:12 UTC by Edouard Magharian
Modified: 2022-09-16 09:23 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edouard Magharian 2021-12-24 20:12:19 UTC
Enable the vfio-pci module so PCI passthrough to QEMU VM's can work.

Please see here for more information:
https://community.ipfire.org/t/qemu-pci-passthrough/6883
https://community.ipfire.org/t/vfio-kernel-module-for-pci-passthrough/1056
Comment 1 Edouard Magharian 2022-01-30 07:48:26 UTC
Any updates on this? Would it help if I were to submit a patch instead?
Comment 2 Michael Tremer 2022-01-31 09:01:58 UTC
If Arne gives his okay, I would like you submitting a patch.
Comment 3 Michael K 2022-07-24 12:15:12 UTC
+1

It is a common module in all major linux distros quite for a while.

In the meanwhile, how do I compile the kernel modules myself?
Loaded the sources so far, stuck at getting gcc. Do you have a special way to compile the kernel?
Comment 4 Michael Tremer 2022-07-25 08:23:36 UTC
(In reply to Michael K from comment #3)
> In the meanwhile, how do I compile the kernel modules myself?

You will have to compile the entire distribution. IPFire won't load any kernel modules that have been built later on for security reasons.

> Loaded the sources so far, stuck at getting gcc. Do you have a special way
> to compile the kernel?

Build instructions are here: https://wiki.ipfire.org/devel/ipfire-2-x/build-howto
Comment 5 Peter Müller 2022-07-28 15:14:40 UTC
With regards to security, I would like to stress the importance of IOMMU support. In case of vfio-pci being enabled on hardware without IOMMU support (configurable through kconfig), all devices share a flat view of physical memory without any memory translation operation, with obvious security implications, given that vfio-pci exists to make such devices available to userspace.

Therefore, I am okay with enabling this, as long as CONFIG_VFIO_NOIOMMU remains unset.
Comment 6 Michael Tremer 2022-07-28 15:15:26 UTC
I asked Arne this week to enable this in one of the next kernel builds.