Re: AMD integrated graphics passthrough to KVM guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-07-12 at 20:18 +0200, Gustav Sorenson wrote:
> Hello,
> 
> > Ok, I have an X500 and I've never been able to get it to work correctly
> > for passthrough.  It has additional quirks required beyond what either
> > my HD5450 or HD7850 require.  Also, these old devices have a weird
> > co-processor secondary function (see 01:00.1 in your lspci).  It
> > probably needs to be co-assigned, but I'm not really sure what it does.
> > FWIW, I don't think it's worth bothering to add support for anything
> > older than a Radeon HD5xxx (I'd say HD6xxx, but I happen to have the
> > HD5450 and it works, so...)
> 
> You're probably right that for old cards the demand isn't high enough
> to justify the time spent. I don't plan to use the X1300 actively
> anyway.
> 
> My plan was to initially buy the hardware as I have now, get VGA
> passthrough of the integrated GPU to work, and then add another more
> powerful (HD6xxx most probably) PCIe device, so that I could have a
> headless host and two 3D-accelerated VMs.
> Now that this seemingly won't work, I'd be happy if at least I could
> run the IGP on the host and pass the not-yet-bought dedicated GPU to a
> guest.
> So, in order to not again discover that my plans won't work out after
> I already bought the hardware, could you please tell me whether you
> have any problems with your graphics cards in guests? Xen users seem
> to suffer degraded performance after their guest systems shut
> down/reboot. Is this the case with KVM and VFIO as well? Any other
> issues, or models I should/should not buy?
> Of course I've done some research on my own, but the VGA
> virtualization topic seems to be quite volatile right now, and I find
> contradicting information.

I'm reluctant to recommend anything because there are several unresolved
issues and none of the current consumer-class cards claim to work in
virtual environments.  We have issues with VGA routing, which can cause
problems with host drives which don't make use of the in-kernel VGA
arbiter (ex. vga console).  We need to continue to work on the kinks out
of PCI secondary bus resets.  All consumer-class cards have undocumented
backdoors to config space, which we're hoping are only accessed via CPU,
which we can quirk, and not via the GPU, which we can't.  On the Nvidia
side, the nouveau project has discovered many of these, so I expect many
Nvidia cards work and there are user reports to confirm so.  On the
Radeon side, I've discovered many of the quirks and have an HD7850 that
seems to work pretty well.  By well I mean, don't do anything that would
cause VGA access on the primary display and the PCI bus sometimes
doesn't come back if the guest is reset without a clean shutdown.

For performance, I expect there will be a hit vs running on baremetal,
but I don't know the extent.  I don't know if we suffer from the same
problem you mention for Xen, but I don't see why it would be the case
either (perhaps the link retrains at a lower speed?).


> > One reason you're probably not getting any output is because the device
> > doesn't have a ROM (ie. there's no video BIOS to run to get seabios to
> > POST the device).  You'll either need to find a VBIOS for the device or
> > use it as a secondary graphics device in the guest.  In some cases you
> > can rip this out of the system ROM or ACPI tables.
> >
> > I don't think that using the vfio-vga-reset branches is helping you
> > since it's a root complex device and we can't do a reset even if we knew
> > how and if you use it as a secondary device, you might not even need the
> > x-vga=on option for VFIO (ie. VFIO would handle this just like any
> > regular PCI device).  Thanks,
> 
> Are you implying that I should be able to use the integrated GPU (if
> it's not the primary, I suppose) as a secondary for a guest? If so, do
> you expect 3D acceleration to work?

Yes, with the correction of s/should/might/.  3D acceleration might also
work.  Generally if you assign a passthrough graphics as a secondary
device it will only work once you load the vendor driver stack (ex. AMD
Catalyst), at which point the emulated graphics is disabled and the
passthrough graphics becomes the primary for the guest.  Thanks,

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux