Cant Start VM with GPU, IOMMU problems


Recommended Posts

vfio_iommu_type1_attach_group: No interrupt remapping support.  Use the module param "allow_unsafe_interrupts" to enable VFIO IOMMU support on this platform

So I would try to add to syslinux config:

vfio_iommu_type1.allow_unsafe_interrupts=1

 

--->

For unraid without gui it becomes:

append vfio_iommu_type1.allow_unsafe_interrupts=1 initrd=/bzroot

 

It is also recommended to attach to vfio at boot iommu groups 14 and 15, gpu video and audio.

Link to comment
On 3/10/2022 at 10:34 PM, Togay said:

and now it wont even Boot anymore

Allow unsafe interrupts should not prevent the os to load...

 

On 3/10/2022 at 10:34 PM, Togay said:

and also made an new Unraid Stick

Maybe you messed with uefi/legacy bios?

Check the mode unraid is booting (uefi vs legacy bios) and check the bios options (csm disabled vs csm enabled).

Link to comment
  • 2 months later...

Hello all, 

Can I ask you for help? I cannot put my graphic card in to one IOMMU group to be able pass through it to VM. VGA and sound controller are still in other groups. I tried setup in "PCIe ACS override" all options (downstream, both, multi-function) and graphic card is still in 2 groups, and I am not able to put it on VM.

 

899948618_Snmekobrazovky2022-05-29191935.thumb.png.d6dbdb2046fd422a3f520187d47d8411.png

I tried also code it in Syslinux Configuration as pcie_acs_override=id:1002:743f and no influence. 

Do you have any idea?

1922840026_Snmekobrazovky2022-05-29195802.png.201d2f8dc2d696427dc6a161274e5c31.png

 

Link to comment
12 hours ago, Ladousek said:

Can I ask you for help? I cannot put my graphic card in to one IOMMU group to be able pass through it to VM. VGA and sound controller are still in other groups.

It's ok, what you don't want is to have other devices you don't want to passthrough in the same iommu group as your gpu video or gpu audio.

So these cases are ok:

1. gpu audio and video are in the same iommu group, without any other device that you don't want to passthrough to the vm

2. gpu audio and video are in different iommu groups, without any other device that you don't want to passthrough to the vm

3. gpu audio and video are in the same iommu group, together with other devices that you want to passthrough to the vm

4. gpu audio and video are in different iommu groups, together with other devices that you want to passthrough to the vm

 

In your case (case: 2) simply bound to vfio iommu groups 17 and 18.

 

12 hours ago, Ladousek said:

I tried also code it in Syslinux Configuration as pcie_acs_override=id:1002:743f

Do not use syslinux config. use only unraid panel.

Link to comment
9 hours ago, ghost82 said:

In your case (case: 2) simply bound to vfio iommu groups 17 and 18.

 

 

I tried but still VM does not see graphic card. Could you take a look at my config?

  • Adding Graphic and sound card

1645436421_Snmekobrazovky2022-05-30180223.thumb.png.8e0b62667f881367ee380c2f7e8cb062.png

  • Binding 2 groups

1431967225_Snmekobrazovky2022-05-30175934.thumb.png.f92af3482ff7ce87da79c42c6f28841e.png

  • Setup

763892944_Snmekobrazovky2022-05-30175906.thumb.png.587de54f26ce4990b807e74c96f87323.png

  • WIN 10 sees Basic Graphic adapter only

2105520663_Snmekobrazovky2022-05-30175742.thumb.png.e9514a301dbad3669e49694c29bd1745.png

Link to comment
13 hours ago, Ladousek said:

2105520663_Snmekobrazovky2022-05-30175742.thumb.png.e9514a301dbad3669e49694c29bd1745.png

Sorry to ask, but are you sure that this graphic adapter is the qxl/vnc one?

I'm asking for 2 reasons:

1. in your Windows 10 vm there is only the amd gpu defined, no qxl/vnc

2. when you define qxl/vnc virtual gpu it shouldn't appear with the yellow mark on it

 

Every passed through gpu without its drivers will appear as a basic graphic microsoft adapter because the microsoft driver is attached to it: this can work as a basic adapter or not (as in your case); if it doesn't work you should install the drivers of that gpu.

 

Double check the property of that graphic adapter and see what it is and why it's not running properly, what error outputs?

 

Gpu is isolated (OK) and in its iommu groups (OK), it seems not in use by the host (OK), if it's still doesn't work, change the settings in the xml to it becomes a multifunction device, from this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

to this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </hostdev>

 

You may need to pass also the vbios, dump it and pass the rom file too.

 

You may need to change (re-create) the machine type, from i440fx to pc-q35 for better passthrough compatibility.

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.