Du bist nicht angemeldet.

#1 29.04.2020 18:52:02

FatTony
Mitglied

PCI passthrough via OVMF - Kein Video-Output

Ich versuche gerade anhand des wikis eine meiner gpus für eine VM verfügbar zu machen.
Wenn ich jetzt versuche zu booten, gibt allerdings keine der beiden Karten mehr ein Signal aus.

Meine Hardware:
    - Board: B450 Pro4
    - CPU: Ryzen 5 3600
    - Host-GPU: RX 480
    - Guest-GPU: RX 5600XT


Was ich nach der frischen installation geändert habe:

enable in bios:
	- iommu
	- SVM

----------------------------------------------------------------------------------------------------------------------

sudo pacman -Syyu
sudo pacman -S qemu libvirt ovmf virt-manager ebtables dnsmasq
sudo nano /etc/default/grub
	...
	GRUB_CMDLINE_LINUX_DEFAULT=(... amd_iommu=on iommu=pt ...)
	...

reboot

----------------------------------------------------------------------------------------------------------------------

sudo dmesg | grep -i -e DMAR -e IOMMU
	[    0.647099] iommu: Default domain type: Translated 
	[    0.749773] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
	[    0.750200] pci 0000:00:01.0: Adding to iommu group 0
	[    0.750230] pci 0000:00:01.1: Adding to iommu group 0
	[    0.750258] pci 0000:00:01.3: Adding to iommu group 0
	[    0.750412] pci 0000:00:02.0: Adding to iommu group 1
	[    0.750623] pci 0000:00:03.0: Adding to iommu group 2
	[    0.750650] pci 0000:00:03.1: Adding to iommu group 2
	[    0.750795] pci 0000:00:04.0: Adding to iommu group 3
	[    0.750991] pci 0000:00:05.0: Adding to iommu group 4
	[    0.751136] pci 0000:00:07.0: Adding to iommu group 5
	[    0.751159] pci 0000:00:07.1: Adding to iommu group 5
	[    0.751363] pci 0000:00:08.0: Adding to iommu group 6
	[    0.751387] pci 0000:00:08.1: Adding to iommu group 6
	[    0.751409] pci 0000:00:08.2: Adding to iommu group 6
	[    0.751432] pci 0000:00:08.3: Adding to iommu group 6
	[    0.751625] pci 0000:00:14.0: Adding to iommu group 7
	[    0.751644] pci 0000:00:14.3: Adding to iommu group 7
	[    0.751802] pci 0000:00:18.0: Adding to iommu group 8
	[    0.751821] pci 0000:00:18.1: Adding to iommu group 8
	[    0.751838] pci 0000:00:18.2: Adding to iommu group 8
	[    0.751856] pci 0000:00:18.3: Adding to iommu group 8
	[    0.751876] pci 0000:00:18.4: Adding to iommu group 8
	[    0.751893] pci 0000:00:18.5: Adding to iommu group 8
	[    0.751911] pci 0000:00:18.6: Adding to iommu group 8
	[    0.751929] pci 0000:00:18.7: Adding to iommu group 8
	[    0.751976] pci 0000:01:00.0: Adding to iommu group 0
	[    0.752004] pci 0000:01:00.1: Adding to iommu group 0
	[    0.752040] pci 0000:02:00.0: Adding to iommu group 0
	[    0.752064] pci 0000:02:00.1: Adding to iommu group 0
	[    0.752089] pci 0000:02:00.2: Adding to iommu group 0
	[    0.752111] pci 0000:03:00.0: Adding to iommu group 0
	[    0.752134] pci 0000:03:01.0: Adding to iommu group 0
	[    0.752156] pci 0000:03:04.0: Adding to iommu group 0
	[    0.752178] pci 0000:03:05.0: Adding to iommu group 0
	[    0.752201] pci 0000:03:06.0: Adding to iommu group 0
	[    0.752223] pci 0000:03:07.0: Adding to iommu group 0
	[    0.752245] pci 0000:03:08.0: Adding to iommu group 0
	[    0.752268] pci 0000:08:00.0: Adding to iommu group 0
	[    0.752299] pci 0000:09:00.0: Adding to iommu group 0
	[    0.752336] pci 0000:0a:00.0: Adding to iommu group 0
	[    0.752361] pci 0000:0b:00.0: Adding to iommu group 2
	[    0.752386] pci 0000:0c:00.0: Adding to iommu group 2
	[    0.752435] pci 0000:0d:00.0: Adding to iommu group 2
	[    0.752467] pci 0000:0d:00.1: Adding to iommu group 2
	[    0.752486] pci 0000:0e:00.0: Adding to iommu group 5
	[    0.752506] pci 0000:0f:00.0: Adding to iommu group 6
	[    0.752524] pci 0000:0f:00.1: Adding to iommu group 6
	[    0.752542] pci 0000:0f:00.3: Adding to iommu group 6
	[    0.752560] pci 0000:0f:00.4: Adding to iommu group 6
	[    0.752580] pci 0000:10:00.0: Adding to iommu group 6
	[    0.752601] pci 0000:11:00.0: Adding to iommu group 6
	[    0.752857] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
	[    0.754238] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
	[    0.790152] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
	[   10.050657]  x_tables ext4 crc32c_generic crc16 mbcache jbd2 hid_logitech_hidpp uas usb_storage hid_logitech_dj sd_mod hid_generic usbhid hid ahci libahci crc32c_intel libata xhci_pci xhci_hcd scsi_mod vfio_pci irqbypass vfio_virqfd vfio_iommu_type1 vfio

