Visible to Intel only — GUID: knr1619723645392
Ixiasoft
3.5.2.3.1.3. Set the Boot Parameters
- Edit the /etc/default/grub file
Append the highlighted parameters to the GRUB_CMDLINE_LINUX line in the /etc/default/grub file
GRUB_CMDLINE_LINUX=" rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb default_hugepagesz=1G hugepagesz=1G hugepages=40 panic=1 intel_iommu=on iommu=pt
This is what the file looks like after the edit:
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX=" rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb default_hugepagesz=1G hugepagesz=1G hugepages=40 panic=1 intel_iommu=on iommu=pt
GRUB_DISABLE_RECOVERY="true"
In the case of memory allocation failure at the time of Virtual Function creation, add the following boot parameters: "pci=hpbussize=10,hpmemsize=2M,nocrs,realloc=on"
To bind the device to vfio-pci and use IOMMU, enable the following parameter: intel_iommu=on
To use UIO and not enable the IOMMU lookup, add the following parameter: iommu=pt
To use the AMD platform and the UIO driver, add the following parameter at boot time: iommu=soft
- Generate GRUB configuration files.
To check whether the boot system is legacy or EFI-based, check the existence of the following file:
$ls -al /sys/firmware/efi
If this file is present, the boot system is EFI-based. Otherwise, it is a legacy system.- In case of a legacy system, execute the following command:
$ grub2-mkconfig -o /boot/grub2/grub.cfg
- In case of an EFI-based system, execute the following command:
$ grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
- In case of a legacy system, execute the following command:
- Reboot the system.
- Verify the changes above:
$ cat /proc/cmdline
- Set the huge pages:
$ echo 40 > /proc/sys/vm/nr_hugepages