WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux/x86: make xen_change_pte_range() compatible wi

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: make xen_change_pte_range() compatible with CONFIG_HIGHPTE
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 01 Feb 2008 08:43:29 +0000
Delivery-date: Fri, 01 Feb 2008 00:43:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Cannot use virt_to_machine() on a kmap()-ed address.

As usual, written and tested on 2.6.24 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-01-28/arch/i386/mm/hypervisor.c
===================================================================
--- head-2008-01-28.orig/arch/i386/mm/hypervisor.c      2007-10-19 
17:18:37.000000000 +0200
+++ head-2008-01-28/arch/i386/mm/hypervisor.c   2008-01-31 17:38:56.000000000 
+0100
@@ -569,7 +569,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: make xen_change_pte_range() compatible with CONFIG_HIGHPTE, Jan Beulich <=