shopt -s nullglob
for g in /sys/kernel/iommu_groups/*; do
    echo "IOMMU Group ${g##*/}:"
    for d in $g/devices/*; do
        echo -e "\t$(lspci -nns ${d##*/})"
    done;
done;
	IOMMU Group 0:
		00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
		00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
		00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
		01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev c7)
		01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
		02:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
		02:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller [1022:43c8] (rev 01)
		02:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge [1022:43c6] (rev 01)
		03:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:05.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:06.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:07.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		03:08.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
		08:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
		09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
		0a:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation E12 NVMe Controller [1987:5012] (rev 01)
	IOMMU Group 1:
		00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
	IOMMU Group 2:
		00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
		00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
		0b:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch [1002:1478] (rev c1)
		0c:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479]
		0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1002:731f] (rev c1)
		0d:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
	IOMMU Group 3:
		00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
	IOMMU Group 4:
		00:05.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
	IOMMU Group 5:
		00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
		00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
		0e:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function [1022:148a]
	IOMMU Group 6:
		00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
		00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
		00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
		00:08.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
		0f:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
		0f:00.1 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP [1022:1486]
		0f:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
		0f:00.4 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller [1022:1487]
		10:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
		11:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
	IOMMU Group 7:
		00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
		00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
	IOMMU Group 8:
		00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 0 [1022:1440]
		00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 1 [1022:1441]
		00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 2 [1022:1442]
		00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 3 [1022:1443]
		00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 4 [1022:1444]
		00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 5 [1022:1445]
		00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 6 [1022:1446]
		00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 7 [1022:1447]

sudo nano /etc/mkinitcpio.conf
	...
	MODULES=(... vfio_pci vfio vfio_iommu_type1 vfio_virqfd ...)
	...
	HOOKS=(... modconf ...)
	...

sudo nano /etc/modprobe.d/vfio.conf
	options vfio-pci ids=1002:731f,1002:ab38


sudo mkinitcpio -p linux54
reboot

Jetzt sollte beim boot die guest-gpu kein signal mehr ausgeben, die host-gpu allerdings schon.
Beide Monitore sind backlight, haben also wohl eine Verbindung bleiben aber schwarz.

Hat jemand eine Idee woran das liegen kännte / wass ich ändern muss?
Falls es logs gibt in denen informationen stehen poste ich diese gerne, ich weiß nur überhaupt nicht wo ich suchen soll.

PS: Ich verwende Manjaro, aber da der Wiki Post vom Arch Forum ist, poste ich hier.

Beitrag geändert von FatTony (29.04.2020 18:55:49)

Offline

#2 30.04.2020 14:01:08

wirr
Mitglied

Re: PCI passthrough via OVMF - Kein Video-Output

Kommst du an die Logs von den Boots ohne funktionierenden Monitor?

Offline

#3 30.04.2020 14:18:43

FatTony
Mitglied

Re: PCI passthrough via OVMF - Kein Video-Output

Ich bin über ein live system in das Host system chroot'ed, habe da die vfio.conf geleert und "sudo mkinitcpio -p linux54" ausgeführt.
Dadurch kann ich normal booten.

Wenn du mir sagst wo die boot logs liegen Post ich die hier.

Offline

#4 30.04.2020 14:43:15

wirr
Mitglied

Re: PCI passthrough via OVMF - Kein Video-Output

Den log vom letzten Boot findest du so:

journalctl -b-1

Für den vorletzten wärs dann -b-2...

Offline

#5 30.04.2020 16:05:27

FatTony
Mitglied

Re: PCI passthrough via OVMF - Kein Video-Output

Ich habe nochmal mit den beschriebenen Einstellungen gebootet und danach folgendes ausgelesen:
Pastebin

Offline

Schnellantwort auf dieses Thema

Schreibe deinen Beitrag und versende ihn
Deine Antwort

Fußzeile des Forums