direct-io.hg

changeset 660:816756811961

bitkeeper revision 1.375 (3f1e8aa2shFt1h1TJhL4XlUpbChmag)

memory.c:
Allow writes to non-pagetable pages via Xen pagetable interface.
author kaf24@scramble.cl.cam.ac.uk
date Wed Jul 23 13:16:18 2003 +0000 (2003-07-23)
parents 3dce70f5b210
children 98b19b3e05eb
files xen/common/memory.c
line diff
     1.1 --- a/xen/common/memory.c	Tue Jul 22 14:48:24 2003 +0000
     1.2 +++ b/xen/common/memory.c	Wed Jul 23 13:16:18 2003 +0000
     1.3 @@ -786,7 +786,7 @@ static int do_extended_command(unsigned 
     1.4  int do_process_page_updates(page_update_request_t *ureqs, int count)
     1.5  {
     1.6      page_update_request_t req;
     1.7 -    unsigned long flags, pfn;
     1.8 +    unsigned long flags, pfn, *ptr;
     1.9      struct pfn_info *page;
    1.10      int err = 0, i;
    1.11      unsigned int cmd;
    1.12 @@ -833,6 +833,10 @@ int do_process_page_updates(page_update_
    1.13                      break;
    1.14                  default:
    1.15                      MEM_LOG("Update to non-pt page %08lx", req.ptr);
    1.16 +                    ptr = map_domain_mem(req.ptr);
    1.17 +                    *ptr = req.val;
    1.18 +                    unmap_domain_mem(ptr);
    1.19 +                    err = 0;
    1.20                      break;
    1.21                  }
    1.22              }
    1.23 @@ -870,7 +874,7 @@ int do_process_page_updates(page_update_
    1.24              req.ptr &= ~(sizeof(l1_pgentry_t) - 1);
    1.25              if ( current->domain == 0 )
    1.26              {
    1.27 -                unsigned long *ptr = map_domain_mem(req.ptr);
    1.28 +                ptr = map_domain_mem(req.ptr);
    1.29                  *ptr = req.val;
    1.30                  unmap_domain_mem(ptr);
    1.31                  err = 0;