x86 shadow: Relax BUILD_BUG_ON() regarding struct sizes.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 13 Aug 2008 11:12:08 +0000 (12:12 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 13 Aug 2008 11:12:08 +0000 (12:12 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/mm/shadow/private.h

index 88b899f84e6bf38a3b2742f322fe2c5b2f889e0f..b7b93c6f25fc4d0727cb45d3ef68521370b2cff2 100644 (file)
@@ -213,15 +213,14 @@ struct shadow_page_info
     };
 };
 
-/* The structure above *must* be the same size as a struct page_info
+/* The structure above *must* be no larger than a struct page_info
  * from mm.h, since we'll be using the same space in the frametable. 
  * Also, the mbz field must line up with the owner field of normal 
  * pages, so they look properly like anonymous/xen pages. */
 static inline void shadow_check_page_struct_offsets(void) {
-    BUILD_BUG_ON(sizeof (struct shadow_page_info) 
-                 != sizeof (struct page_info));
-    BUILD_BUG_ON(offsetof(struct shadow_page_info, mbz) 
-                 != offsetof(struct page_info, u.inuse._domain));
+    BUILD_BUG_ON(sizeof (struct shadow_page_info) < sizeof (struct page_info));
+    BUILD_BUG_ON(offsetof(struct shadow_page_info, mbz) !=
+                 offsetof(struct page_info, u.inuse._domain));
 };
 
 /* Shadow type codes */