direct-io.hg

changeset 4262:4d289fcd59c9

bitkeeper revision 1.1252.1.1 (42404b1ftW6eVAZnzGujrdg-lSFXwA)

Fix for regular (non-shadow translate) dom0's

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Tue Mar 22 16:43:11 2005 +0000 (2005-03-22)
parents dcf6c3ab8a7b
children 9bf332f113e1
files xen/arch/x86/domain_build.c
line diff
     1.1 --- a/xen/arch/x86/domain_build.c	Mon Mar 21 17:36:01 2005 +0000
     1.2 +++ b/xen/arch/x86/domain_build.c	Tue Mar 22 16:43:11 2005 +0000
     1.3 @@ -452,15 +452,17 @@ int construct_dom0(struct domain *d,
     1.4      si = (start_info_t *)vstartinfo_start;
     1.5      memset(si, 0, PAGE_SIZE);
     1.6      si->nr_pages     = nr_pages;
     1.7 -#define NASTY_HACK
     1.8 -#ifdef NASTY_HACK
     1.9 -    si->shared_info  = d->next_io_page << PAGE_SHIFT;
    1.10 -    set_machinetophys(virt_to_phys(d->shared_info) >> PAGE_SHIFT,
    1.11 -                      d->next_io_page);
    1.12 -    d->next_io_page++;
    1.13 -#else
    1.14 -    si->shared_info  = virt_to_phys(d->shared_info);
    1.15 -#endif
    1.16 +
    1.17 +    if ( opt_dom0_translate )
    1.18 +    {
    1.19 +        si->shared_info  = d->next_io_page << PAGE_SHIFT;
    1.20 +        set_machinetophys(virt_to_phys(d->shared_info) >> PAGE_SHIFT,
    1.21 +                          d->next_io_page);
    1.22 +        d->next_io_page++;
    1.23 +    }
    1.24 +    else
    1.25 +        si->shared_info  = virt_to_phys(d->shared_info);
    1.26 +
    1.27      si->flags        = SIF_PRIVILEGED | SIF_INITDOMAIN;
    1.28      si->pt_base      = vpt_start;
    1.29      si->nr_pt_frames = nr_pt_pages;