[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |