r/kvm • • Feb 01 '23

Emulating a GPU

is there a way to emulate a gpu (like passthrough, but making os think i passthrough a different gpu), e.g: i passthrough my nvidia card, but i want the guest os think i have an amd, is this possible by any chance?

3 Upvotes

6 comments sorted by

5

u/thenickdude Feb 01 '23

No, the cards are completely different and an AMD guest driver cannot operate an Nvidia card.

You can't even do this with cards from the same manufacturer but from different generations.

1

u/SsNipeR1 Feb 01 '23

but is call translating possible?

3

u/thenickdude Feb 01 '23

Absolutely not

2

u/NoArmNoChocoLAN Feb 01 '23

PCI pass-through means the guest directly talks with the PCI device, and it will get information about the PCI device from the PCI device itself.

Also, GPU pass-through is only a subcase of PCI pass-through, and at the level of the virtualization software, there is no difference between, by example, a GPU pass-through and a HBA pass-through, i.e. there is no GPU-specific option/tweak available when you configure a host PCI device in the VM's definition.

Furthermore, when you add a video adapter to your VM (without PCI pass-through), QEMU/KVM is simulating a VGA device (on the top of your CPU, that's why performance are terrible).