Skip to content

Commit

Permalink
Set vfio pci ids for AMD cards
Browse files Browse the repository at this point in the history
  • Loading branch information
jovial committed May 2, 2024
1 parent 08d611f commit bdcc85a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/iommu/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,20 @@
ansible.builtin.include_role:
name: stackhpc.linux.grubcmdline
vars:
kernel_cmdline: "{{ ['intel_iommu=on'] + (['vfio-pci.ids=' + iommu_vfio_pci_ids] if iommu_vfio_pci_ids is defined else []) }}" # noqa: var-naming[no-role-prefix]
kernel_cmdline: "{{ ['intel_iommu=on'] }}" # noqa: var-naming[no-role-prefix]
kernel_cmdline_remove: # noqa: var-naming[no-role-prefix]
- ^intel_iommu=
- ^vfio-pci\.ids=
when: ansible_facts.processor | select('search', 'Intel') | list | length > 0

- name: Add vfio pci ids to kernel command line
ansible.builtin.include_role:
name: stackhpc.linux.grubcmdline
vars:
kernel_cmdline: "{{ ['vfio-pci.ids=' + iommu_vfio_pci_ids] if iommu_vfio_pci_ids is defined else [] }}" # noqa: var-naming[no-role-prefix]
kernel_cmdline_remove: # noqa: var-naming[no-role-prefix]
- ^vfio-pci\.ids=

- name: Set iommu=pt
ansible.builtin.include_role:
name: stackhpc.linux.grubcmdline
Expand Down

0 comments on commit bdcc85a

Please sign in to comment.