AMD Radeon 6800/6800XT for VFIO?

Up until November 18, 2020 I would have suggested against the purchase of an AMD GPU for VFIO. But yesterday AMD launched its Radeon RX 6800 line of GPUs. Are the AMD Radeon 6800/6800XT suitable for VFIO?

What is VFIO? -- Click to expand

VFIO is about running for example Windows 10 in a virtual machine (VM), using a discrete graphics card that you pass through to the VM. The Linux driver framework that is used to bind the graphics card during the host boot is called VFIO. The virtual machine itself (e.g. Windows 10) then uses its own native graphics driver to drive the GPU, significantly boosting VM graphics performance. This enables you to run Linux on the host and create Windows virtual machines for gaming and other high performance tasks.

 

AMD graphics cards have been plagued with the notorious FLR reset bug over several years now. Independent developers wrote a kernel patch as a workaround that would work most of the time. But the patch required kernel or module compilation, which is not everyone’s cup of tea.

Yesterday Wendell at Level1Techs posted a (p)review of the latest AMD Radeon 6800 and 6800XT graphics cards. He attests that the AMD Radeon 6800/6800XT are perfectly suitable for VFIO passthrough. No more FLR reset bug. Wendell goes further to point out that the Linux graphics drivers available in Ubuntu 20.04 already support these cards. This is great news for the Linux user community in general, and VFIO passthrough enthusiasts especially! Finally an alternative to NVIDIA.

There are more good news: Those of you who already own an AMD Navi, Vega or Polaris graphics card plagued with the FLR reset bug can now enjoy a simpler, better workaround. Instead of compiling the patch into the kernel, all you need to do now is to “build the module and modprobe it, or use dmks to manage it directly”.

AMD has already shown its Linux support through its open source graphics drivers. The new graphics cards based on the RDNA2 architecture have finally corrected the product flaw of previous releases. Welcome to the VFIO club.

You will probably have to wait some time to get hold of one of these cards, as they seem to have sold out on launch day.

Graphics Cards: AMD vs Nvidia

Updated on November 19, 2020

A question that frequently pops up in VFIO or GPU passthrough forums is which graphics card to buy: AMD or Nvidia? And the answer often depends on whom you ask.

Some people will tell you to stay clear of Nvidia graphics cards since their driver detects the virtual machine and quits.

Others mention the “reset bug” that’s been haunting AMD graphics cards for the last couple of years (see Wendells video interview of Linux kernel maintainer Greg Kroah-Hartman). So what’s the story?

Continue reading “Graphics Cards: AMD vs Nvidia”

Creating a Windows 10 VM on the AMD Ryzen 9 3900X using Qemu 4.0 and VGA Passthrough

Last updated: November 22, 2020

Introduction

I’ve already written a detailed tutorial on VGA passthrough based on QEMU version 2.11. Time has passed and today distributions like Ubuntu 20.04, Linux Mint 20, or Manjaro come with QEMU 4.0, 4.2 or 5.0.

A lot has happened since version 2.11. QEMU 4.0 includes numerous changes and improvements such as trim support in the virtio-blk driver, pcie-root-port with PCIe 4.0 support (with Q35-4.0 machine type), as well as improved audio. Continue reading “Creating a Windows 10 VM on the AMD Ryzen 9 3900X using Qemu 4.0 and VGA Passthrough”

Upgrading my PC to an AMD Ryzen 9 3900X System – Benchmarks

It wasn’t easy this time. Don’t get me wrong – the VFIO passthrough part, though challenging in some ways, went quite well. All in all I’m pleased now with the results. Here the Passmark 9.0 benchmark as uploaded onto their database (for more details, click the frame below):

PassMark Rating

Continue reading “Upgrading my PC to an AMD Ryzen 9 3900X System – Benchmarks”

Upgrading my PC to an AMD Ryzen 9 3900X System

Introduction

I’ve been contemplating a PC upgrade for more than a year (see my post here). At first I considered staying with Intel and getting an i9-9900K CPU with integrated GPU on a Z390 motherboard.

Along came the AMD Ryzen 9 3900X that topped the benchmarks, including the Adobe Lightroom and Photoshop benchmarks (to be precise, it ranked #4 in the Adobe Lightroom benchmark, and a narrow #1 in the Adobe Photoshop benchmark). These good news about the AMD Ryzen 3900X were soon followed by reports about BIOS issues and VFIO incompatibility. At the very least, it looked like VGA passthrough was more challenging.

Then I read Bryan Steiner’s GPU passthrough tutorial for the AMD Ryzen 9 3900X and an Ubuntu-based Pop!_OS Linux host. Several users on the VFIO Reddit forum reported successful VFIO VGA passthrough with the AMD Ryzen 9. Continue reading “Upgrading my PC to an AMD Ryzen 9 3900X System”

Impact of Spectre and Meltdown Protection on Virtual Machine Performance

A year ago I wrote about the 2D graphics performance impact of the Windows 10 (1803) update inside a virtual machine. As it turned out, the performance impact was related to the Spectre vulnerability patch that Microsoft had introduced. However, the same patch had practically no performance impact on a Windows 10 bare-metal installation.

Time has passed and I wanted to see if there has been any progress. Right now I’m running Windows 10 (1903) with Nvidia driver release 431.36. Windows 10 is up-to-date, Nvidia however already offers a newer version (431.60). Continue reading “Impact of Spectre and Meltdown Protection on Virtual Machine Performance”

GPU Passthrough with Low-End Intel i3-6100 CPU

For some time I wanted to run a kvm virtual machine with GPU passthrough on a low-end Asus H110M-K D3 motherboard with an i3-6100 CPU and an Nvidia GTX 1060 GPU, but never found the time. Now I finally had a chance to give it a try. While the preparations were easy, I ran into a problem when starting the Windows 10 VM:

Jan 22 15:21:24 alon-i3 kernel: [  108.514992] vfio_pin_pages_remote: RLIMIT_MEMLOCK (16777216) exceeded

Continue reading “GPU Passthrough with Low-End Intel i3-6100 CPU”

Blacklisting Graphics Driver

When running a VM with GPU passthrough, that GPU should be bound to the VFIO driver. To make this happen, we need to prevent the regular graphics driver from binding to the passthrough GPU and instead bind the vfio-pci driver.

The most common way to do this is by blacklisting the graphics driver. This works in most cases, but what if you need the graphics driver for another GPU, e.g. the host GPU? Continue reading “Blacklisting Graphics Driver”

New PC Build

Back in 2012 I built a PC around the Intel i7 3930K 6-core/12HT processor which I have been using ever since. While it’s still a strong PC, especially with the upgrades (GPU, SSD) I made, I’m starting to feel that editing photos isn’t as snappy as it used to be. I am also curious in how well the new generation of CPUs lend themselves to VGA passthrough. In short, I’m considering building a new PC. Continue reading “New PC Build”

Linux Virtual Gaming Machine

You may wonder what’s wrong with this fellow (meaning me, the author). Has he completely lost his mind when he proposes a Linux virtual gaming machine? Before you discredit the idea, let me explain. Continue reading “Linux Virtual Gaming Machine”