Hi,
habe mal Fragen zum durchleiten einer GPU zu QEMU, weil es bei mir nicht richtig klappen möchte.
Ich habe es nach dieser Anleitung gemacht [
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF ]
Mein System besteht unter anderem aus einer Intel i7 6700K und der AMD RX 480 Grafikkarte.
Habe mal alle wichtigen infos hier reingepackt.
Natürlich habe ich den Bildschirm an der Internen GPU angeschlossen damit die andere frei fürs durchleiten ist. 😃
Hoffe mal das jemand eine Idee hat was ich machen kann damit die Grafikkarte in Windows richtig erkannt wird
Bild wie es bei Windows im Gerätemanager ausschaut ist auch noch dabei
Meiner meinung nach wichtige Sachen sind rot
[chrysen@chrysen-pc ~]$ dmesg|grep -e DMAR -e IOMMU
[ 0.000000] ACPI: DMAR 0x0000000077F4DA40 0000A8 (v01 INTEL SKL 00000001 INTL 00000001)
[ 0.000000] DMAR: IOMMU enabled
[ 0.033188] DMAR: Host address width 39
[ 0.033189] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.033193] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e
[ 0.033194] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.033196] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[ 0.033197] DMAR: RMRR base: 0x00000077906000 end: 0x00000077925fff
[ 0.033198] DMAR: RMRR base: 0x00000078800000 end: 0x0000007cffffff
[ 0.033199] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.033200] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.033200] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[ 0.033201] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[ 0.034528] DMAR-IR: Enabled IRQ remapping in xapic mode
[ 1.045552] DMAR: No ATSR found
[ 1.045871] DMAR: dmar0: Using Queued invalidation
[ 1.045874] DMAR: dmar1: Using Queued invalidation
[ 1.046078] DMAR: Setting RMRR:
[ 1.046125] DMAR: Setting identity map for device 0000:00:02.0 [0x78800000 - 0x7cffffff]
[ 1.046150] DMAR: Setting identity map for device 0000:00:14.0 [0x77906000 - 0x77925fff]
[ 1.046154] DMAR: Prepare 0-16MiB unity mapping for LPC
[ 1.046170] DMAR: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[ 1.046185] DMAR: Intel(R) Virtualization Technology for Directed I/O
[chrysen@chrysen-pc ~]$
[chrysen@chrysen-pc ~]$ for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do echo "IOMMU group $(basename "$iommu_group")"; for device in $(ls -1 "$iommu_group"/devices/); do echo -n $'\t'; lspci -nns "$device"; done; done
IOMMU group 0
00:00.0 Host bridge [0600]: Intel Corporation Skylake Host Bridge/DRAM Registers [8086:191f] (rev 07)
IOMMU group 1
00:01.0 PCI bridge [0604]: Intel Corporation Skylake PCIe Controller (x16) [8086:1901] (rev 07)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Polaris10] [1002:67df] (rev c7)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf0]
IOMMU group 2
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
IOMMU group 3
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] (rev 31)
IOMMU group 4
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
IOMMU group 5
00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)
IOMMU group 6
00:1b.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Root Port #17 [8086:a167] (rev f1)
IOMMU group 7
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #1 [8086:a110] (rev f1)
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #6 [8086:a115] (rev f1)
00:1c.6 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #7 [8086:a116] (rev f1)
03:00.0 PCI bridge [0604]: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015] [8086:1578]
04:00.0 PCI bridge [0604]: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015] [8086:1578]
04:01.0 PCI bridge [0604]: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015] [8086:1578]
04:02.0 PCI bridge [0604]: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015] [8086:1578]
04:04.0 PCI bridge [0604]: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015] [8086:1578]
07:00.0 USB controller [0c03]: Intel Corporation DSL6540 USB 3.1 Controller [Alpine Ridge] [8086:15b6]
0a:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller [1969:e091] (rev 10)
0b:00.0 Network controller [0280]: Qualcomm Atheros AR93xx Wireless Network Adapter [168c:0030] (rev 01)
IOMMU group 8
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #9 [8086:a118] (rev f1)
00:1d.4 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #13 [8086:a11c] (rev f1)
IOMMU group 9
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a145] (rev 31)
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
IOMMU group 10
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8] (rev 31)
[chrysen@chrysen-pc ~]$
[chrysen@chrysen-pc ~]$ modinfo vfio-pci
filename: /lib/modules/4.7.3-2-ARCH/kernel/drivers/vfio/pci/vfio-pci.ko.gz
description: VFIO PCI - User Level meta-driver
author: Alex Williamson <alex.williamson@redhat.com>
license: GPL v2
version: 0.2
srcversion: 0058FA3A539BC4C5D233408
depends: vfio,irqbypass,vfio_virqfd
intree: Y
vermagic: 4.7.3-2-ARCH SMP preempt mod_unload modversions
parm: ids:Initial PCI IDs to add to the vfio driver, format is "vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]" and multiple comma separated entries can be specified (string)
parm: nointxmask:Disable support for PCI 2.3 style INTx masking. If this resolves problems for specific devices, report lspci -vvvxxx to linux-pci@vger.kernel.org so the device can be fixed automatically via the broken_intx_masking flag. (bool)
parm: disable_vga:Disable VGA resource access through vfio-pci (bool)
parm: disable_idle_d3:Disable using the PCI D3 low power state for idle, unused devices (bool)
[chrysen@chrysen-pc ~]$
/etc/modprobe.d/vfio.conf
options vfio-pci ids=1002:67df,1002:aaf0
/etc/mkinitcpio.conf
MODULES="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
[chrysen@chrysen-pc ~]$ dmesg | grep -i vfio
[ 1.133380] VFIO - User Level meta-driver version: 0.3
[ 1.150771] vfio_pci: add [1002:67df[ffff:ffff]] class 0x000000/00000000
[ 1.164045] vfio_pci: add [1002:aaf0[ffff:ffff]] class 0x000000/00000000
[chrysen@chrysen-pc ~]$ ]
[/color]
[chrysen@chrysen-pc ~]$ lspci -nnk -d 1002:67df
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Polaris10] [1002:67df] (rev c7)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:0b37]
Kernel driver in use: vfio-pci
Kernel modules: amdgpu
[chrysen@chrysen-pc ~]$ lspci -nnk -d 1002:aaf0
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf0]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf0]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
[chrysen@chrysen-pc ~]$
/etc/libvirt/qemu.conf
nvram = [
"/usr/share/ovmf/x64/ovmf_x64.bin:/usr/share/ovmf/x64/ovmf_vars_x64.bin"
]
/boot/loader/entries/arch.conf
Title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=/dev/sda2:main root=/dev/mapper/main-root resume=/dev/mapper/main-swap lang=de locale=de_de.UTF intel_iommu=on