WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] make virt_to_maddr() to support bo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] make virt_to_maddr() to support both cached/uncached identity mapped area.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 07:51:08 -0700
Delivery-date: Wed, 22 Oct 2008 07:54:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1224225183 -32400
# Node ID 7db30bf36b0ef5ea95237cef2a4533e4c87b3317
# Parent  5450b008afcec7a5184a0124aab3be639933aec8
[IA64] make virt_to_maddr() to support both cached/uncached identity mapped 
area.

The significant 8 bits of va are used by Xen,
such as 0xf2 is used as uncache mapping.

In function ioports_permit_access,
 mach_start = mmio_start | __pa(space->mmio_base);
Mach_start gets wrong physical address.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/include/asm-ia64/linux-xen/asm/pgtable.h |    3 +++
 xen/include/asm-ia64/xenpage.h               |   10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff -r 5450b008afce -r 7db30bf36b0e 
xen/include/asm-ia64/linux-xen/asm/pgtable.h
--- a/xen/include/asm-ia64/linux-xen/asm/pgtable.h      Thu Oct 16 11:33:05 
2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/pgtable.h      Fri Oct 17 15:33:03 
2008 +0900
@@ -20,12 +20,15 @@
 #include <asm/system.h>
 #include <asm/types.h>
 #ifdef XEN
+#include <asm/xenpage.h>
 #ifndef __ASSEMBLY__
 #include <xen/sched.h> /* needed for mm_struct (via asm/domain.h) */
 #endif
 #endif
 
+#ifndef XEN
 #define IA64_MAX_PHYS_BITS     50      /* max. number of physical address bits 
(architected) */
+#endif
 
 /*
  * First, define the various bits in a PTE.  Note that the PTE format
diff -r 5450b008afce -r 7db30bf36b0e xen/include/asm-ia64/xenpage.h
--- a/xen/include/asm-ia64/xenpage.h    Thu Oct 16 11:33:05 2008 +0900
+++ b/xen/include/asm-ia64/xenpage.h    Fri Oct 17 15:33:03 2008 +0900
@@ -1,5 +1,8 @@
 #ifndef _ASM_IA64_XENPAGE_H
 #define _ASM_IA64_XENPAGE_H
+
+/* moved from xen/include/asm-ia64/linux-xen/asm/pgtable.h to compile */
+#define IA64_MAX_PHYS_BITS     50      /* max. number of physical address bits 
(architected) */
 
 #ifndef __ASSEMBLY__
 #undef mfn_valid
@@ -23,7 +26,12 @@ static inline unsigned long __virt_to_ma
        if (va - KERNEL_START < xenheap_size)
                return xen_pstart + (va - KERNEL_START);
        else
-               return (va & ((1UL << 60) - 1));
+               /* 
+                * Because the significant 8 bits of VA are used by Xen,
+                * and xen uses cached/uncached identity mapping.
+                * IA64_MAX_PHYS_BITS can't be larger than 56
+                */
+               return (va & ((1UL << IA64_MAX_PHYS_BITS) - 1));
 }
 
 #define virt_to_maddr(va)      (__virt_to_maddr((unsigned long)va))

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] make virt_to_maddr() to support both cached/uncached identity mapped area., Xen patchbot-unstable <=