Perfect! Since you're using systemd-boot instead of GRUB, let's adjust the kernel parameter setup and initramfs regeneration steps properly for your Arch system.
✅ Updated Instructions for QEMU + Single GPU Passthrough (macOS) on Arch Linux with systemd-boot
🚀 Step 1: Enable IOMMU (For VFIO GPU Passthrough)
🛠 Edit your systemd-boot loader config:
Find your loader entry:
bash Copy code
ls /boot/loader/entries/
You’ll see a file like: arch.conf.
Edit it:
bash Copy code
sudo nano /boot/loader/entries/arch.conf
Modify the options line. Append the following:
For Intel :
code Copy code
options root=PARTUUID=... rw intel_iommu=on iommu=pt
For AMD :
code Copy code
options root=PARTUUID=... rw amd_iommu=on iommu=pt
🔧 Be sure not to remove other options like quiet or resume=.... Just append to what's already there.
🔁 Step 2: Load VFIO modules early
Edit your mkinitcpio.conf:
bash Copy code
sudo nano /etc/mkinitcpio.conf
✅ Add to MODULES line:
bash Copy code
MODULES=(... vfio_pci vfio vfio_iommu_type1 vfio_virqfd)
Then regenerate your initramfs:
bash Copy code
sudo mkinitcpio -P
🎯 Step 3: Passing Through Your GPU
Get your GPU and audio device IDs:
Look for lines like:
code Copy code
01:00.0 VGA compatible controller: NVIDIA Corporation Device [10de:1f02]
01:00.1 Audio device: NVIDIA Corporation Device [10de:10fa]
Your IDs are 10de:1f02 and 10de:10fa.
Create VFIO override config:
bash Copy code
sudo nano /etc/modprobe.d/vfio.conf
ini Copy code
options vfio-pci ids=10de:1f02,10de:10fa
Optional: Stop AMDGPU/NVIDIA driver from loading:
Create blacklist if needed:
bash Copy code
sudo nano /etc/modprobe.d/blacklist-nvidia.conf
ini Copy code
blacklist nouveau
blacklist nvidia
blacklist nvidia_drm
blacklist nvidia_modeset
Or for AMD:
bash Copy code
blacklist amdgpu
🧠 Step 4: Setup QEMU with macOS + GPU Passthrough
This step is the same from the previous response – you’ll need:
OVMF (UEFI firmware)
OpenCore bootloader (from OpenCorePkg + macOS installer)
GPU passthrough to be defined in your libvirt virtual machine
Refer to the earlier steps in:
👉 🔗 Previous Response – “Create the VM” section. (You can use Virt-Manager or raw XML.)
🌀 Reboot and Test IOMMU
After doing all the above steps, reboot your system!
To confirm IOMMU is active:
bash Copy code
dmesg | grep -i iommu
To check that your GPU is being claimed by vfio:
You should see:
text Copy code
Kernel driver in use: vfio-pci
🧷 Optional: Add GPU detach/reattach and libvirt hooks
These allow you to dynamically detach the GPU when the macOS VM starts and reattach it when it stops.
Refer to earlier instructions under:
👉 “Create GPU Detach/Reattach Scripts” and “Set up hooks for GPU passthrough.”
These remain the same and are compatible regardless of bootloader.
📦 Tips for macOS VM Setup
❤️ Bonus: Systemd-boot Maintenance
Don’t forget to keep your linux and microcode lines up to date in:
bash Copy code
/boot/loader/entries/arch.conf
Especially if you switch kernels (LTS vs Latest) or use linux-zen.
Would you like:
A prebuilt OpenCore EFI directory?
A full libvirt XML template for a passthrough macOS guest?
Help with dual booting inside the VM using multiple disk files?