@Balaton
I reversed the GPUs in the PCIe slots
With Arch at the moment these are the results:
./test-vfio.sh
result:
[3.834645] VFIO - User Level meta-driver version: 0.3
./test-iommu.sh
result with ACS active the card is isolated in group 15:
IOMMU Group 15:
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] [1002:6798]
06:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] [1002:aaa0]
The time-out has disappeared:
sudo dmesg | grep -i -e DMAR -e IOMMU
[ 0.655585] iommu: Default domain type: Translated
[ 0.655587] iommu: DMA domain TLB invalidation policy: lazy mode
[ 0.684690] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.684736] pci 0000:00:00.0: Adding to iommu group 0
[ 0.684754] pci 0000:00:01.0: Adding to iommu group 1
[ 0.684767] pci 0000:00:01.2: Adding to iommu group 2
[ 0.684784] pci 0000:00:02.0: Adding to iommu group 3
[ 0.684802] pci 0000:00:03.0: Adding to iommu group 4
[ 0.684814] pci 0000:00:03.1: Adding to iommu group 5
[ 0.684830] pci 0000:00:04.0: Adding to iommu group 6
[ 0.684847] pci 0000:00:05.0: Adding to iommu group 7
[ 0.684865] pci 0000:00:07.0: Adding to iommu group 8
[ 0.684877] pci 0000:00:07.1: Adding to iommu group 9
[ 0.684894] pci 0000:00:08.0: Adding to iommu group 10
[ 0.684907] pci 0000:00:08.1: Adding to iommu group 11
[ 0.684930] pci 0000:00:14.0: Adding to iommu group 12
[ 0.684941] pci 0000:00:14.3: Adding to iommu group 12
[ 0.684998] pci 0000:00:18.0: Adding to iommu group 13
[ 0.685010] pci 0000:00:18.1: Adding to iommu group 13
[ 0.685022] pci 0000:00:18.2: Adding to iommu group 13
[ 0.685033] pci 0000:00:18.3: Adding to iommu group 13
[ 0.685045] pci 0000:00:18.4: Adding to iommu group 13
[ 0.685057] pci 0000:00:18.5: Adding to iommu group 13
[ 0.685069] pci 0000:00:18.6: Adding to iommu group 13
[ 0.685081] pci 0000:00:18.7: Adding to iommu group 13
[ 0.685109] pci 0000:01:00.0: Adding to iommu group 14
[ 0.685123] pci 0000:01:00.1: Adding to iommu group 14
[ 0.685137] pci 0000:01:00.2: Adding to iommu group 14
[ 0.685141] pci 0000:02:00.0: Adding to iommu group 14
[ 0.685146] pci 0000:02:08.0: Adding to iommu group 14
[ 0.685150] pci 0000:02:09.0: Adding to iommu group 14
[ 0.685154] pci 0000:03:00.0: Adding to iommu group 14
[ 0.685159] pci 0000:03:00.1: Adding to iommu group 14
[ 0.685163] pci 0000:05:00.0: Adding to iommu group 14
[ 0.685187] pci 0000:06:00.0: Adding to iommu group 15
[ 0.685203] pci 0000:06:00.1: Adding to iommu group 15
[ 0.685215] pci 0000:07:00.0: Adding to iommu group 16
[ 0.685229] pci 0000:08:00.0: Adding to iommu group 17
[ 0.685242] pci 0000:08:00.1: Adding to iommu group 18
[ 0.685255] pci 0000:08:00.3: Adding to iommu group 19
[ 0.685268] pci 0000:08:00.4: Adding to iommu group 20
[ 0.688112] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
Finally with:
find /sys/kernel/iommu_groups/ -type l | sort -n -t/ -k5
result:
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/2/devices/0000:00:01.2
/sys/kernel/iommu_groups/3/devices/0000:00:02.0
/sys/kernel/iommu_groups/4/devices/0000:00:03.0
/sys/kernel/iommu_groups/5/devices/0000:00:03.1
/sys/kernel/iommu_groups/6/devices/0000:00:04.0
/sys/kernel/iommu_groups/7/devices/0000:00:05.0
/sys/kernel/iommu_groups/8/devices/0000:00:07.0
/sys/kernel/iommu_groups/9/devices/0000:00:07.1
/sys/kernel/iommu_groups/10/devices/0000:00:08.0
/sys/kernel/iommu_groups/11/devices/0000:00:08.1
/sys/kernel/iommu_groups/12/devices/0000:00:14.0
/sys/kernel/iommu_groups/12/devices/0000:00:14.3
/sys/kernel/iommu_groups/13/devices/0000:00:18.0
/sys/kernel/iommu_groups/13/devices/0000:00:18.1
/sys/kernel/iommu_groups/13/devices/0000:00:18.2
/sys/kernel/iommu_groups/13/devices/0000:00:18.3
/sys/kernel/iommu_groups/13/devices/0000:00:18.4
/sys/kernel/iommu_groups/13/devices/0000:00:18.5
/sys/kernel/iommu_groups/13/devices/0000:00:18.6
/sys/kernel/iommu_groups/13/devices/0000:00:18.7
/sys/kernel/iommu_groups/14/devices/0000:01:00.0
/sys/kernel/iommu_groups/14/devices/0000:01:00.1
/sys/kernel/iommu_groups/14/devices/0000:01:00.2
/sys/kernel/iommu_groups/14/devices/0000:02:00.0
/sys/kernel/iommu_groups/14/devices/0000:02:08.0
/sys/kernel/iommu_groups/14/devices/0000:02:09.0
/sys/kernel/iommu_groups/14/devices/0000:03:00.0
/sys/kernel/iommu_groups/14/devices/0000:03:00.1
/sys/kernel/iommu_groups/14/devices/0000:05:00.0
/sys/kernel/iommu_groups/15/devices/0000:06:00.0
/sys/kernel/iommu_groups/15/devices/0000:06:00.1
/sys/kernel/iommu_groups/16/devices/0000:07:00.0
/sys/kernel/iommu_groups/17/devices/0000:08:00.0
/sys/kernel/iommu_groups/18/devices/0000:08:00.1
/sys/kernel/iommu_groups/19/devices/0000:08:00.3
/sys/kernel/iommu_groups/20/devices/0000:08:00.4
note:
I guess something has changed
but the result should be something like:
./test-vfio.sh
result:
[3.834645] VFIO - User Level meta-driver version: 0.3
----------------------------------------------------------------
I guess something changed
but the result should be something like:
vfio-pci enabled etc. etc.
if you need more information let me know. Thanks.
qesudo qemu-system-ppc -M pegasos2 -bios /home/white/Scaricati/pegasos2.rom -m 1024 -serial stdio -device VGA,romfile="" -drive if=none,id=hd,file=/home/white/Scaricati/32gb.raw,format=raw -device ide-hd,drive=hd,bus=ide.1 -netdev user,id=tap0 -device rtl8139,netdev=tap0 -vga none -drive if=none,id=hd1,file=/home/white/Scaricati/coffin.raw,format=raw -device ide-hd,drive=hd1,bus=ide.1 -device vfio-pci,host=06:00.0,bus=pci.0 -device vfio-pci.host=06:00.1,bus=pci.0 -accel tcg
mu:
result:
qemu-system-ppc: -device vfio-pci,host=06:00.0,bus=pci.0: vfio 0000:06:00.0: Could not open '/dev/vfio/15': No such file or directory
GRUB:
GRUB_CMDLINE_LINUX_DEFAULT="rd.driver.pre-vfio-pci amd_iommu=on iommu=pt video=efifb:off loglevel=3 quiet"
VFIO.conf:
options vfio-pci ids=1002:6798,1002:aaa0
softdep drm pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci
blacklist radeon
blacklist amdgpu
/etc/mkinitcpio.conf
MODULES=(vfio_pci vfio vfio_iommu_type1)
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
sudo mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.14.2-arch1-1'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.14.2-arch1-1'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
----------------------------------------------------------------------
Ok I reviewed the /etc/mkinitcpio.conf passage:
here is the result

./test-vfio.sh
[sudo] password di white:
[ 3.826200] VFIO - User Level meta-driver version: 0.3
[ 3.865513] vfio-pci 0000:06:00.0: vgaarb: deactivate vga console
[ 3.865518] vfio-pci 0000:06:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 3.865951] vfio_pci: add [1002:6798[ffffffff:ffffffff]] class 0x000000/00000000
[ 3.913622] vfio_pci: add [1002:aaa0[ffffffff:ffffffff]] class 0x000000/00000000
[white@Amiga Scaricati]$
