[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] enable ioports_deny_access for dom0



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 2aaad9cbc926f9049fdc9aa3016576d4b8d69884
# Parent  6c67ca1e1c1acbb37d88f0d39a068aefbb448342
[IA64] enable ioports_deny_access for dom0

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/xen/mm.c       |   15 ++++++++++-----
 xen/arch/ia64/xen/xensetup.c |    4 +++-
 2 files changed, 13 insertions(+), 6 deletions(-)

diff -r 6c67ca1e1c1a -r 2aaad9cbc926 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Tue Aug 08 14:31:48 2006 -0600
+++ b/xen/arch/ia64/xen/mm.c    Tue Aug 08 14:36:21 2006 -0600
@@ -838,7 +838,7 @@ ioports_permit_access(struct domain *d, 
 
     for (off = fp_offset; off <= lp_offset; off += PAGE_SIZE)
         __assign_domain_page(d, IO_PORTS_PADDR + off,
-                             ia64_iobase + off, ASSIGN_nocache);
+                             __pa(ia64_iobase) + off, ASSIGN_nocache);
 
     return 0;
 }
@@ -859,18 +859,23 @@ ioports_deny_access(struct domain *d, un
     int ret;
     struct mm_struct *mm = &d->arch.mm;
     unsigned long off;
+    unsigned long io_ports_base;
     unsigned long fp_offset;
     unsigned long lp_offset;
 
     ret = rangeset_remove_range(d->arch.ioport_caps, fp, lp);
     if (ret != 0)
         return ret;
-
-    fp_offset = IO_SPACE_SPARSE_ENCODING(fp) & ~PAGE_MASK;
+    if (d == dom0)
+        io_ports_base = __pa(ia64_iobase);
+    else
+        io_ports_base = IO_PORTS_PADDR;
+
+    fp_offset = IO_SPACE_SPARSE_ENCODING(fp) & PAGE_MASK;
     lp_offset = PAGE_ALIGN(IO_SPACE_SPARSE_ENCODING(lp));
 
-    for (off = fp_offset; off <= lp_offset; off += PAGE_SIZE) {
-        unsigned long mpaddr = IO_PORTS_PADDR + off;
+    for (off = fp_offset; off < lp_offset; off += PAGE_SIZE) {
+        unsigned long mpaddr = io_ports_base + off;
         unsigned long port;
         volatile pte_t *pte;
         pte_t old_pte;
diff -r 6c67ca1e1c1a -r 2aaad9cbc926 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Tue Aug 08 14:31:48 2006 -0600
+++ b/xen/arch/ia64/xen/xensetup.c      Tue Aug 08 14:36:21 2006 -0600
@@ -525,8 +525,10 @@ printk("num_online_cpus=%d, max_cpus=%d\
 
     init_trace_bufs();
 
-    if (opt_xencons)
+    if (opt_xencons) {
         console_endboot();
+        serial_endboot();
+    }
 
     domain0_ready = 1;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.