°Ô½Ã¹° 260°Ç
   
[Redhat7.6] KVM : GPU Passthrough [iommu / vfio / nvidia ]
±Û¾´ÀÌ : theko ³¯Â¥ : 2019-11-01 (±Ý) 12:11 Á¶È¸ : 2354



[root@nvidia-host ~]# cat /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet intel_iommu=on iommu=pt"

[root@nvidia-host ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

[root@nvidia-host ~]# cd /etc/modprobe.d/
[root@nvidia-host modprobe.d]# cat blacklist.conf
blacklist nouveau
blacklist nvidia
blacklist nvidia_drm

[root@nvidia-host modprobe.d]# cat vfio.conf
options vfio-pci ids=10de:1eb8


==> À§ ³»¿ëÀº ¾Æ·¡ ÀÛ¾÷À» ÅëÇØ ³»¿ëÃß°¡
=========================================
[root@nvidia-host modprobe.d]# lspci -nn  | grep -i nvidi
06:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1eb8] (rev a1)
2f:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1eb8] (rev a1)
30:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1eb8] (rev a1)
86:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1eb8] (rev a1)
af:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1eb8] (rev a1)

[root@nvidia-host modprobe.d]# lspci -s 06:00.0 -k
06:00.0 3D controller: NVIDIA Corporation Device 1eb8 (rev a1)
        Subsystem: NVIDIA Corporation Device 12a2
        Kernel modules: nouveau, nvidia_drm, nvidia
===========================================

[root@nvidia-host modprobe.d]# dracut -f
[root@nvidia-host modprobe.d]# reboot

## È®Àιæ¹ý
# dmesg  | grep vfio
# dmesg  | grep -i iommu


# virsh nodedev-list | grep 06_00_


È®ÀÎÇÑ ³ëµå À̸§À¸·Î host¿¡¼­ device Å»Âø
(Host¿¡ ºÎÂøµÇ¾î ÀÖ´Â nodedev´Â °¡»ó¸Ó½Å¿¡ ÀåÂøÀÌ ºÒ°¡´ÉÇÏ¿© Å»ÂøÇÊ¿ä)
# virsh nodedev-detach <DeviceName>

# virsh nodedev-detach pci_0000_30_00_0
# virsh nodedev-detach pci_0000_06_00_0

ÀÌ·¸°Ô ÇÑÈÄ KVM¿¡¼­ HW Ãß°¡ÇÏ°í ÇØ´çPCI ¸¦ Ãß°¡ÇÏ¿© ºÎÆÃÈÄ
VM ¿¡¼­ lspci·Î È®ÀÎ ÇÏ¸é ³¡




Âü°í»çÀÌÆ®

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com