The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7506
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From beaf493c71f3df6f1a22dadebb3a0b19b0c33e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 9 Jun 2020 16:44:08 -0400 Subject: [PATCH] lxd/vm: Fix PCIe slot for physical/sriov nic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/instance/drivers/driver_qemu_templates.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lxd/instance/drivers/driver_qemu_templates.go b/lxd/instance/drivers/driver_qemu_templates.go index beccc89c66..69e80ac8cc 100644 --- a/lxd/instance/drivers/driver_qemu_templates.go +++ b/lxd/instance/drivers/driver_qemu_templates.go @@ -380,9 +380,26 @@ fd = "{{.tapFD}}" // Devices use "lxd_" prefix indicating that this is a user named device. var qemuNetdevPhysical = template.Must(template.New("qemuNetdevPhysical").Parse(` +{{if eq .architecture "x86_64" "aarch64" -}} +[device "qemu_pcie{{.chassisIndex}}"] +driver = "pcie-root-port" +port = "0x{{.nicIndex}}" +chassis = "{{.chassisIndex}}" +bus = "pcie.0" +addr = "0x4.0x{{.nicIndex}}" +multifunction = "on" +{{- end }} + # Network card ("{{.devName}}" device) [device "dev-lxd_{{.devName}}"] driver = "vfio-pci" host = "{{.pciSlotName}}" bootindex = "{{.bootIndex}}" +{{if eq .architecture "ppc64le" -}} +bus = "pci.0" +{{else -}} +bus = "qemu_pcie{{.chassisIndex}}" +addr = "0x0" +{{end -}} + `))
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel