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] Respect memory attributes for EFI_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Respect memory attributes for EFI_RUNTIME memory
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2007 21:10:34 -0800
Delivery-date: Thu, 18 Jan 2007 21:12:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 awilliam@xxxxxxxxxxxx
# Date 1167951656 25200
# Node ID 2d4807ed105677e6039abcd1877ec5fa2803f403
# Parent  5708307d0e3539227c6d1f17bfa2ed4c9c92a646
[IA64] Respect memory attributes for EFI_RUNTIME memory

Respect memory attributes when mapping EFI_RUNTIME and reserved pages.
Not all of these pages are writable and/or cachable!

Signed-off-by: Jes Sorensen <jes@xxxxxxx>
---
 xen/arch/ia64/xen/dom_fw.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff -r 5708307d0e35 -r 2d4807ed1056 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Thu Jan 04 15:45:10 2007 -0700
+++ b/xen/arch/ia64/xen/dom_fw.c        Thu Jan 04 16:00:56 2007 -0700
@@ -533,6 +533,7 @@ complete_dom0_memmap(struct domain *d,
                u64 start = md->phys_addr;
                u64 size = md->num_pages << EFI_PAGE_SHIFT;
                u64 end = start + size;
+               unsigned long flags;
 
                switch (md->type) {
                case EFI_RUNTIME_SERVICES_CODE:
@@ -540,9 +541,19 @@ complete_dom0_memmap(struct domain *d,
                case EFI_ACPI_RECLAIM_MEMORY:
                case EFI_ACPI_MEMORY_NVS:
                case EFI_RESERVED_TYPE:
-                       /* Map into dom0 - All these are writable.  */
-                       assign_domain_mach_page(d, start, size,
-                                               ASSIGN_writable);
+                       /*
+                        * Map into dom0 - We must respect protection
+                        * and cache attributes.  Not all of these pages
+                        * are writable!!!
+                        */
+                       flags = ASSIGN_writable;        /* dummy - zero */
+                       if (md->attribute & EFI_MEMORY_WP)
+                               flags |= ASSIGN_readonly;
+                       if (md->attribute & EFI_MEMORY_UC)
+                               flags |= ASSIGN_nocache;
+
+                       assign_domain_mach_page(d, start, size, flags);
+
                        /* Fall-through.  */
                case EFI_MEMORY_MAPPED_IO:
                        /* Will be mapped with ioremap.  */

_______________________________________________
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] Respect memory attributes for EFI_RUNTIME memory, Xen patchbot-unstable <=