[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110216002113.623536886@clark.kroah.org>
Date: Tue, 15 Feb 2011 16:21:54 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org, greg@...ah.com,
avi@...hat.com, mtosatti@...hat.com
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk
Subject: [patch 146/176] KVM: MMU: Fix incorrect direct gfn for unpaged mode shadow
2.6.36-stable review patch. If anyone has any objections, please let us know.
------------------
From: Avi Kivity <avi@...hat.com>
commit c093b8b46c5f0dd12d799f0d6a3b579863df72f6 upstream.
We use the physical address instead of the base gfn for the four
PAE page directories we use in unpaged mode. When the guest accesses
an address above 1GB that is backed by a large host page, a BUG_ON()
in kvm_mmu_set_gfn() triggers.
Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=21962
Reported-and-tested-by: Nicolas Prochazka <prochazka.nicolas@...il.com>
Signed-off-by: Avi Kivity <avi@...hat.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
arch/x86/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2271,7 +2271,7 @@ static int mmu_alloc_roots(struct kvm_vc
return 1;
if (tdp_enabled) {
direct = 1;
- root_gfn = i << 30;
+ root_gfn = i << (30 - PAGE_SHIFT);
}
spin_lock(&vcpu->kvm->mmu_lock);
kvm_mmu_free_some_pages(vcpu);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists