Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 2874

kernel-2.6.18-128.1.10.el5.src.rpm

From: Bill Burns <bburns@redhat.com>
Date: Thu, 4 Sep 2008 07:01:41 -0400
Subject: [xen] x86: fix building with max_phys_cpus=128
Message-id: 48BFC015.8060709@redhat.com
O-Subject: Re: [RHEL5.3 PATCH 1/3 v2] Xen fix building with max_phys_cpus=128
Bugzilla: 447958
RH-Acked-by: Chris Lalancette <clalance@redhat.com>
RH-Acked-by: Don Dutile <ddutile@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Rik van Riel <riel@redhat.com>

Bill Burns wrote:

Upstream patch does not work for us. It relaxed the requirement
that the shadow_page_info and page_info structures needed to be
the same size. With our old code base we crash when using
shadow paging. Fix is to use the patch we proposed upstream
to maintain the structure size matching. Fixes the crash when
using fully virt on x86_64 in build -107.

Review and ack please!

 Bill

# original patch proposed upstream. It was not taken and
# upstream relaxed the requirement to keep the shadow_page_info
# and page_info structs the same size as they no longer need that.
# Our old code base does.

diff --git a/arch/x86/mm/shadow/private.h b/arch/x86/mm/shadow/private.h
index 3ca5b58..2944095 100644
--- a/arch/x86/mm/shadow/private.h
+++ b/arch/x86/mm/shadow/private.h
@@ -243,6 +243,12 @@ struct shadow_page_info
         /* For non-pinnable shadows, a higher entry that points at us */
         paddr_t up;
     };
+#if NR_CPUS > 64
+    /* Need to add some padding to match struct page_info size,
+    * if cpumask_t is larger than a long
+    */
+    u8 padding[sizeof(cpumask_t)-sizeof(long)];
+#endif
 };
 
 /* The structure above *must* be no larger than a struct page_info