Live data from Hacker News

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

docs.mesa3d.org

61–70 of 84 posts

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

#61
post #59

Earlier quoted context omitted.

> disables preemption systemwide I guess that means not usable day-to-day. One infinite loop in any app and the whole OS will freeze forever. I didn't even know any modern OS could operate only with cooperative multitasking. Windows 3.1 in 1992 and PowerPC Mac OS until 2002 were the last mainstream OS's to use it...

I believe he’s referring to GPU preemption. I don’t think it’s even possible to disable cpu preemption on windows. On nix you can.

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.

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

#62

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…

Why is this a requirement? I thought Linux takes over after it loads.

  Your guest GPU ROM must support UEFI"

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

#63
post #59

Earlier quoted context omitted.

I believe he’s referring to GPU preemption. I don’t think it’s even possible to disable cpu preemption on windows. On nix you can.

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.

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

#64
post #52

Earlier quoted context omitted.

It's not really to different to giving your web browser access to your GPU (and by extension to random websites using WebGL). So yes, it's dangerous. But it is at least a threat which designers of GPUs are already considering. Although there have been interesting bugs where GPU memory hasn't been zeroed before allocating it to a new context and you could read previously written graphics memory to find secrets. As lon…

I feel like a good half of machines I find with glitchy graphics drivers seem to show bits of textures from one application inside another application - indicating memory contents leakage between contexts. Chunks of webpages from Chrome appearing in 3D games seems common. And those are accidentally caused leaks. As soon as someone starts storing actually sensitive data in graphics memory, I'm sure lots of methods to…

I've had a more extreme case in a dual boot configuration of some graphics corruption on my Linux desktop exposing a mirrored and discolored frame of my prior Windows desktop from before rebooting.

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

#65
post #4
post #3

Earlier quoted context omitted.

It's called Venus: https://docs.mesa3d.org/drivers/venus.html But not sure how far along it is. virt-manager doesn't seem to be aware of it yet.

ChromeOS uses it for Steam support which is generally available now, as well as for Android apps, so it must work reasonably well: https://chromeos.dev/en/posts/improving-vulkan-availability-...

Why does ChromeOS need virtualization for Steam in general?

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

#66

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…

> plug such a secondary GPU into a PCIe slot on the host Where can I find an unused PCIe slot on my laptop? Also it is not very rational to buy 2 GPUs and use only one at a time.

I have an AMD 290 or whatever GPU to run NixOS (will be upgrading to Intel soon) and a 3060 that I pass into a Windows VM for gaming, I feel very rational.

Unused PCIe slots in a laptop is hard, haven't tried but I imagine Thunderbolt could work for this purpose.

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

#67
post #65
post #4

Earlier quoted context omitted.

ChromeOS uses it for Steam support which is generally available now, as well as for Android apps, so it must work reasonably well: https://chromeos.dev/en/posts/improving-vulkan-availability-...

Why does ChromeOS need virtualization for Steam in general?

Security, defense in depth.

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

#68

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.

You mean SR-IOV?

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

#69

Earlier quoted context omitted.

IOMMU is a integrated CPU feature, so consumer motherboards do not affect reliability - they just make the setting available. IOMMU is also required for various modern security features, and M$ requires it for certification nowadays to protect against DMA vulnerabilities (heard of thunderbolt?).

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.

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

#70

How does Mesa3D get funding? It seems to be doing a fair bit.

It's been a while since I've really looked, but I seem to remember that the major contributors are either employed by various hardware/software vendors (Google, Valve, Intel, AMD, VMWare) or do contract/consulting work on the Linux graphics stack (LunarG), not unlike the Linux kernel.
Post reply on HN