From: Paolo Bonzini <pbonzini@redhat.com>
To: "Sebastian Schütte" <dracon@ewetel.net>,
"KVM list" <kvm@vger.kernel.org>
Subject: Re: [Bug 103321] New: NPT page attribute support causes extreme slowdown
Date: Sun, 23 Aug 2015 19:24:20 -0700 [thread overview]
Message-ID: <55DA8054.7080900@redhat.com> (raw)
In-Reply-To: <55DA16BB.4020004@ewetel.net>
On 23/08/2015 11:53, Sebastian Schütte wrote:
>> What version of SeaBIOS?
> 1.8.2 stable, from the Arch repo
>> Can you try cherry-picking commit 5492830370171b6a4ede8a3bfba687a8d0f25fa5?
> Tried that, but it doesn't seem to make a difference.
>> If that fails, can you trace the execution of the VM until the beginning
>> of the Linux kernel boot (http://www.linux-kvm.org/page/Tracing) and
>> send it compressed to me by email?
> I have attached a trace up to the point when the Windows bootloader
> kicks in. I could still set up a Linux VM if you think its trace would
> be more helpful, though.
No, it seems to be in the BIOS. Please try this:
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 74d825716f4f..f8f69cffecbf 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -882,7 +882,8 @@ static u8 fallback_mtrr_type(int mtrr)
case MTRR_TYPE_WRTHROUGH:
return MTRR_TYPE_UNCACHABLE;
case MTRR_TYPE_WRPROT:
- return MTRR_TYPE_UC_MINUS;
+ /* Assume it's backed by RAM in the host. */
+ return MTRR_TYPE_WRBACK;
default:
BUG();
}
@@ -3054,6 +3055,7 @@ static int cr_interception(struct vcpu_svm *svm)
if (cr >= 16) { /* mov to cr */
cr -= 16;
val = kvm_register_read(&svm->vcpu, reg);
+ trace_kvm_cr_write(cr, val);
switch (cr) {
case 0:
if (!check_selective_cr0_intercepted(svm, val))
This is a bit of a hack, but it can be enough for a test. For a
real patch one would make mtrr2protval bidimensional, accessing it
like "return mtrr2protval[is_mmio][mtrr]" in svm_get_mt_mask.
Then you can return MTRR_TYPE_UC_MINUS if is_mmio, and
MTRR_TYPE_WRBACK if !is_mmio.
Paolo
next prev parent reply other threads:[~2015-08-24 2:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-22 22:16 [Bug 103321] New: NPT page attribute support causes extreme slowdown bugzilla-daemon
2015-08-22 22:16 ` [Bug 103321] " bugzilla-daemon
2015-08-22 22:17 ` bugzilla-daemon
[not found] ` <55D90002.10703@redhat.com>
[not found] ` <55DA16BB.4020004@ewetel.net>
2015-08-24 2:24 ` Paolo Bonzini [this message]
2015-08-24 22:55 ` [Bug 103321] New: " Sebastian Schütte
2015-09-02 19:01 ` Sebastian Schütte
2015-09-15 16:32 ` Paolo Bonzini
2015-09-15 20:11 ` Sebastian Schütte
2015-10-28 22:56 ` [Bug 103321] " bugzilla-daemon
2015-10-28 22:56 ` bugzilla-daemon
2015-10-28 23:13 ` bugzilla-daemon
2015-10-28 23:51 ` 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=55DA8054.7080900@redhat.com \
--to=pbonzini@redhat.com \
--cc=dracon@ewetel.net \
--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;
as well as URLs for NNTP newsgroup(s).