ia64/xen-unstable

changeset 10934:2aaad9cbc926

[IA64] enable ioports_deny_access for dom0

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Tue Aug 08 14:36:21 2006 -0600 (2006-08-08)
parents 6c67ca1e1c1a
children 555eb7402bd8
files xen/arch/ia64/xen/mm.c xen/arch/ia64/xen/xensetup.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Tue Aug 08 14:31:48 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Tue Aug 08 14:36:21 2006 -0600
     1.3 @@ -838,7 +838,7 @@ ioports_permit_access(struct domain *d, 
     1.4  
     1.5      for (off = fp_offset; off <= lp_offset; off += PAGE_SIZE)
     1.6          __assign_domain_page(d, IO_PORTS_PADDR + off,
     1.7 -                             ia64_iobase + off, ASSIGN_nocache);
     1.8 +                             __pa(ia64_iobase) + off, ASSIGN_nocache);
     1.9  
    1.10      return 0;
    1.11  }
    1.12 @@ -859,18 +859,23 @@ ioports_deny_access(struct domain *d, un
    1.13      int ret;
    1.14      struct mm_struct *mm = &d->arch.mm;
    1.15      unsigned long off;
    1.16 +    unsigned long io_ports_base;
    1.17      unsigned long fp_offset;
    1.18      unsigned long lp_offset;
    1.19  
    1.20      ret = rangeset_remove_range(d->arch.ioport_caps, fp, lp);
    1.21      if (ret != 0)
    1.22          return ret;
    1.23 +    if (d == dom0)
    1.24 +        io_ports_base = __pa(ia64_iobase);
    1.25 +    else
    1.26 +        io_ports_base = IO_PORTS_PADDR;
    1.27  
    1.28 -    fp_offset = IO_SPACE_SPARSE_ENCODING(fp) & ~PAGE_MASK;
    1.29 +    fp_offset = IO_SPACE_SPARSE_ENCODING(fp) & PAGE_MASK;
    1.30      lp_offset = PAGE_ALIGN(IO_SPACE_SPARSE_ENCODING(lp));
    1.31  
    1.32 -    for (off = fp_offset; off <= lp_offset; off += PAGE_SIZE) {
    1.33 -        unsigned long mpaddr = IO_PORTS_PADDR + off;
    1.34 +    for (off = fp_offset; off < lp_offset; off += PAGE_SIZE) {
    1.35 +        unsigned long mpaddr = io_ports_base + off;
    1.36          unsigned long port;
    1.37          volatile pte_t *pte;
    1.38          pte_t old_pte;
     2.1 --- a/xen/arch/ia64/xen/xensetup.c	Tue Aug 08 14:31:48 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/xensetup.c	Tue Aug 08 14:36:21 2006 -0600
     2.3 @@ -525,8 +525,10 @@ printk("num_online_cpus=%d, max_cpus=%d\
     2.4  
     2.5      init_trace_bufs();
     2.6  
     2.7 -    if (opt_xencons)
     2.8 +    if (opt_xencons) {
     2.9          console_endboot();
    2.10 +        serial_endboot();
    2.11 +    }
    2.12  
    2.13      domain0_ready = 1;
    2.14