You are not logged in.

#1 2020-10-18 16:52:59

miomio
Member
Registered: 2016-01-17
Posts: 167

[SOLVED] Qemu and want to enable intel_iommu

Upon reading https://wiki.archlinux.org/index.php/PC … ling_IOMMU prereqs I ensure VT-d is enabled in BIOS, check my CPU has support (it does), and per prereq my motherboard needs IOMMU chip but I can't find documentation for motherboard model so I assume from reading around that my laptop model does (Thinkpad T-series). Next, I check if intel_iommu is enabled already:

$ dmesg | grep -i -e DMAR -e IOMMU
[    0.079943] DMAR: Host address width 39
[    0.079945] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.079952] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e
[    0.079953] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.079958] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.079959] DMAR: RMRR base: 0x0000007aa9f000 end: 0x0000007aabefff
[    0.079960] DMAR: RMRR base: 0x0000007d000000 end: 0x0000007f7fffff
[    0.079962] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.079963] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.079964] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.081552] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    0.283218] iommu: Default domain type: Translated 
[    0.713281] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    0.713282] AMD-Vi: AMD IOMMUv2 functionality not available on this system

No it isn't.

Here's where my knowledge gap causes problem. According to https://bugs.freedesktop.org/show_bug.cgi?id=107783 it seems CONFIG_INTEL_IOMMU_DEFAULT_ON is needed, but:

$ zgrep IOMMU /proc/config.gz
CONFIG_IRQ_MSI_IOMMU=y
CONFIG_GART_IOMMU=y
CONFIG_VFIO_IOMMU_TYPE1=m
# CONFIG_VFIO_NOIOMMU is not set
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_OF_IOMMU=y
CONFIG_IOMMU_DMA=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_V2=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
CONFIG_HYPERV_IOMMU=y
CONFIG_IOMMU_HELPER=y
# CONFIG_IOMMU_DEBUG is not set

My kernel (standard arch kernel 'linux' from repo) wasn't built with it. So should I:

1. make a new UEFI boot entry and append intel_iommu=on and iommu=pt after `initrd=\initramfs-linux.img` ?
2. use sysctl ?
3. build a kernel with CONFIG_INTEL_IOMMU_DEFAULT_ON ?

I attempted (2) with /etc/sysctl.d/10-iommu.conf as follows:

intel_iommu=on
iommu=pt

However:

# sysctl --load=/etc/sysctl.d/10-iommu.conf
sysctl: cannot stat /proc/sys/intel_iommu: No such file or directory
sysctl: cannot stat /proc/sys/iommu: No such file or directory

What do I require/what have I done incorrectly?

EDIT:

Realised that what I need for my situation is GVT-g (https://wiki.archlinux.org/index.php/In … erequisite). I still have not been able to do intel_iommu=on.

#2 Added new UEFI boot entry with intel_iommu=on at the end of boot parameters. Was looking for an alternative method, but can't be farting around for hours so...

Last edited by miomio (2020-10-18 21:17:55)

Offline

Board footer

Powered by FluxBB