Score:1

Ubuntu 22 No ACPI DMAR table found, IOMMU either disabled in BIOS or not supported by this hardware platform on nested VM

us flag

I am using ubuntu 22.04 LTS minimal server. My host server is set up with kvm and is functioning well. All tests pass when running virt-host-validate.

When I create. virtual machine i want this to support kvm also and I am trying to make all the checks to pass when running virt-host-validate on the Virtual Machine, which is laso ubuntu 22.04 LTS

I have updated the following lines on grub on VM

GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"
GRUB_CMDLINE_LINUX="cgroup_memory=1 cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0 intel_iommu=on"

run sudo update-grub and rebooted VM. I still get warning

  QEMU: Checking for device assignment IOMMU support                         : WARN (No ACPI DMAR table found, IOMMU either disabled in BIOS or not supported by this hardware platform)

I need this to pass to able to use KubeVirt properly.

https://pastebin.com/gUtdswz0

On my host/hardware

$ sudo dmesg | grep -e DMAR -e IOMMU
[    0.025208] ACPI: DMAR 0x000000007B7E6000 000364 (v01 INTEL  INTEL ID 00000001 ?    00000001)
[    0.025303] ACPI: Reserving DMAR table memory at [mem 0x7b7e6000-0x7b7e6363]
[    1.958464] DMAR: IOMMU enabled
[    3.615052] DMAR: Host address width 46
[    3.615056] DMAR: DRHD base: 0x000000fbffc000 flags: 0x0
[    3.615070] DMAR: dmar0: reg_base_addr fbffc000 ver 1:0 cap 8d2078c106f0466 ecap f020de
[    3.615079] DMAR: DRHD base: 0x000000c7ffc000 flags: 0x1
[    3.615093] DMAR: dmar1: reg_base_addr c7ffc000 ver 1:0 cap 8d2078c106f0466 ecap f020de
[    3.615100] DMAR: RMRR base: 0x00000079170000 end: 0x00000079172fff
[    3.615107] DMAR: RMRR base: 0x000000791f4000 end: 0x000000791f7fff
[    3.615113] DMAR: RMRR base: 0x000000791de000 end: 0x000000791f3fff
[    3.615118] DMAR: RMRR base: 0x000000791cb000 end: 0x000000791dbfff
[    3.615123] DMAR: RMRR base: 0x000000791dc000 end: 0x000000791ddfff
[    3.615128] DMAR: RMRR base: 0x0000005a62f000 end: 0x0000005a69efff
[    3.615136] DMAR: ATSR flags: 0x0
[    3.615141] DMAR: ATSR flags: 0x0
[    3.615148] DMAR-IR: IOAPIC id 10 under DRHD base  0xfbffc000 IOMMU 0
[    3.615155] DMAR-IR: IOAPIC id 8 under DRHD base  0xc7ffc000 IOMMU 1
[    3.615160] DMAR-IR: IOAPIC id 9 under DRHD base  0xc7ffc000 IOMMU 1
[    3.615166] DMAR-IR: HPET id 0 under DRHD base 0xc7ffc000
[    3.615171] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    3.616770] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    4.937442] DMAR: No SATC found
[    4.937451] DMAR: dmar0: Using Queued invalidation
[    4.937474] DMAR: dmar1: Using Queued invalidation
[    4.968865] DMAR: Intel(R) Virtualization Technology for Directed I/O

On my first VM

$ sudo dmesg | grep -e DMAR -e IOMMU
[    1.982119] DMAR: IOMMU enabled
br flag
The error message suggests checking the BIOS settings -- VT-d must be enabled.
shorif2000 avatar
us flag
the host hardware is enabled and working
cn flag
I would like to understand better why do you need vIOMMU? Are you planning to expose a PCI device to an inner VM? What is the use case?
cn flag
Could you please refine the question to include the following? 1. Information of the hardware (server manufacturer, and model, SR-IOV NIC manufacturer and model) 2. What did you configure for IOMMU: BIOS/UEFI settings, kernel cmdline, /etc/modprobe.d/vfio.conf ... 3. What is your use case and what is the big picture.
cn flag
Please add a link to the output of `virsh dumpxml <VM_name>`
Score:2
cn flag

If you are not planning to use PCI passtrough or SR-IOV in the nested VM, then you can safely ignore those warnings.

Those technologies are used to expose a physical device, like a video card or a network card PCI virtual function, to a VM.

For host VM (the outer VM), make sure you enable vIOMMU with -device intel-iommu,intremap=on. See also: https://wiki.qemu.org/Features/VT-d

For virtlib, see: https://libvirt.org/formatdomain.html#iommu-devices You will need to have something like:

<features>
    <ioapic driver='qemu'/>
</features>
<!-- ... ->
<devices>
    <iommu model='intel'>
        <driver intremap='on' caching_mode='on'/>
    </iommu>
</devices>

To edit the config:

# List all instances (including stopped ones):
virsh list --all
# Backup current config
virsh dumpxml <VM_Name>  > virsh_dumpxml_VMname-$(date +%F_%H%M%S).txt
# Shutdown, gracefully, the instance:
virsh shutdown <VM_Name>
# Edit the config:
virsh edit <VM_Name>
# Start the VM:
virsh start <VM_Name>
shorif2000 avatar
us flag
`-device intel-iommu,intremap=on` does this go on grub?
cn flag
No, it's a `qemu` parameter. Just follow the link to qemu documentation to see the examples.
shorif2000 avatar
us flag
I used virt-manager to create the VM. how would I add this option through virt-manager
shorif2000 avatar
us flag
I added some more output on my question
cn flag
Updated answer. See: https://libvirt.org/formatdomain.html#iommu-devices and https://bugzilla.redhat.com/show_bug.cgi?id=1427005
cn flag
`virt-manager` and `virsh` are frontends for `vitlib`. With `virsh` it is much easier to do some low level stuff. Both of them are working with the same backend - `libvirtd`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.