-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GPU Passthrough role #28
base: main
Are you sure you want to change the base?
Conversation
b7652f1
to
ff65507
Compare
79259ec
to
38d09d7
Compare
Changes the conditional to search for 'Intel' in the ansible_facts.processor variable as the first item in the list is not always consistent.
38d09d7
to
08d611f
Compare
roles/iommu/tasks/main.yml
Outdated
@@ -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= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we also remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot - done
@@ -0,0 +1,20 @@ | |||
--- | |||
- name: Regenerate initramfs (RedHat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed to run after the reboot handler
Co-authored-by: Dawud <7688823+technowhizz@users.noreply.github.com>
# but it can help with dmesg spam in newer kernels (centos8?). Sample | ||
# dmesg log message: | ||
# [ +0.000002] kvm [8348]: vcpu0, guest rIP: 0xffffffffb0a767fa ignored rdmsr: 0x619 | ||
# options kvm report_ignored_msrs=N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should uncomment by default
ansible.builtin.blockinfile: | ||
path: /etc/dracut.conf.d/gpu-vfio.conf | ||
block: | | ||
add_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw warnings about this configuration:
2024-08-27T12:52:11+0000 INFO /etc/dracut.conf.d/gpu-vfio.conf:add_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
dracut: WARNING: <key>+=" <values> ": <values> should have surrounding white spaces!
dracut: WARNING: This will lead to unwanted side effects! Please fix the configuration file.
dracut-install: Failed to find module 'vfio_virqfd'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.kNu52l/initramfs --kerneldir /lib/modules/5.14.0-362.24.1.el9_3.0.1.x86_64/ -m vfio vfio_iommu_type1 vfio_pci vfio_virqfd
/etc/dracut.conf.d/gpu-vfio.conf:add_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
dracut: WARNING: <key>+=" <values> ": <values> should have surrounding white spaces!
dracut: WARNING: This will lead to unwanted side effects! Please fix the configuration file.
dracut-install: Failed to find module 'vfio_virqfd'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.gebJKd/initramfs --kerneldir /lib/modules/5.14.0-362.24.1.el9_3.0.1.x86_64/ -m vfio vfio_iommu_type1 vfio_pci vfio_virqfd
Please fix the syntax.
Needs to merge after #21