[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] linux/x86: make xen_change_pte_range() compatible with CONFIG_HIGHPTE



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201865642 0
# Node ID 7f0c06696fecc93ac06517010e551a8f9d67e30d
# Parent  3cd3352a99850c4e705408e312e26f732cecb792
linux/x86: make xen_change_pte_range() compatible with CONFIG_HIGHPTE

Cannot use virt_to_machine() on a kmap()-ed address.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/mm/hypervisor.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 3cd3352a9985 -r 7f0c06696fec arch/i386/mm/hypervisor.c
--- a/arch/i386/mm/hypervisor.c Fri Feb 01 11:32:53 2008 +0000
+++ b/arch/i386/mm/hypervisor.c Fri Feb 01 11:34:02 2008 +0000
@@ -566,7 +566,9 @@ int xen_change_pte_range(struct mm_struc
        pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
        do {
                if (pte_present(*pte)) {
-                       u[i].ptr = virt_to_machine(pte) | 
MMU_PT_UPDATE_PRESERVE_AD;
+                       u[i].ptr = (__pmd_val(*pmd) & PHYSICAL_PAGE_MASK)
+                                  | ((unsigned long)pte & ~PAGE_MASK)
+                                  | MMU_PT_UPDATE_PRESERVE_AD;
                        u[i].val = __pte_val(pte_modify(*pte, newprot));
                        if (++i == MAX_BATCHED_FULL_PTES) {
                                if ((rc = HYPERVISOR_mmu_update(

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.