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-changelog

[Xen-changelog] Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly fo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 16:02:07 +0000
Delivery-date: Thu, 17 Nov 2005 16:02:47 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 4c0606fb701bf3135377cc86f4f56028355d3d1c
# Parent  0adacfa2e33f25957a939015dd01d12312eb285e
Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
4MB superpages (32-bit non-pae).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 0adacfa2e33f -r 4c0606fb701b 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
09:10:52 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
10:47:49 2005
@@ -219,7 +219,6 @@
 
 #ifndef __ia64__
        case IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS: {
-
                pgd_t *pgd; 
                pud_t *pud; 
                pmd_t *pmd; 
@@ -235,13 +234,13 @@
 
                p = m.arr; 
 
-               for(i=0; i < m.num; i++) { 
-
+               for (i=0; i < m.num; i++) { 
                        pgd = pgd_offset_k(m2pv);
                        pud = pud_offset(pgd, m2pv);
                        pmd = pmd_offset(pud, m2pv);
-                       m2p_mfn = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
-                       
+                       m2p_mfn  = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
+                       m2p_mfn += pte_index(m2pv);
+
                        if (put_user(m2p_mfn, p + i))
                                return -EFAULT;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for, Xen patchbot -unstable <=