ia64/xen-unstable

changeset 4039:fac582936464

bitkeeper revision 1.1236.12.20 (422ed726QE48iGSJKlGDKQ2zNgOceA)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into arcadians.cl.cam.ac.uk:/auto/anfs/nos1/akw27/xeno-clone/xeno.bk
author akw27@arcadians.cl.cam.ac.uk
date Wed Mar 09 10:59:50 2005 +0000 (2005-03-09)
parents 8c5837440371 8c6d9b578870
children a1a4e6ed8109
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	Wed Mar 09 10:08:43 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_datapath.c	Wed Mar 09 10:59:50 2005 +0000
     1.3 @@ -315,6 +315,7 @@ static int do_block_io_op(blkif_t *blkif
     1.4           */
     1.5          ar = get_active_req();
     1.6          ar->id = req_s->id;
     1.7 +        ar->nr_pages = req_s->nr_segments; 
     1.8          blkif_get(blkif);
     1.9          ar->blkif = blkif;
    1.10          req_s->id = MAKE_ID(blkif->domid, ACTIVE_IDX(ar));
     2.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Wed Mar 09 10:08:43 2005 +0000
     2.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Wed Mar 09 10:59:50 2005 +0000
     2.3 @@ -355,6 +355,24 @@ 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 @@ -380,6 +398,7 @@ 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              write_resp_to_fe_ring(blkif, resp_s);
    2.34              kick_fe_domain(blkif);
    2.35          }