[Bug 107561] 4.2 breaks PCI passthrough in QEMU/KVM

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=107561

schefister@xxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schefister@xxxxxxxxx

--- Comment #4 from schefister@xxxxxxxxx ---
I narrowed it down earlier to "simplify kvm_mtrr_get_guest_memory_type".
Actually this was the commit to break it, but it is only a small part of the
feauture set implementing vMTRR. To my knowledge 4.1.x versions didn't have
this code set at all. It was introduced in 4.2.
What kvm_mtrr_get_guest_memory_type() does is basically decides what cache type
to use (Uncachable, Write-Back, or Write-Through) based on the function
mtrr_for_each_mem_type(). This kvm_mtrr_get_guest_memory_type function is only
called by vmx_get_mt_mask. This is all related to how the hardware is set up
regarding IOMMU, MMIO, VT-d and EPT andress translation.

For experimenting purposes I simply modified kvm_mtrr_get_guest_memory_type to
always return MTRR_TYPE_WRBACK and that fixed the issue. Guest boots correctly. 
Although I know, that hardcoding Write-back mode is not a viable long-term
solution. It seems as the new function (in 4.2 and onward) does not return the
proper cache type in case of pci passthrough configurations. 

I would also like to point out, that
https://bugzilla.kernel.org/show_bug.cgi?id=107921 may be related. The other
bug mentions very similar hardware to mine, and issues started the same time
(upgrading to 4.2.x) with a pci passthrough configuration.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
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