ia64/xen-unstable

changeset 4133:4a4b4a6ef605

bitkeeper revision 1.1236.30.1 (4235526bwxkauxTaQRTxeJkFtQFn7Q)

Fix unmapping of user-mapped foreign pages in blktap.

Signed-off-by: andrew.warfield@cl.cam.ac.uk
author akw27@arcadians.cl.cam.ac.uk
date Mon Mar 14 08:59:23 2005 +0000 (2005-03-14)
parents 2b9699a37f17
children 5e1e1c6d7457
files linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_datapath.c linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_userdev.c
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_datapath.c	Fri Mar 11 17:10:51 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_datapath.c	Mon Mar 14 08:59:23 2005 +0000
     1.3 @@ -77,7 +77,7 @@ void active_reqs_init(void)
     1.4  
     1.5  static inline unsigned long MAKE_ID(domid_t fe_dom, ACTIVE_RING_IDX idx)
     1.6  {
     1.7 -    return ( (fe_dom << 16) | idx );
     1.8 +    return ( (fe_dom << 16) | MASK_ACTIVE_IDX(idx) );
     1.9  }
    1.10  
    1.11  /*-----[ Ring helpers ]---------------------------------------------------*/
     2.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Fri Mar 11 17:10:51 2005 +0000
     2.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Mon Mar 14 08:59:23 2005 +0000
     2.3 @@ -355,24 +355,6 @@ int blktap_write_be_ring(blkif_response_
     2.4      return 0;
     2.5  }
     2.6  
     2.7 -static void blktap_fast_flush_area(int idx, int nr_pages)
     2.8 -{
     2.9 -    multicall_entry_t mcl[MMAP_PAGES_PER_REQUEST];
    2.10 -    int               i;
    2.11 -
    2.12 -    for ( i = 0; i < nr_pages; i++ )
    2.13 -    {
    2.14 -        mcl[i].op = __HYPERVISOR_update_va_mapping;
    2.15 -        mcl[i].args[0] = MMAP_VADDR(idx, i);
    2.16 -        mcl[i].args[1] = 0;
    2.17 -        mcl[i].args[2] = 0;
    2.18 -    }
    2.19 -
    2.20 -    mcl[nr_pages-1].args[2] = UVMF_FLUSH_TLB;
    2.21 -    if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
    2.22 -        BUG();
    2.23 -}
    2.24 -
    2.25  static int blktap_read_fe_ring(void)
    2.26  {
    2.27      /* This is called to read responses from the UFE ring. */
    2.28 @@ -398,7 +380,8 @@ static int blktap_read_fe_ring(void)
    2.29              DPRINTK("resp->fe_ring\n");
    2.30              ar = lookup_active_req(ID_TO_IDX(resp_s->id));
    2.31              blkif = ar->blkif;
    2.32 -            blktap_fast_flush_area(ID_TO_IDX(resp_s->id), ar->nr_pages);
    2.33 +            zap_page_range(blktap_vma, MMAP_VADDR(ID_TO_IDX(resp_s->id), 0), 
    2.34 +                    ar->nr_pages << PAGE_SHIFT, NULL);
    2.35              write_resp_to_fe_ring(blkif, resp_s);
    2.36              kick_fe_domain(blkif);
    2.37          }