Bug 103321

Summary: NPT page attribute support causes extreme slowdown
Product: Virtualization Reporter: Sebastian Schütte (dracon)
Component: kvmAssignee: virtualization_kvm
Status: RESOLVED CODE_FIX    
Severity: normal CC: JimiJames.Bove
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.2-rc3+ Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
cpuinfo
lspci

Description Sebastian Schütte 2015-08-22 22:16:12 UTC
Created attachment 185501 [details]
dmesg

For some reason the new NPT attribute support that has been introduced with 4.3-RC3 causes my VM to run awfully slow, I managed to track this issue to commit 3c2e7f7de3 ("KVM: SVM: use NPT page attributes").

The VM runs Win7 64bit via Qemu and uses PCI passthrough with several devices (primary GPU, USB, audio) on a AMD 970/SB950 based Asrock 970 EXTREME3 2.0 motherboard and an AMD Phenom II X6 CPU.

There are no error/warning messages whatsoever, booting the VM takes several minutes just to get past the first boot screen.
Comment 1 Sebastian Schütte 2015-08-22 22:16:54 UTC
Created attachment 185511 [details]
cpuinfo
Comment 2 Sebastian Schütte 2015-08-22 22:17:17 UTC
Created attachment 185521 [details]
lspci
Comment 3 Jimi 2015-10-28 22:56:18 UTC
Before discovering this bug page, I started a thread on the Arch forums before coming across a bug that's either the same one as this or something very similar. We've done some extra investigation over there. Here's a link: https://bbs.archlinux.org/viewtopic.php?pid=1574465
Comment 4 Jimi 2015-10-28 22:56:48 UTC
(In reply to Jimi from comment #3)
> Before discovering this bug page, I started a thread on the Arch forums
> before coming across a bug that's either the same one as this or something
> very similar. We've done some extra investigation over there. Here's a link:
> https://bbs.archlinux.org/viewtopic.php?pid=1574465

Er, that is, by "very similar" I mean the behavior. Obviously, they could have wildly different causes.
Comment 5 Sebastian Schütte 2015-10-28 23:13:36 UTC
As far as I am concerned, RC4 fixes the issue (should've marked it as fixed earlier) by reverting said commit. This change has also been backported to 4.2 stable about 2 weeks ago, AFAIK.

Note that this bug is actually AMD specific and only affects CPUs with NPT support.
Comment 6 Jimi 2015-10-28 23:51:34 UTC
Oh. Definitely not the same bug, then. Ours still isn't fixed and affects more than just AMD.