<p dir="ltr">>VFIO configures memory regions<br>
The documentation is in the source code as usual or there is a text file somewhere telling more about this?<br>
And this is not related to MTRR, right?</p>
<div class="gmail_quote">On Sep 17, 2015 7:35 AM, "Alex Williamson" <<a href="mailto:alex.williamson@redhat.com">alex.williamson@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 16, 2015 at 10:18 PM, Blank Field <span dir="ltr"><<a href="mailto:ihatethisfield@gmail.com" target="_blank">ihatethisfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">You have an AMD FM2 CPU.<br>
Do use SeaBIOS and make use of VGA I/O lines, you must have a VideoBIOS Extension support in your GPU's firmware. Since we are in the 21'st century, you have it.<br>
But the problem is that in order to make VGA work in a VM we must translate MMIO, PIO and IRQs needed into the VM.<br>
That is where IOMMU kicks in, and the related part of software is vfio-pci's x-vga option. <br>
Usually you enable x-vga, vfio tells IOMMU to translate all VGA related stuff from GPU to the VM and vice versa, but on that particular platform(AMD FM2) something is broken in hardware that crashes the IOMMU and the CPU when trying to work with VGA.</p></blockquote><div><br></div><div>Actually the IOMMU isn't involved with VGA access.  The IOMMU is only involved for DMA to or from the device.  These are device initiated memory transfers.  VGA is not a DMA model, it's a programmed I/O model, where every access is an explicit read or write initiated by the CPU.  In the case of a VM, the vCPU is the initiator and vfio configures memory regions for the VGA address space such that a vCPU traps into QEMU on access.  The access is then completed through the vfio kernel module by way of the VGA arbitration code.</div><div><br></div><div>Something may still be broken in FM2 hardware, but hopefully this clears up how the IOMMU (doesn't) participate in VGA access.</div></div></div></div>
</blockquote></div>