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-ia64-devel

Re: [Xen-ia64-devel] [Patch][2/2] cleanup warning of UC|WB attributepage

To: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch][2/2] cleanup warning of UC|WB attributepage
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 24 May 2007 15:45:21 -0600
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 24 May 2007 14:43:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C9C79D2AAEBDC7takebe_akio@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <C7C79D29863C74takebe_akio@xxxxxxxxxxxxxx> <C9C79D2AAEBDC7takebe_akio@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2007-05-23 at 20:08 +0900, Akio Takebe wrote:
> Hi,
> 
> This patch cleanup the following warning.
> 
> (XEN) mm.c:497:d0 Warning: UC to WB for mpaddr=xxxxxxxx

Hi Akio,

   Is this cleanup ok?

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r 301267d0db12 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Thu May 24 14:43:14 2007 -0600
+++ b/xen/arch/ia64/xen/mm.c    Thu May 24 15:34:14 2007 -0600
@@ -492,9 +492,22 @@ u64 translate_domain_pte(u64 pteval, u64
                           This can happen when domU tries to touch i/o
                           port space.  Also prevents possible address
                           aliasing issues.  */
-                       if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE))
-                               gdprintk(XENLOG_WARNING, "Warning: UC to WB "
-                                        "for mpaddr=%lx\n", mpaddr);
+                       if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE)) {
+                               u64 ucwb;
+                               
+                               /*
+                                * If dom0 page has both UC & WB attributes
+                                * don't warn about attempted UC access.
+                                */
+                               ucwb = efi_mem_attribute(mpaddr, PAGE_SIZE);
+                               ucwb &= EFI_MEMORY_UC | EFI_MEMORY_WB;
+                               ucwb ^= EFI_MEMORY_UC | EFI_MEMORY_WB;
+
+                               if (d != dom0 || ucwb != 0)
+                                       gdprintk(XENLOG_WARNING, "Warning: UC"
+                                                " to WB for mpaddr=%lx\n",
+                                                mpaddr);
+                       }
                        pteval = (pteval & ~_PAGE_MA_MASK) | _PAGE_MA_WB;
                }
                break;



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