xen: use mmu_update for xen_set_pte_at()
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 1 Dec 2010 23:13:34 +0000 (15:13 -0800)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 20 May 2011 21:14:31 +0000 (14:14 -0700)
commita99ac5e8619c27dbb8e7fb5a4e0ca8c8aa214909
tree3ebc55308915871b7589e9a430b7eddc5d1df26e
parent331468b11b94428a9eb2ed8b3240c17612533a99
xen: use mmu_update for xen_set_pte_at()

In principle update_va_mapping is a good match for set_pte_at, since
it gets the address being mapped, which allows Xen to use its linear
pagetable mapping.

However that assumes that the pmd for the address is attached to the
current pagetable, which may not be true for a given user address space
because the kernel pmd is not shared (at least on 32-bit guests).
Normally the kernel will automatically sync a missing part of the
pagetable with the init_mm pagetable transparently via faults, but that
fails when a missing address is passed to Xen.

And while the linear pagetable mapping is very useful for 32-bit Xen
(as it avoids an explicit domain mapping), 32-bit Xen is deprecated.
64-bit Xen has all memory mapped all the time, so it makes no real
difference.

The upshot is that we should use mmu_update, since it can operate on
non-current pagetables or detached pagetables.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/xen/mmu.c