Live data from Hacker News

VirGL – A virtual 3D GPU for use inside QEMU virtual machines

docs.mesa3d.org

71–80 of 84 posts

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#71

VirGL is a poor solution to the pressing problem of virtualized graphics. It only really exists because the hardware makers AMD/Intel/Nvidia in their infinite greed refuse to support VFIO on all GPU's like how IOMMU is supported on nearly all CPU's.

AMD supports VFIO on most of their cards. All of the RDNA based cards support it. Even some pre-RDNA ones too, and with a recent-ish driver NVIDIA's Geforce line supports it too without hacks.

Problem isn't really HW support, its that the software side is super glitchy and its not all that easy to configure and in most cases requires a 2nd GPU if you still want basic host functions.

Where as VirGL is much easier to get working and doesn't require specific HW support as far as I'm aware.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#72

Earlier quoted context omitted.

> Good joke, that really made me laugh :) I've been forwarding an AMD GPU to both Windows and macOS for literally years across multiple Asus motherboards and, except for the specific problem of host sleep/wake, had no problems whatsoever, even considering I work under GPU-passthrough VMs whole-day, every-day. Perhaps try a recent Asus motherboard? > have to dual-boot QEMU VMs or disable the passthrough Yes, you would…

> Perhaps try a recent Asus motherboard? I also have an AM4 ASUS board (is that recent enough?) and earlier this year, ASUS decided to completely remove any mention of this board from their site, as if it never existed. So no bios updates for me I guess? No idea if it is up to date or not or if my CPU is even supported... > Yes, you would have to buy as many cheap, secondary GPUs as the number of virtual machines tha…

> earlier this year, ASUS decided to completely remove any mention of this board from their site, as if it never existed.

Maybe your board was only disappeared on some locales? Maybe see if you can find it on asus.cn or one of their other regional sites (translation service required, but you can probably muddle through)

I haven't seen that in a long time, amd640 super7 chipsets got disappeared, but back then you could still get the bios updates via ftp, the boards just dropped off the website.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#73

VirGL is a poor solution to the pressing problem of virtualized graphics. It only really exists because the hardware makers AMD/Intel/Nvidia in their infinite greed refuse to support VFIO on all GPU's like how IOMMU is supported on nearly all CPU's.

Isn't it dangerous to give a guest direct access to a GPU?

It's not dangerous because it needs IOMMU support, the GPU can only access the memory space of the guest.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#74
post #48

Earlier quoted context omitted.

>Correct me if I am wrong on this, but to me, it would seem that something like VirGL would still serve a purpose with wider spreader full SR-IOV support on consumer GPUs, as VirGL could find application in many scenarios where a GPU vendor's drivers are not compatible with the guest. Pretty much every guest OS (windows, Linux, BSD) has drivers that would work with a native PCIe VF GPU device. MacOS still has AMD dri…

GPU Virtualization: life's toughest challenge ;) GVT-g high-level design https://projectacrn.github.io/1.6/developer-guides/hld/hld-A...

GVT-g was intel's first crack at virtualization and is now abandoned. It was supplanted by Intel supporting SR-IOV which itself was succeeded by intel's SIOV.

https://www.intel.com/content/www/us/en/developer/articles/t...

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#75

VirGL is a poor solution to the pressing problem of virtualized graphics. It only really exists because the hardware makers AMD/Intel/Nvidia in their infinite greed refuse to support VFIO on all GPU's like how IOMMU is supported on nearly all CPU's.

That's 100% fair. Good thing it's not too difficult to assign VFIO w/i QEMU for virtual machines despite the manufacturer shenanigans. :) The Arch wiki has a great guide here - https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM... It does get a little tricky if your GPUs are identical, but I've done this for years and maintain a guide for doing this (as well as the ACS-override patched kernel RPMs) for Fedo…

It's not difficult but it misses the point. SIOV supports 1k's of VF's because that's what you need if you want a sandboxed app-per-VM security model. When statically compiled VM's are just as performant as containers but more secure.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#76
post #71

VirGL is a poor solution to the pressing problem of virtualized graphics. It only really exists because the hardware makers AMD/Intel/Nvidia in their infinite greed refuse to support VFIO on all GPU's like how IOMMU is supported on nearly all CPU's.

AMD supports VFIO on most of their cards. All of the RDNA based cards support it. Even some pre-RDNA ones too, and with a recent-ish driver NVIDIA's Geforce line supports it too without hacks. Problem isn't really HW support, its that the software side is super glitchy and its not all that easy to configure and in most cases requires a 2nd GPU if you still want basic host functions. Where as VirGL is much easier to g…

