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

[Xen-changelog] Remove unnecessary x86-specific mapping code from privcmd interface.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5f2d82cdbb894ad3c334a844b2d9b6c308189c0b
# Parent  f75e01cfde7613b0fcd0a5dce41765df75af044f
Remove unnecessary x86-specific mapping code from privcmd interface.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   10150:2436cc71de508f409b957e9eb24c1f34b1ab615d
xen-unstable date:        Wed May 24 14:49:24 2006 +0100
---
 linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff -r f75e01cfde76 -r 5f2d82cdbb89 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Wed May 24 
11:54:00 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Wed May 24 
15:02:57 2006 +0100
@@ -159,12 +159,10 @@ static int privcmd_ioctl(struct inode *i
        break;
 
        case IOCTL_PRIVCMD_MMAPBATCH: {
-               mmu_update_t u;
                privcmd_mmapbatch_t m;
                struct vm_area_struct *vma = NULL;
                unsigned long __user *p;
                unsigned long addr, mfn; 
-               uint64_t ptep;
                int i;
 
                if (copy_from_user(&m, udata, sizeof(m))) {
@@ -207,15 +205,10 @@ static int privcmd_ioctl(struct inode *i
                        if (ret < 0)
                            goto batch_err;
 #else
-
-                       ret = create_lookup_pte_addr(vma->vm_mm, addr, &ptep);
-                       if (ret)
-                               goto batch_err;
-
-                       u.val = pte_val_ma(pfn_pte_ma(mfn, vma->vm_page_prot));
-                       u.ptr = ptep;
-
-                       if (HYPERVISOR_mmu_update(&u, 1, NULL, m.dom) < 0)
+                       ret = direct_remap_pfn_range(vma, addr & PAGE_MASK,
+                                                    mfn, PAGE_SIZE,
+                                                    vma->vm_page_prot, m.dom);
+                       if (ret < 0)
                                put_user(0xF0000000 | mfn, p);
 #endif
                }

_______________________________________________
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®.