ia64/xen-unstable

changeset 12001:abee5c6b930d

[IA64][HVM][QEMU] Add buffer IO mechanism for IA64/VTi domain.

Signed-off-by:Zhang xiantao <xiantao.zhang@intel.com>
author kfraser@localhost.localdomain
date Wed Oct 25 15:29:36 2006 +0100 (2006-10-25)
parents 1e6b0a8a0822
children 3e26719ab827 eabd485c042d
files tools/ioemu/vl.c
line diff
     1.1 --- a/tools/ioemu/vl.c	Wed Oct 25 15:29:08 2006 +0100
     1.2 +++ b/tools/ioemu/vl.c	Wed Oct 25 15:29:36 2006 +0100
     1.3 @@ -6448,7 +6448,6 @@ int main(int argc, char **argv)
     1.4      fprintf(logfile, "shared page at pfn:%lx, mfn: %"PRIx64"\n",
     1.5              shared_page_nr, (uint64_t)(page_array[shared_page_nr]));
     1.6  
     1.7 -    /* not yet add for IA64 */
     1.8      buffered_io_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
     1.9                                              PROT_READ|PROT_WRITE,
    1.10                                              page_array[shared_page_nr - 2]);
    1.11 @@ -6465,7 +6464,7 @@ int main(int argc, char **argv)
    1.12  #elif defined(__ia64__)
    1.13    
    1.14      if (xc_ia64_get_pfn_list(xc_handle, domid, page_array,
    1.15 -                             IO_PAGE_START >> PAGE_SHIFT, 1) != 1) {
    1.16 +                             IO_PAGE_START >> PAGE_SHIFT, 3) != 3) {
    1.17          fprintf(logfile, "xc_ia64_get_pfn_list returned error %d\n", errno);
    1.18          exit(-1);
    1.19      }
    1.20 @@ -6477,6 +6476,12 @@ int main(int argc, char **argv)
    1.21      fprintf(logfile, "shared page at pfn:%lx, mfn: %016lx\n",
    1.22              IO_PAGE_START >> PAGE_SHIFT, page_array[0]);
    1.23  
    1.24 +    buffered_io_page =xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
    1.25 +                                       PROT_READ|PROT_WRITE,
    1.26 +                                       page_array[2]);
    1.27 +    fprintf(logfile, "Buffered IO page at pfn:%lx, mfn: %016lx\n",
    1.28 +            BUFFER_IO_PAGE_START >> PAGE_SHIFT, page_array[2]);
    1.29 +
    1.30      if (xc_ia64_get_pfn_list(xc_handle, domid,
    1.31                               page_array, 0, nr_pages) != nr_pages) {
    1.32          fprintf(logfile, "xc_ia64_get_pfn_list returned error %d\n", errno);
    1.33 @@ -6496,6 +6501,7 @@ int main(int argc, char **argv)
    1.34          fprintf(logfile, "xc_map_foreign_batch returned error %d\n", errno);
    1.35          exit(-1);
    1.36      }
    1.37 +    free(page_array);
    1.38  #endif
    1.39  #else  /* !CONFIG_DM */
    1.40