You are likely confusing what is better termed "PCIe passthrough" with virtual functions wherein one physical GPU presents itself on the PCIe bus as (dozen's in the case of SR-IOV or thousands in the case of SIOV) of GPU functions which can be passed to dozens or thousands of GPU enabled VM's.

https://events19.linuxfoundation.cn/wp-content/uploads/2017/...

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#77
post #63

Earlier quoted context omitted.

For decades no one used "nix" to mean Unix and Unix-like OSes (they used "*nix" and occasionally "Lunix") then a package manager named Nix became important and now people confusingly start using "nix" to mean Unix and Unix-like.

Interesting info. It seemed like a reasonable common one to me over the past decade on the web.

I can’t really blame you, it’s a perfectly reasonable concatenation imo. Pretty sure I’ve at least rarely seen it over the years as well.

That said, he is correct that now “nix” is going to likely be popularly associated (especially with tech types that love excessive things) with the Nix language, package manager, and NixOS, which has really been gaining steam. Especially these past few years.

It was what I first thought of as well, given I use them.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#78
post #71

VirGL is a poor solution to the pressing problem of virtualized graphics. It only really exists because the hardware makers AMD/Intel/Nvidia in their infinite greed refuse to support VFIO on all GPU's like how IOMMU is supported on nearly all CPU's.

AMD supports VFIO on most of their cards. All of the RDNA based cards support it. Even some pre-RDNA ones too, and with a recent-ish driver NVIDIA's Geforce line supports it too without hacks. Problem isn't really HW support, its that the software side is super glitchy and its not all that easy to configure and in most cases requires a 2nd GPU if you still want basic host functions. Where as VirGL is much easier to g…

Unfortunately AMD cards suffer from a reset bug, still, when used with passthrough.

The reset bug being that you can pass through the card fine, once. But if you try to pass it through again (or the card experiences an issue and needs to reset), they get caught in some kind of bad state and won’t work until power is removed and restored. Which requires a reboot or a only slightly less disruptive dance with system power states.

For vega and 5000 series gpu’s, there’s https://github.com/gnif/vendor-reset

Incidentally, nvidia gpus are so good at resetting, they’ve probably done so without you noticing. If the screen ever goes black for a fraction of a second and returns in normal usage, it was probably because it reset itself.

The lower 6000 series lower than the 6800’s for example may or may not have the issue. It seems most “reference” cards are fine, but custom vendor cards often but not always have issues. My reference 6700 works fine, but a sapphire 6700 probably won’t.

And the 7000 series is also fucky in a new way somehow. Gnif knows far more about this than me, and has basically thrown up his hands at how AMD doesn’t care. He’s made occasional posts about it on https://forum.level1techs.com/

Gnif is also responsible for Looking glass: https://github.com/gnif/LookingGlass

When it comes to splitting a gpu into virtual ones with SR-IOV/MxGPU, that’s not really a thing with AMD. Whereas Nvidia will happily give you what you want if you shovel some money into their gaping maw, AMD won’t even give business customers the time if day if you aren’t worth billions. They very deliberately do not want the unwashed masses to use MxGPU. See: https://www.reddit.com/r/VFIO/comments/eqvn9z/amd_mxgpu_or_s... for a summary of the years of hopelessness on this functionality.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#79

VirGL is definitely an interesting project, but all one has to do to get GPU passthrough working (from a Linux QEMU host to any guest OS) is: 1.) research a cheap, secondary GPU that is natively supported by the guest OS, 2.) plug such a secondary GPU into a PCIe slot on the host and hook it up to the primary monitor with a secondary cable (D-Sub vs. DVI, etc.), 3.) setup Linux to ignore the secondary GPU at boot and…

See https://looking-glass.io/ to get around directly connecting monitors But forwarding real GPUs limits the number of VMs and can cause stability issues if unlucky - PCIe device bugs, especially reset bugs, are not unusual. Had problems with e.g. a forwarded rx580 that would require a hard reboot of the host to fix... Things like Intel GVT-g and VirGL are better solutions, when they can be used.

I’m not sure what you mean by forwarding, but if you mean regular gpu passthrough and the reset bugs with amd gpus, then for the rx580 vendor-reset should typically work: https://github.com/gnif/vendor-reset

Does not work with the lower 6000 (below 6800) and 7000 series that can also have reset issues.

Re: VirGL – A virtual 3D GPU for use inside QEMU virtual machines

#80

Earlier quoted context omitted.

No. Just because your CPU supports IOMMU, that does not mean GPU passthrough is going to work properly or that groups are setup properly or....

It doesn't, but if you want to do this you might wanna consider not buying the cheapest motherboard either way.

And we've come full circle :)
Post reply on HN