KVM: MMU: Fix 32 bit legacy paging with NPT
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 2 Sep 2010 15:29:45 +0000 (17:29 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:52:23 +0000 (10:52 +0200)
This patch fixes 32 bit legacy paging with NPT enabled. The
mmu_check_root call on the top-level of the loop causes
root_gfn to take values (in the tdp_enabled path) which are
outside of guest memory. So the mmu_check_root call fails at
some point in the loop interation causing the guest to
tiple-fault.
This patch changes the mmu_check_root calls to the places
where they are really necessary. As a side-effect it
introduces a check for the root of a pae page table too.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

No differences found