Multi Channel DMA Intel® FPGA IP for PCI Express* デザイン例のユーザーガイド
ID
683517
日付
10/06/2023
Public
3.5.2.4.1.1. ブート・パラメーターの設定
次の手順に従い、grubファイルでデフォルトのhugepages設定を変更します。
/etc/default/grub ファイルの編集
強調表示されているパラメーターを /etc/default/grubファイルのGRUB_CMDLINE_LINUX行に追加します。
GRUB_CMDLINE_LINUX=" rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb default_hugepagesz=1G hugepagesz=1G hugepages=40 iommu=pt panic=1”
CentOS: GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb default_hugepagesz=1G hugepagesz=1G hugepages=40 iommu=pt panic=1”
Ubuntu: GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=20 intel_iommu=on iommu=pt panic=1 quiet splash vt.handoff=7"
CentOSに向けた編集後のファイルの内容は次のとおりです。
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 iommu=pt panic=1” GRUB_DISABLE_RECOVERY="true"
仮想機能作成時にメモリー割り当てに失敗する場合は、次のブート・パラメーターを追加します。
"pci=hpbussize=10,hpmemsize=2M,nocrs,realloc=on"
デバイスを vfio-pci に結び付け、IOMMUを使用するには、intel_iommu=on パラメーターを有効にします。
UIOを使用する際にIOMMUルックアップを有効にしない場合は、iommu=pt パラメーターを追加します。
AMDプラットフォームとUIOドライバーを使用するには、起動時に iommu=soft パラメーターを追加します。
編集後のubuntuに向けた/etc/default/grubファイル例
root@bapvecise042:~# cat /etc/default/grub # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT="1>2" GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=20 intel_iommu=on iommu=pt panic=1" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
GRUBコンフィグレーション・ファイルの生成
ブートシステムがレガシーかEFIベースかを確認するには、次のファイルの存在を確認します。
$ls -al /sys/firmware/efiこのファイルが存在する場合、ブートシステムは EFIベースです。それ以外の場合はレガシーシステムです。
-
レガシーシステムの場合は、次のコマンドを実行します。
$ grub2-mkconfig -o /boot/grub2/grub.cfg
-
EFIベースのシステムの場合は、次のコマンドを実行します。
$ grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
-
Ubuntuの場合は、次のコマンドを実行します。
grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
またはgrub2-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
またはsudo grub update