[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070311103250.GA23396@elte.hu>
Date: Sun, 11 Mar 2007 11:32:50 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Avi Kivity <avi@...ranet.com>
Cc: kvm-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [kvm-devel] [PATCH] KVM: MMU: Fix guest writes to nonpae pde
* Avi Kivity <avi@...ranet.com> wrote:
> KVM shadow page tables are always in pae mode, regardless of the guest
> setting. This means that a guest pde (mapping 4MB of memory) is
> mapped to two shadow pdes (mapping 2MB each).
>
> When the guest writes to a pte or pde, we intercept the write and
> emulate it. We also remove any shadowed mappings corresponding to the
> write. Since the mmu did not account for the doubling in the number
> of pdes, it removed the wrong entry, resulting in a mismatch between
> shadow page tables and guest page tables, followed shortly by guest
> memory corruption.
>
> This patch fixes the problem by detecting the special case of writing
> to a non-pae pde and adjusting the address and number of shadow pdes
> zapped accordingly.
>
> Signed-off-by: Avi Kivity <avi@...ranet.com>
tested this with both PAE and non-PAE Linux host and guest - works fine.
Acked-by: Ingo Molnar <mingo@...e.hu>
Ingo
-
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