
Ajustes =====>
1) BIOS: UEFI, VT-d (Intel) ou AMD-Vi , Multi-monitor mode
Edit GRUB
#/bin/bash
nano /etc/default/grub
Mude esta linha ou Comentar #
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
Para Intel:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
Para AMD:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
Salvar arquivo e update grub ( Ctrl + X = Y para Salvar )
#/bin/bash
update-grub
Reiniciar ( reboot )
Editar arquivo de modulos
#/bin/bash
nano /etc/modules
Adicionar as Linhas
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
Salvar E Reiniciar ( reboot )
IOMMU Remapping
#/bin/bash
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
Blacklist the GPU drivers (this will kkeep the host system from trying to use the new GPU)
#/bin/bash
nano /etc/modprobe.d/blacklist.conf
blacklist radeon
blacklist nouveau
blacklist nvidia
blacklist nvidiafb
Salvar
Adding GPU to VFIO
#/bin/bash
lspci -nn | grep -i amd/ati ( troca por nvidia ) USB
---------------------
OBS:Exemplo
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] [1002:67ef] (rev e5)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] [1002:aae0]
00:14.0 USB controller [0c03]: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller [8086:a36d] (rev 10)
---------------------
#/bin/bash
lspci -v
Procure o Endereço da sua Gpu Principal
Rodar o Comando
#/bin/bash
lspci -n -s 01:00
Pegar o numero do ID e Fabricante
Editar arquivo
#/bin/bash
nano /etc/modprobe.d/vfio.conf
Salvar arquivo e update grub ( Ctrl + X = Y para Salvar )
options vfio-pci ids=1002:67ef,1002:aae0,8086:a36d disable_vga=1
(para nativo 1 pelo on)
#/bin/bash
cat /etc/modprobe.d/vfio.conf
Rodar o comando
#/bin/bash
update-initramfs -u
Reiniciar o servidor.Verificar se habilito ( IOMMU )
#/bin/bash
dmesg | grep -e DMAR -e IOMMU -e AMD-Vi
dmesg | grep -e DMAR -e IOMMU -e NVIDIA-Vi