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] Reformat the pfn_info structure to ensure that

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Reformat the pfn_info structure to ensure that
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Oct 2005 23:02:11 +0000
Delivery-date: Wed, 05 Oct 2005 22:59:41 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bde548fff7b4a99d61beaa91cf69ce4d7911570e
# Parent  21606b84b73098470eb0f565e68cfd961d978763
Reformat the pfn_info structure to ensure that
lock cmpxchg8b instructions occur only on naturally
aligned 8-byte memory values. This is needed for some
NUMA x86 systems.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
Signed-off-by: Aravindh Puthiyaparambil <first.last@xxxxxxxxxx>

diff -r 21606b84b730 -r bde548fff7b4 xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  Wed Oct  5 22:15:00 2005
+++ b/xen/arch/x86/x86_32/mm.c  Wed Oct  5 22:47:09 2005
@@ -156,6 +156,7 @@
      */
     if ( (offsetof(struct pfn_info, u.inuse._domain) != 
           (offsetof(struct pfn_info, count_info) + sizeof(u32))) ||
+         ((offsetof(struct pfn_info, count_info) & 7) != 0) ||
          (sizeof(struct pfn_info) != 24) )
     {
         printk("Weird pfn_info layout (%ld,%ld,%d)\n",
diff -r 21606b84b730 -r bde548fff7b4 xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Wed Oct  5 22:15:00 2005
+++ b/xen/arch/x86/x86_64/mm.c  Wed Oct  5 22:47:09 2005
@@ -137,8 +137,10 @@
      * count_info and domain fields must be adjacent, as we perform atomic
      * 64-bit operations on them.
      */
-    if ( (offsetof(struct pfn_info, u.inuse._domain) != 
-          (offsetof(struct pfn_info, count_info) + sizeof(u32))) )
+    if ( ((offsetof(struct pfn_info, u.inuse._domain) != 
+           (offsetof(struct pfn_info, count_info) + sizeof(u32)))) ||
+         ((offsetof(struct pfn_info, count_info) & 7) != 0) ||
+         (sizeof(struct pfn_info) != 40) )
     {
         printk("Weird pfn_info layout (%ld,%ld,%ld)\n",
                offsetof(struct pfn_info, count_info),
diff -r 21606b84b730 -r bde548fff7b4 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Wed Oct  5 22:15:00 2005
+++ b/xen/include/asm-x86/mm.h  Wed Oct  5 22:47:09 2005
@@ -22,9 +22,6 @@
     /* Each frame can be threaded onto a doubly-linked list. */
     struct list_head list;
 
-    /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */
-    u32 tlbflush_timestamp;
-
     /* Reference count and various PGC_xxx flags and fields. */
     u32 count_info;
 
@@ -37,17 +34,20 @@
             u32 _domain; /* pickled format */
             /* Type reference count and various PGT_xxx flags and fields. */
             unsigned long type_info;
-        } inuse;
+        } __attribute__ ((packed)) inuse;
 
         /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */
         struct {
+            /* Order-size of the free chunk this page is the head of. */
+            u32 order;
             /* Mask of possibly-tainted TLBs. */
             cpumask_t cpumask;
-            /* Order-size of the free chunk this page is the head of. */
-            u8 order;
-        } free;
+        } __attribute__ ((packed)) free;
 
     } u;
+
+    /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */
+    u32 tlbflush_timestamp;
 };
 
  /* The following page types are MUTUALLY EXCLUSIVE. */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Reformat the pfn_info structure to ensure that, Xen patchbot -unstable <=