public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 107561] 4.2 breaks PCI passthrough in QEMU/KVM
Date: Sat, 21 Nov 2015 10:03:23 +0000	[thread overview]
Message-ID: <bug-107561-28872-5wlIBac3Ts@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-107561-28872@https.bugzilla.kernel.org/>

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

schefister@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schefister@gmail.com

--- Comment #4 from schefister@gmail.com ---
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.

  parent reply	other threads:[~2015-11-21 10:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 12:18 [Bug 107561] New: 4.2 breaks PCI passthrough in QEMU/KVM bugzilla-daemon
2015-11-12 22:20 ` [Bug 107561] " bugzilla-daemon
2015-11-13  0:43 ` bugzilla-daemon
2015-11-16  2:12 ` bugzilla-daemon
2015-11-21 10:03 ` bugzilla-daemon [this message]
2015-11-22 23:45 ` bugzilla-daemon
2015-11-22 23:49 ` bugzilla-daemon
2015-11-22 23:51 ` bugzilla-daemon
2015-11-23 18:40 ` bugzilla-daemon
2015-12-10 21:22 ` bugzilla-daemon
2015-12-10 21:24 ` bugzilla-daemon
2015-12-10 21:51 ` bugzilla-daemon
2015-12-10 22:23 ` bugzilla-daemon
2015-12-11 22:01 ` bugzilla-daemon
2015-12-12  5:52 ` bugzilla-daemon
2015-12-14 15:56 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107561-28872-5wlIBac3Ts@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox