public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: bugzilla-daemon@bugzilla.kernel.org
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Bug 37262] VNC access to KVM VM is unusable
Date: Fri, 17 Jun 2011 10:25:39 +0800	[thread overview]
Message-ID: <4DFABB23.9080808@cn.fujitsu.com> (raw)
In-Reply-To: <201106162039.p5GKdWxg020197@demeter2.kernel.org>

On 06/17/2011 04:39 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=37262
> 
> 
> 
> 
> 
> --- Comment #43 from Steve <stefan.bosak@gmail.com>  2011-06-16 20:39:32 ---
> Solution of this bug is very simple:
> 
> arch/x86/kvm/mmu.c:
> 
> static bool mapping_level_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t large_gfn)
> {
> return (gfn_to_memslot_dirty_bitmap(vcpu, large_gfn, true) == NULL)
> ? true : false;
> }
> 
> Only opposite condition.
> Please commit when it's possible.
> 

Yes, it is the reason, thanks for your time and great job, i am so
sorry, this is caused by my mistake :-(

And this is the fix patch from you and i did little cleanup

From: Steve <stefan.bosak@gmail.com>
Subject: [PATCH] KVM: MMU: fix opposite condition in mapping_level_dirty_bitmap

The condition is opposite, it always maps huge page for the dirty tracked page

Reported-by: Steve <stefan.bosak@gmail.com>
Signed-off-by: Steve <stefan.bosak@gmail.com>
---
 arch/x86/kvm/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 19ebb76..15afa1e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -549,7 +549,7 @@ gfn_to_memslot_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t gfn,
 
 static bool mapping_level_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t large_gfn)
 {
-	return gfn_to_memslot_dirty_bitmap(vcpu, large_gfn, true);
+	return !gfn_to_memslot_dirty_bitmap(vcpu, large_gfn, true);
 }
 
 static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn)
-- 
1.7.5.4


  reply	other threads:[~2011-06-17  2:23 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 20:04 [Bug 37262] New: VNC access to KVM VM is unusable bugzilla-daemon
2011-06-12 11:50 ` [Bug 37262] " bugzilla-daemon
2011-06-12 13:24 ` bugzilla-daemon
2011-06-12 13:42 ` bugzilla-daemon
2011-06-12 13:54 ` bugzilla-daemon
2011-06-12 13:57 ` bugzilla-daemon
2011-06-12 14:41 ` bugzilla-daemon
2011-06-12 14:43 ` bugzilla-daemon
2011-06-12 14:58 ` bugzilla-daemon
2011-06-12 15:00 ` bugzilla-daemon
2011-06-12 15:39 ` bugzilla-daemon
2011-06-12 15:39 ` bugzilla-daemon
2011-06-12 15:54 ` bugzilla-daemon
2011-06-12 15:55 ` bugzilla-daemon
2011-06-12 16:00 ` bugzilla-daemon
2011-06-12 16:11 ` bugzilla-daemon
2011-06-12 16:18 ` bugzilla-daemon
2011-06-12 16:23 ` bugzilla-daemon
2011-06-12 17:01 ` bugzilla-daemon
2011-06-12 19:30 ` bugzilla-daemon
2011-06-12 22:19 ` bugzilla-daemon
2011-06-12 22:46 ` bugzilla-daemon
2011-06-12 22:49 ` bugzilla-daemon
2011-06-12 22:58 ` bugzilla-daemon
2011-06-12 23:22 ` bugzilla-daemon
2011-06-13  8:11 ` bugzilla-daemon
2011-06-13  8:59 ` bugzilla-daemon
2011-06-13  8:59 ` bugzilla-daemon
2011-06-13  9:15 ` bugzilla-daemon
2011-06-13  9:22 ` bugzilla-daemon
2011-06-13  9:35 ` bugzilla-daemon
2011-06-13  9:55 ` bugzilla-daemon
2011-06-13 12:18 ` bugzilla-daemon
2011-06-13 14:05 ` bugzilla-daemon
2011-06-13 14:12 ` bugzilla-daemon
2011-06-13 14:27 ` bugzilla-daemon
2011-06-15 17:10 ` bugzilla-daemon
2011-06-15 17:19 ` bugzilla-daemon
2011-06-15 21:44 ` bugzilla-daemon
2011-06-16 14:00   ` Avi Kivity
2011-06-15 21:46 ` bugzilla-daemon
2011-06-16 14:00 ` bugzilla-daemon
2011-06-16 14:15 ` bugzilla-daemon
2011-06-16 16:45 ` bugzilla-daemon
2011-06-16 20:39 ` bugzilla-daemon
2011-06-17  2:25   ` Xiao Guangrong [this message]
2011-06-19  8:50     ` Avi Kivity
2011-06-17  3:49 ` bugzilla-daemon
2011-06-17  7:00 ` bugzilla-daemon
2011-06-19  8:50 ` 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=4DFABB23.9080808@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=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