# 🎮 AMD 7000 Series VFIO Setup Guide
Welcome to the AMD 7000 Series VFIO Setup Guide! This repository documents my journey in configuring VFIO using various resources after many months of challenges. If you're diving into the world of GPU passthrough, you’ll find the information here invaluable.
## Table of Contents
1. [Introduction](#introduction)
2. [Prerequisites](#prerequisites)
3. [Understanding VFIO](#understanding-vfio)
4. [Hardware Requirements](#hardware-requirements)
5. [Software Requirements](#software-requirements)
6. [Step-by-Step Guide](#step-by-step-guide)
7. [Troubleshooting](#troubleshooting)
8. [Community and Support](#community-and-support)
9. [License](#license)
10. [Releases](#releases)
---
## Introduction
In this guide, I aim to share my personal experiences and the techniques I used to get VFIO working with AMD 7000 series GPUs. The process can be complicated, but with patience and the right information, you can achieve a successful setup.
## Prerequisites
Before starting, ensure that you have the following:
- Basic knowledge of Linux commands.
- A system with an AMD 7000 series GPU.
- A supported motherboard with IOMMU capability.
- A secondary GPU for the host system (if using passthrough).
## Understanding VFIO
VFIO (Virtual Function I/O) allows direct access to hardware devices from virtual machines. This is particularly useful for gamers who want to run a virtualized OS while maintaining performance akin to native hardware.
### Key Components:
- **IOMMU**: Allows the CPU to directly map devices.
- **QEMU**: An open-source emulator that provides virtualization.
- **KVM**: Kernel-based Virtual Machine enables the Linux kernel to act as a hypervisor.
- **libvirt**: A toolkit to manage virtualization technologies.
## Hardware Requirements
1. **CPU**: Ensure your CPU supports virtualization (AMD-V).
2. **Motherboard**: Look for IOMMU support in BIOS/UEFI settings.
3. **GPUs**:
- Primary: For the host OS.
- Secondary: For the guest OS.
## Software Requirements
1. **Operating System**: A Linux distribution with kernel version 5.4 or later is recommended.
2. **Packages**:
- QEMU
- KVM
- Virt-Manager
- libvirt
- lsof
## Step-by-Step Guide
### Step 1: BIOS Configuration
1. Boot into your BIOS/UEFI.
2. Enable **IOMMU** and **VT-d/VT-x**.
3. Save and exit.
### Step 2: Linux Kernel Parameters
Edit your GRUB configuration file:
```bash
sudo nano /etc/default/grub
Add intel_iommu=on
or amd_iommu=on
to the GRUB_CMDLINE_LINUX_DEFAULT
line.
Update GRUB:
sudo update-grub
Use your package manager to install required packages:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
Identify your devices using:
lspci -nn
Take note of your GPU and its audio controller.
Next, edit the VFIO configuration file:
echo "options vfio-pci ids=xxxx:yyyy,xxxx:zzzz" | sudo tee /etc/modprobe.d/vfio.conf
Replace xxxx:yyyy
with your GPU ID.
Load the modules using:
sudo modprobe vfio-pci
Verify the loading with:
lsmod | grep vfio
Open Virt-Manager and create a new virtual machine.
- Choose "Local install media."
- Select your ISO.
- Assign CPU and memory resources.
- Add the passthrough GPU in the "Add Hardware" section.
Start your virtual machine and ensure everything works as expected. If issues arise, consult the troubleshooting section.
Common problems you might encounter:
- Device Not Found: Ensure IOMMU is enabled and configured correctly.
- Performance Issues: Check for GPU usage within the VM and ensure correct drivers are installed.
- Audio Issues: Verify that the correct audio device is passed through.
Join discussions or seek help in the following forums:
This project is licensed under the MIT License.
For the latest releases, check the following link:
Thank you for visiting the AMD 7000 Series VFIO Setup Guide. I hope this repository helps you in your journey towards successful GPU passthrough!