[vfio-users] VGA Passthrough fails without NoSnoop patch

Javier Celaya jcelaya at gmail.com
Tue Jan 31 08:45:46 UTC 2017


Hi

Yes, my host card is the integrated Intel. I patched the kernel at first,
to work with VGA arbitration, when I started virtualizing Windows 7 with
BIOS. Then, I successfully switched to Windows 8 (and Windows 10) and UEFI
so that I could just use a stock kernel. I had to use a ROM file for the
NVIDIA card because it did not support UEFI, but that also worked
flawlessly.

The x-vga=on param is there because I tested it and forgot to remove it.
Nevertheless, it had no effect.

In any case, the successful attempts were made with a commit from the 2.2
branch with the NoSnoop patch. The commit without the patch, and any commit
I tested from version 2.3 to 2.8, all fail.

Anyway this was more an exercise than an actual issue, since I have a
working configuration, but maybe it helps you find some bug. Is there
anything else you want me to try?

Thanks


Javi

2017-01-30 21:19 GMT+01:00 Alex Williamson <alex.williamson at redhat.com>:

> On Sun, 29 Jan 2017 23:03:38 +0100
> Javier Celaya <jcelaya at gmail.com> wrote:
>
> > The host kernel is version 4.9.0 from Debian Sid. That command outputs
> > "f0105a". What does it mean?
>
> Bit 7 would indicate if the IOMMU supports Snoop Control.  When it
> does, the IOMMU page tables can set the SNP bit, which allows
> transactions to snoop the processor cache regardless of transaction
> attributes such as NoSnoop.  IOW, it basically negates NoSnoop at the
> IOMMU level.  Since this bit is clear on your IOMMU, we need to
> register non-coherent DMA with KVM.  This affects memory attributes in
> a few places and determines whether or not KVM needs to emulate the
> WBINVD (write-back-invalidate) instruction.  To some extent, we do need
> to trust guest memory attributes to work in this mode, however the
> NoSnoop patch, which simply tries to prevent the device from enabling
> NoSnoop transactions was a pretty horrible hack.
>
> I'm sure that lots of us run with the same IOMMU capabilities, I have a
> system with identical flags that runs without issue with either an
> NVIDIA or AMD card.  I wonder if the problem is more to do with the
> fact that your CPU has integrated graphics and you're trying to use
> x-vga=on without any mention whether you've patched i915 to properly
> work with VGA arbitration.  If the cards support UEFI, you should not
> need x-vga=on.  Is the host primary graphics Intel?  I don't understand
> why the NoSnoop patch would change your results at all.  Thanks,
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170131/3ad1f63a/attachment.htm>


More information about the vfio-users mailing list