You are not logged in.
ive been trying to sort of play around with pci passthrough
i enabled IOMMU on my motherboard , and updated the grub config
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 amd_iommu=on iommu=pt video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 " then i've done
update-grub then restarted my pc .
and when i checked if my done things right
sudo dmesg | grep -i -e DMAR -e IOMMU i noticed that i got this
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=190988e3-d4df-4384-93a4-8b6d987db6c9 rw amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 amd_iommu=on iommu=pt video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3
[ 0.039825] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=190988e3-d4df-4384-93a4-8b6d987db6c9 rw amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 amd_iommu=on iommu=pt video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3
[ 0.255574] iommu: Default domain type: Passthrough (set via kernel command line)
[ 0.313218] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.
[ 0.313329] pci 0000:00:01.0: Adding to iommu group 0
[ 0.313339] pci 0000:00:01.1: Adding to iommu group 1
[ 0.313347] pci 0000:00:01.2: Adding to iommu group 2
[ 0.313358] pci 0000:00:08.0: Adding to iommu group 3
[ 0.313364] pci 0000:00:08.1: Adding to iommu group 3
[ 0.313376] pci 0000:00:14.0: Adding to iommu group 4
[ 0.313382] pci 0000:00:14.3: Adding to iommu group 4
[ 0.313408] pci 0000:00:18.0: Adding to iommu group 5
[ 0.313414] pci 0000:00:18.1: Adding to iommu group 5
[ 0.313420] pci 0000:00:18.2: Adding to iommu group 5
[ 0.313427] pci 0000:00:18.3: Adding to iommu group 5
[ 0.313433] pci 0000:00:18.4: Adding to iommu group 5
[ 0.313439] pci 0000:00:18.5: Adding to iommu group 5
[ 0.313445] pci 0000:00:18.6: Adding to iommu group 5
[ 0.313451] pci 0000:00:18.7: Adding to iommu group 5
[ 0.313473] pci 0000:01:00.0: Adding to iommu group 6
[ 0.313481] pci 0000:01:00.1: Adding to iommu group 6
[ 0.313497] pci 0000:02:00.0: Adding to iommu group 7
[ 0.313505] pci 0000:02:00.1: Adding to iommu group 7
[ 0.313513] pci 0000:02:00.2: Adding to iommu group 7
[ 0.313516] pci 0000:03:00.0: Adding to iommu group 7
[ 0.313519] pci 0000:03:04.0: Adding to iommu group 7
[ 0.313522] pci 0000:03:05.0: Adding to iommu group 7
[ 0.313525] pci 0000:03:06.0: Adding to iommu group 7
[ 0.313528] pci 0000:03:07.0: Adding to iommu group 7
[ 0.313531] pci 0000:08:00.0: Adding to iommu group 7
[ 0.313537] pci 0000:09:00.0: Adding to iommu group 3
[ 0.313540] pci 0000:09:00.2: Adding to iommu group 3
[ 0.313542] pci 0000:09:00.3: Adding to iommu group 3
[ 0.313545] pci 0000:09:00.4: Adding to iommu group 3
[ 0.313548] pci 0000:09:00.6: Adding to iommu group 3
[ 0.313942] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.382985] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
EDIT: {
what im not sure about is
this line here
[ 0.313218] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.}
im not im not sure if its something i've done wrong , or if my board or cpu dosent support what im trying to do
i tried looking for old forums but all of them where relate to laptop issues , they where not trying to pass anything
my system :
Kernel: 5.11.6-arch1-1
CPU: AMD Ryzen 3 3200G (4) @ 4.100GHz
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Memory: 15910MiB
motherboard : asus prime b450m-a
EDIT : no one replied yet
{
and i did try to check for the pci groups .
using what was in the PCI passthrough wiki gude thing
#!/bin/bash
shopt -s nullglob
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;and thats what i got .
IOMMU Group 0:
00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 1:
00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
IOMMU Group 2:
00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
IOMMU Group 3:
00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A [1022:15db]
09:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a] (rev c9)
09:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
09:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e0]
09:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e1]
09:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3]
IOMMU Group 4:
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 5:
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0 [1022:15e8]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1 [1022:15e9]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2 [1022:15ea]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3 [1022:15eb]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4 [1022:15ec]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5 [1022:15ed]
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6 [1022:15ee]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7 [1022:15ef]
IOMMU Group 6:
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 e7)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
IOMMU Group 7:
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: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)
08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15what im trying to do is to use that one GPU for both the main host machiene and the virtual machiene thingy
im not even sure if i can do that or not but decided that i have free time to play around with it
}
Last edited by darkx97 (2021-03-17 18:32:58)
Offline
then i've done
update-grub
Why?
That command isn't valid when using Arch, it's a Debian/Ubuntu specific thing.
Offline
well im using the update-grub thingy from the AUR
im just lazy and it basically dose the config for grub
Offline
Fair enough, I didn't realise that someone had gone to the effort of making an AUR package for a one-line command (the PKGBUILD alone is 15 times bigger than the simple command it replicates).
Offline
hmm im starting to think that maybe this dosent belong in the newbie forums T_T
Offline
Have you seen this similar thread https://bbs.archlinux.org/viewtopic.php … 3#p1961863?
Edit:
That commit was backported to 5.11.7.
Last edited by loqs (2021-03-19 23:52:39)
Offline
yeah i did check that and it is enabled
i look around for everything i can find about vertualization in my bios options .
and didnt find much but i made sure that they are enabled , it was already enabled .
im not sure if its just a hardware issue . the problem im noticing in the other threads is all of them are laptop related problems . where they probably cant boot .
i tried changing the prameter from
iommu=pt to
iommu=soft i got this
[sufian@sufian-pc ~]$ sudo dmesg | grep -i -e DMAR -e iommu
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=soft amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.038778] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=soft amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.251566] iommu: Default domain type: Translated
[ 0.324903] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[ 0.324903] AMD-Vi: AMD IOMMUv2 functionality not available on this systemi think i cant really do a gpu passthrough in my system , im trying to make a vm to play some games that need windows stuff .
i know i can dual boot but i dont want to go with this options .
Offline
You have updated to 5.11.7 and the issue is still present?
Offline
yeah im not sure how to fix it yet . i've seen a lot of threads about it , so far nothing that i didnt do . and tried reading the PCI passthrough via OVMF guide .
and it probably dosent talk about it , or I just missed it .
EDIT :
im pretty sure i did try it but just in case i'll try again now and post the results
Last edited by darkx97 (2021-03-20 00:51:18)
Offline
and as i expected its the same result
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=pt amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.039265] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=pt amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.249074] iommu: Default domain type: Passthrough (set via kernel command line)
[ 0.446045] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.
[ 0.446149] pci 0000:00:01.0: Adding to iommu group 0
[ 0.446158] pci 0000:00:01.1: Adding to iommu group 1
[ 0.446169] pci 0000:00:01.2: Adding to iommu group 2
[ 0.446182] pci 0000:00:08.0: Adding to iommu group 3
[ 0.446188] pci 0000:00:08.1: Adding to iommu group 3
[ 0.446199] pci 0000:00:14.0: Adding to iommu group 4
[ 0.446205] pci 0000:00:14.3: Adding to iommu group 4
[ 0.446232] pci 0000:00:18.0: Adding to iommu group 5
[ 0.446238] pci 0000:00:18.1: Adding to iommu group 5
[ 0.446244] pci 0000:00:18.2: Adding to iommu group 5
[ 0.446250] pci 0000:00:18.3: Adding to iommu group 5
[ 0.446256] pci 0000:00:18.4: Adding to iommu group 5
[ 0.446262] pci 0000:00:18.5: Adding to iommu group 5
[ 0.446267] pci 0000:00:18.6: Adding to iommu group 5
[ 0.446273] pci 0000:00:18.7: Adding to iommu group 5
[ 0.446297] pci 0000:01:00.0: Adding to iommu group 6
[ 0.446305] pci 0000:01:00.1: Adding to iommu group 6
[ 0.446320] pci 0000:02:00.0: Adding to iommu group 7
[ 0.446328] pci 0000:02:00.1: Adding to iommu group 7
[ 0.446336] pci 0000:02:00.2: Adding to iommu group 7
[ 0.446339] pci 0000:03:00.0: Adding to iommu group 7
[ 0.446342] pci 0000:03:04.0: Adding to iommu group 7
[ 0.446345] pci 0000:03:05.0: Adding to iommu group 7
[ 0.446348] pci 0000:03:06.0: Adding to iommu group 7
[ 0.446351] pci 0000:03:07.0: Adding to iommu group 7
[ 0.446354] pci 0000:08:00.0: Adding to iommu group 7
[ 0.446357] pci 0000:09:00.0: Adding to iommu group 3
[ 0.446360] pci 0000:09:00.2: Adding to iommu group 3
[ 0.446362] pci 0000:09:00.3: Adding to iommu group 3
[ 0.446366] pci 0000:09:00.4: Adding to iommu group 3
[ 0.446369] pci 0000:09:00.6: Adding to iommu group 3
[ 0.446644] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.518077] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>im thinking that maybe im messing somthing here so i'll try and keep going with the guide and see how it gose
, but i still would like to know if im missing something or is it that my device wont be able to do the passthrough thing .
Offline
[ 0.446045] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.https://github.com/torvalds/linux/blob/ … it.c#L1776
That message means the kernel can not use AMD-Vi and has disabled the feature.
Edit:
Change link to 5.12-rc3 which matches 5.11.7 code with the backport.
Last edited by loqs (2021-03-20 01:11:50)
Offline
so is that caused from something in my hardware , or dose it has to do with a kernel prametar that im not using .
cuz i really couldnt find anything about this except that the solution is to change " iommu=pt " to " iommu=soft "
but that means i trun the thing off - as far as i understand - meaning i still can pass the device . right ?
Last edited by darkx97 (2021-03-20 01:20:07)
Offline
so is that caused from something in my hardware , or dose it has to do with a kernel prametar that im not using .
I do not know if it is a hardware or software issue or of a parameter to fix it. I was hoping the patch would have.
cuz i really couldnt find anything about this except that the solution is to change " iommu=pt " to " iommu=soft "
but that means i trun the thing off - as far as i understand - meaning i still can pass the device . right ?
My expectation would be that iommu=soft disables hardware IOMMU which you need for device pass through, although you should test to confirm this.
Offline
yeah im not sure yet cuz i did test it and those where the results i got
nothing about iommu being enabled or disabled
[sufian@sufian-pc ~]$ sudo dmesg | grep -i -e DMAR -e iommu
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=soft amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.038778] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=94fdb25c-e61f-4c8c-98d8-e75c35fcece0 rw amd_iommu=on iommu=soft amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 splash
[ 0.251566] iommu: Default domain type: Translated
[ 0.324903] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[ 0.324903] AMD-Vi: AMD IOMMUv2 functionality not available on this system Offline
try in the kernel parameters iommu=1 this helped fix my problem and i am running off a 3400g and 5600xt
Offline
i think it worked, i no longer get this msg
[ 0.446045] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.this is what i got for now , im not sure if that means its working or not , but i'll stopped playing with it, i'll leave for later time , thanx for the help though
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=26f13ee2-8264-4bce-b137-b7910d00496f rw amd_iommu=on iommu=1 amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 acpi_backlight=vendor
[ 0.038988] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=26f13ee2-8264-4bce-b137-b7910d00496f rw amd_iommu=on iommu=1 amdgpu.ppfeaturemask=0xffffffff amdgpu.dpm=1 video=HDMI-A-0:e video=HDMI-A-1:e loglevel=3 acpi_backlight=vendor
[ 0.248748] iommu: Default domain type: Translated
[ 0.312657] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.312762] pci 0000:00:01.0: Adding to iommu group 0
[ 0.312770] pci 0000:00:01.1: Adding to iommu group 1
[ 0.312780] pci 0000:00:01.2: Adding to iommu group 2
[ 0.312793] pci 0000:00:08.0: Adding to iommu group 3
[ 0.312799] pci 0000:00:08.1: Adding to iommu group 3
[ 0.312811] pci 0000:00:14.0: Adding to iommu group 4
[ 0.312817] pci 0000:00:14.3: Adding to iommu group 4
[ 0.312843] pci 0000:00:18.0: Adding to iommu group 5
[ 0.312849] pci 0000:00:18.1: Adding to iommu group 5
[ 0.312855] pci 0000:00:18.2: Adding to iommu group 5
[ 0.312860] pci 0000:00:18.3: Adding to iommu group 5
[ 0.312866] pci 0000:00:18.4: Adding to iommu group 5
[ 0.312873] pci 0000:00:18.5: Adding to iommu group 5
[ 0.312879] pci 0000:00:18.6: Adding to iommu group 5
[ 0.312886] pci 0000:00:18.7: Adding to iommu group 5
[ 0.312910] pci 0000:01:00.0: Adding to iommu group 6
[ 0.312918] pci 0000:01:00.1: Adding to iommu group 6
[ 0.312933] pci 0000:02:00.0: Adding to iommu group 7
[ 0.312941] pci 0000:02:00.1: Adding to iommu group 7
[ 0.312949] pci 0000:02:00.2: Adding to iommu group 7
[ 0.312952] pci 0000:03:00.0: Adding to iommu group 7
[ 0.312956] pci 0000:03:04.0: Adding to iommu group 7
[ 0.312959] pci 0000:03:05.0: Adding to iommu group 7
[ 0.312962] pci 0000:03:06.0: Adding to iommu group 7
[ 0.312965] pci 0000:03:07.0: Adding to iommu group 7
[ 0.312968] pci 0000:08:00.0: Adding to iommu group 7
[ 0.312971] pci 0000:09:00.0: Adding to iommu group 3
[ 0.312974] pci 0000:09:00.2: Adding to iommu group 3
[ 0.312977] pci 0000:09:00.3: Adding to iommu group 3
[ 0.312980] pci 0000:09:00.4: Adding to iommu group 3
[ 0.312983] pci 0000:09:00.6: Adding to iommu group 3
[ 0.314671] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.367607] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[ 0.384094] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>Offline