You are not logged in.

#1 2016-06-22 21:13:20

Observer
Member
Registered: 2016-03-01
Posts: 16

KVM: Passthrough 2 of 4 GbE but with same ID, possible?

Hi guys,

I build a little home server with a supermicro mainboard which has 4 GbE Ports:

IOMMU group 5
	00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #1 [8086:a110] (rev f1)
	00:1c.1 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #2 [8086:a111] (rev f1)
	00:1c.2 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #3 [8086:a112] (rev f1)
	00:1c.3 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #4 [8086:a113] (rev f1)
	00:1c.6 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #7 [8086:a116] (rev f1)
	01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	04:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	05:00.0 PCI bridge [0604]: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge [1a03:1150] (rev 03)
	06:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 30)

2 of 4 ports should be passed through to a VM. Is this possible? The Ports uses all the same ID sad When I add this ID to vfio-pci, then I'll lose all connections at the host or?

I'm afraid that I have to buy an extra LAN card.

Last edited by Observer (2016-06-22 21:13:55)

Offline

#2 2016-06-22 22:44:44

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

The ID just indicates vendor and device type, so it's only natural they all have the same ID. Doesn't PCI address (eg. 01:00.0) also come into play when doing passthrough?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2016-06-23 10:32:46

Observer
Member
Registered: 2016-03-01
Posts: 16

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

I read this wiki article: https://wiki.archlinux.org/index.php/PC … g_vfio-pci

Perhaps I have misunderstood something but they use the ID for vfio-pci. Every tutorial that I found work like this. Some tutorials use the PCI address additionally, this is correct. This will be needed for the QEMU configuration later.

Offline

#4 2016-06-23 11:12:58

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

It's possible to reassign PCI devices between drivers. This instruction is for some other driver but I hope you get the idea.

Offline

#5 2016-06-23 11:31:57

loqs
Member
Registered: 2014-03-06
Posts: 17,362

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

What about the approach outlined in http://vfio.blogspot.co.uk/2015/05/vfio … -host.html.
Specifically the section that starts

Another issue that users encounter when sequestering devices is what to do when there are multiple devices with the same vendor:device ID and some are intended to be used for the host.

Offline

#6 2016-06-23 12:35:47

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

From that same post you can adapt the driver override script to override the driver of the ethernet cards you want to passthrough. Include that script in the initramfs and you should be good to go. You maybe even be able to do it after the machine boots (haven't tried it myself).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2016-06-23 19:58:28

Observer
Member
Registered: 2016-03-01
Posts: 16

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

Thank you all for the information and links! My current state is:

I read the topic from loqs and create a mkinitcpio hook and overwrite 01:00.0 and 02:00.0. After a reboot the GbE are not shown at ip addr. lspci -nnk says:

01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	Subsystem: Super Micro Computer Inc Device [15d9:1533]
	Kernel modules: igb
02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	Subsystem: Super Micro Computer Inc Device [15d9:1533]
	Kernel modules: igb
03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	Subsystem: Super Micro Computer Inc Device [15d9:1533]
	Kernel driver in use: igb
	Kernel modules: igb
04:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	Subsystem: Super Micro Computer Inc Device [15d9:1533]
	Kernel driver in use: igb
	Kernel modules: igb

Something is changed, the kernel driver is missing. Actually there should be "vfio-pci". After some research I found this topic: http://vfio.blogspot.hu/2014/08/iommu-g … d-out.html

The essence is (if I understand it correctly!): It is not possible so separate devices within an IOMMU group. This match with the error message from QEMU: "vfio: error, group 5 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver."

Offline

#8 2016-06-23 20:23:24

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

Then most probably you'll have to check what else is in the same iommu group and also override the driver.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2016-06-23 20:27:53

Observer
Member
Registered: 2016-03-01
Posts: 16

Re: KVM: Passthrough 2 of 4 GbE but with same ID, possible?

Too much:

	01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	04:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
	05:00.0 PCI bridge [0604]: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge [1a03:1150] (rev 03)
	06:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 30)

03:00.0 and 04:00.0 should not be overwritten because this GbE are needed for the OS/Host himself.

Last edited by Observer (2016-06-23 20:28:14)

Offline

Board footer

Powered by FluxBB